commit:     202b38dc2229eb5d6c8c7434d0fb47296fde4e3f
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 18 20:44:47 2021 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu Feb 18 20:44:47 2021 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=202b38dc

Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working

See bug #762041

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README                              |  4 +++
 2010_btusb-rome-firmware-error-fix.patch | 50 ++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/0000_README b/0000_README
index 927bfd9..a45f62f 100644
--- a/0000_README
+++ b/0000_README
@@ -123,6 +123,10 @@ Patch:  
2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/[email protected]/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758
 
+Patch:  2010_BT-btusb-rome-firmware-error-fix.patch
+From:   https://www.spinics.net/lists/linux-bluetooth/msg90197.html
+Desc:   Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
+
 Patch:  2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch
 From:   https://bugs.gentoo.org/710790
 Desc:   tmp513 requies REGMAP_I2C to build.  Select it by default in Kconfig. 
See bug #710790. Thanks to Phil Stracchino

diff --git a/2010_btusb-rome-firmware-error-fix.patch 
b/2010_btusb-rome-firmware-error-fix.patch
new file mode 100644
index 0000000..91c18b7
--- /dev/null
+++ b/2010_btusb-rome-firmware-error-fix.patch
@@ -0,0 +1,50 @@
+From 234f414efd1164786269849b4fbb533d6c9cdbbf Mon Sep 17 00:00:00 2001
+From: Hui Wang <[email protected]>
+Date: Mon, 8 Feb 2021 13:02:37 +0800
+Subject: Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
+
+This issue starts from linux-5.10-rc1, I reproduced this issue on my
+Dell Inspiron 7447 with BT adapter 0cf3:e005, the kernel will print
+out: "Bluetooth: hci0: don't support firmware rome 0x31010000", and
+someone else also reported the similar issue to bugzilla #211571.
+
+I found this is a regression introduced by 'commit b40f58b97386
+("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support"), the
+patch assumed that if high ROM version is not zero, it is an adapter
+on WCN6855, but many old adapters don't need to load rampatch or nvm,
+and they have non-zero high ROM version.
+
+To fix it, let the driver match the rom_version in the
+qca_devices_table first, if there is no entry matched, check the
+high ROM version, if it is not zero, we assume this adapter is ready
+to work and no need to load rampatch and nvm like previously.
+
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211571
+Fixes: b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 
support")
+Signed-off-by: Hui Wang <[email protected]>
+Signed-off-by: Marcel Holtmann <[email protected]>
+---
+ drivers/bluetooth/btusb.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 9c6836ee3c9b3..52683fd22e050 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -4273,6 +4273,13 @@ static int btusb_setup_qca(struct hci_dev *hdev)
+                       info = &qca_devices_table[i];
+       }
+       if (!info) {
++              /* If the rom_version is not matched in the qca_devices_table
++               * and the high ROM version is not zero, we assume this chip no
++               * need to load the rampatch and nvm.
++               */
++              if (ver_rom & ~0xffffU)
++                      return 0;
++
+               bt_dev_err(hdev, "don't support firmware rome 0x%x", ver_rom);
+               return -ENODEV;
+       }
+-- 
+cgit 1.2.3-1.el7
+

Reply via email to