summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2021-02-08 13:02:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-26 10:13:00 +0100
commitd63699364fa3c5f8a081b26f7c111888944f0f14 (patch)
treef5875f120c78bdb6240fee7ec3f6bec472d6c15f
parent9f04a05fa1ed725db82993e6075c6b1b60cfc3cb (diff)
downloadlinux-d63699364fa3c5f8a081b26f7c111888944f0f14.tar.gz
linux-d63699364fa3c5f8a081b26f7c111888944f0f14.tar.bz2
linux-d63699364fa3c5f8a081b26f7c111888944f0f14.zip
Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
commit 234f414efd1164786269849b4fbb533d6c9cdbbf upstream. 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 <hui.wang@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: Salvatore Bonaccorso <carnil@debian.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/bluetooth/btusb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 9f958699141e..1c942869baac 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3689,6 +3689,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;
}