linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btrtl: HCI reset on close for RTL8822BE
@ 2019-06-21  8:58 Jian-Hong Pan
  2019-06-24  4:53 ` Daniel Drake
  0 siblings, 1 reply; 8+ messages in thread
From: Jian-Hong Pan @ 2019-06-21  8:58 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Daniel Drake
  Cc: linux-bluetooth, linux-kernel, Jian-Hong Pan

Realtek RTL8822BE BT chip on ASUS X420FA cannot be turned on correctly
after on-off several times.  Bluetooth daemon sets BT mode failed when
this issue happens.

bluetoothd[1576]: Failed to set mode: Failed (0x03)

If BT is tunred off, then turned on again, it works correctly again.
This patch makes RTL8822BE BT reset on close to fix this issue.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
---
 drivers/bluetooth/btrtl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 208feef63de4..7e9930f0f231 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -608,10 +608,11 @@ int btrtl_download_firmware(struct hci_dev *hdev,
 	case RTL_ROM_LMP_8723A:
 	case RTL_ROM_LMP_3499:
 		return btrtl_setup_rtl8723a(hdev, btrtl_dev);
+	case RTL_ROM_LMP_8822B:
+		set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 	case RTL_ROM_LMP_8723B:
 	case RTL_ROM_LMP_8821A:
 	case RTL_ROM_LMP_8761A:
-	case RTL_ROM_LMP_8822B:
 		return btrtl_setup_rtl8723b(hdev, btrtl_dev);
 	default:
 		rtl_dev_info(hdev, "rtl: assuming no firmware upload needed\n");
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-06 10:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21  8:58 [PATCH] Bluetooth: btrtl: HCI reset on close for RTL8822BE Jian-Hong Pan
2019-06-24  4:53 ` Daniel Drake
2019-06-24  6:21   ` [PATCH v2] Bluetooth: btrtl: HCI reset on close for Realtek BT chip Jian-Hong Pan
2019-06-25  5:10     ` Daniel Drake
2019-06-25  5:43       ` Marcel Holtmann
2019-06-25  8:30         ` [PATCH v3] " Jian-Hong Pan
2019-07-01  7:45           ` Daniel Drake
2019-07-06 10:51           ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).