linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
@ 2021-02-08  5:02 Hui Wang
  2021-02-08  6:10 ` bluez.test.bot
  2021-02-08 13:53 ` [PATCH] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Hui Wang @ 2021-02-08  5:02 UTC (permalink / raw)
  To: linux-bluetooth, marcel, rjliao

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>
---
 drivers/bluetooth/btusb.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 2164a4cd47ad..79ec73e3d321 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4123,6 +4123,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;
 	}
-- 
2.25.1


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

* RE: Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
  2021-02-08  5:02 [PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working Hui Wang
@ 2021-02-08  6:10 ` bluez.test.bot
  2021-02-08 13:53 ` [PATCH] " Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-02-08  6:10 UTC (permalink / raw)
  To: linux-bluetooth, hui.wang

[-- Attachment #1: Type: text/plain, Size: 2578 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=429669

---Test result---

##############################
    Test: CheckPatch - FAIL
    Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
WARNING: Unknown commit id 'b40f58b97386', maybe rebased or not pulled?
#12: 
I found this is a regression introduced by 'commit b40f58b97386

WARNING: Unknown commit id 'b40f58b97386', maybe rebased or not pulled?
#24: 
Fixes: b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support")

total: 0 errors, 2 warnings, 13 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop" has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


    ##############################
    Test: CheckGitLint - FAIL
    Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
20: B1 Line exceeds max length (84>80): "Fixes: b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support")"


    ##############################
    Test: CheckBuildK - PASS
    

    ##############################
    Test: CheckTestRunner: Setup - PASS
    

    ##############################
    Test: CheckTestRunner: l2cap-tester - PASS
    Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6

    ##############################
    Test: CheckTestRunner: bnep-tester - PASS
    Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0

    ##############################
    Test: CheckTestRunner: mgmt-tester - PASS
    Total: 416, Passed: 402 (96.6%), Failed: 0, Not Run: 14

    ##############################
    Test: CheckTestRunner: rfcomm-tester - PASS
    Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0

    ##############################
    Test: CheckTestRunner: sco-tester - PASS
    Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

    ##############################
    Test: CheckTestRunner: smp-tester - PASS
    Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

    ##############################
    Test: CheckTestRunner: userchan-tester - PASS
    Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0

    

---
Regards,
Linux Bluetooth


[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 43341 bytes --]

[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3531 bytes --]

[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 546677 bytes --]

[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11652 bytes --]

[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9887 bytes --]

[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11798 bytes --]

[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5428 bytes --]

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

* Re: [PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
  2021-02-08  5:02 [PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working Hui Wang
  2021-02-08  6:10 ` bluez.test.bot
@ 2021-02-08 13:53 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-02-08 13:53 UTC (permalink / raw)
  To: Hui Wang; +Cc: Bluetooth Kernel Mailing List, rjliao

Hi Hui,

> 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>
> ---
> drivers/bluetooth/btusb.c | 7 +++++++
> 1 file changed, 7 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2021-02-08 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  5:02 [PATCH] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working Hui Wang
2021-02-08  6:10 ` bluez.test.bot
2021-02-08 13:53 ` [PATCH] " 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).