]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btusb: Support Bluetooth Reset for Mediatek Chip(MT7921)
authormark-yw.chen <mark-yw.chen@mediatek.com>
Wed, 4 Aug 2021 09:06:47 +0000 (17:06 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 4 Aug 2021 14:48:08 +0000 (16:48 +0200)
commitce8a2d518bbbd04d93e1491162951bcdcec392d1
tree0bfe95080810a8a98f683af9899d1897ec634cb0
parent03b78324d62adf3d3c8a4c2c3ad61101b31cdc0d
Bluetooth: btusb: Support Bluetooth Reset for Mediatek Chip(MT7921)

When the firmware hang or command no response, driver can reset the
bluetooth mcu via USB to recovery it. The reset steps as follows.

1. Cancel USB transfer requests before reset.
2. It use speicific USB HW Register to reset Bluetooth MCU, at the
   same time, the USB Endpoint0 still keep alive.
3. Poll the USB HW register until reset is completed by Endpoint0.
4. To recovery unexpected USB state and behavior during resetting the
   Bluetooth MCU, the driver need to reset the USB device for MT7921.
5. After the reset is completed, the Bluetooth MCU need to re-setup,
   such as download patch, power-on sequence and etc.

Signed-off-by: mark-yw.chen <mark-yw.chen@mediatek.com>
Reviewed-by: Michael Sun <michaelfsun@google.com>
Reviewed-by: Archie Pusaka <apusaka@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c