Bluetooth: btusb: mediatek: add MediaTek devcoredump support
authorJing Cai <jing.cai@mediatek.com>
Wed, 28 Jun 2023 22:54:57 +0000 (06:54 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:41:56 +0000 (11:41 -0700)
commit0b70151328781a89c89e4cf3fae21fc0e98d869e
treebfb34faf1fd8e0ef1e1ed1dc70880a10c5cb86d0
parent25b6d7593a3af75a00374c9afe548a72794e5af0
Bluetooth: btusb: mediatek: add MediaTek devcoredump support

This patch implement function .coredump() and dmp_hdr() in btusb
driver for MediaTek controller.  FW core dump was triggered by FW
specific event to show something unexpected happened in the controller.

The driver would be responsible for collecting and uploading the device
core dump pieces in hci driver using core dump API. Once we finished
the whole process, the driver would reset the controller to recover the
kind of fatal error.

Co-developed-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Jing Cai <jing.cai@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btmtk.c
drivers/bluetooth/btmtk.h
drivers/bluetooth/btusb.c