Skip to contentSkip to conversation

Bluetooth: btusb: treat 0bda:0002 as a generic HCI device

PATCH Superseded Andrew Bille 4 participants 5 messages Aug 15 – Aug 17 Bluetooth drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: btusb: treat 0bda:0002 as a generic HCI device

The 0bda:0002 Bluetooth controller reports itself as "CSR BS8510" and exposes a standard Bluetooth USB interface.

It currently matches the vendor-wide Realtek quirk and is therefore initialized through btrtl. The controller does not respond to the Realtek-specific register access and initialization fails with:

    Bluetooth: hci0: RTL: RTL: Read reg16 failed (-110)

No Bluetooth controller is then available to userspace.

Add an exact match for 0bda:0002 before the generic Realtek entry so that the device is handled as a generic USB HCI controller.

With this change the controller registers successfully. Scanning, pairing and A2DP audio have been tested successfully.

Fixes a2698a9bf9b0 ("Bluetooth: btusb: Add Realtek 8723A/8723B/8761A/8821A support")
Assisted-by ChatGPT:GPT-5.6-Sol
---
 drivers/bluetooth/btusb.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/btusb.c +3 -0
index 184e95c1625e..fb9fdf90a3b9 100644
@@ -615,6 +615,9 @@ static const struct usb_device_id quirks_table[] = {
 	{ USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
 						     BTUSB_WIDEBAND_SPEECH },
 
+	/* CSR BS8510 device using a Realtek USB vendor ID */
+	{ USB_DEVICE(0x0bda, 0x0002) },
+
 	/* Realtek Bluetooth devices */
 	{ USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
 	  .driver_info = BTUSB_REALTEK },
Signature · 1 line
2.47.3
#1 lore raw

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=1146378

---Test result---

Test Summary:

CheckPatch                    PASS      0.76 seconds
VerifyFixes                   PASS      0.14 seconds
VerifySignedoff               PASS      0.14 seconds
GitLint                       PASS      0.34 seconds
SubjectPrefix                 PASS      0.13 seconds
BuildKernel                   PASS      28.04 seconds
CheckAllWarning               PASS      30.77 seconds
CheckSparse                   PASS      29.76 seconds
BuildKernel32                 PASS      26.87 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      506.27 seconds
IncrementalBuild              PASS      26.54 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found

https://github.com/bluez/bluetooth-next/pull/586

---
Regards,
Linux Bluetooth

Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Bille

Dear Andrew,

Thank you for your patch.

Am 15.08.26 um 05:33 schrieb Andrew Bille:

Quoted 2 lines

The 0bda:0002 Bluetooth controller reports itself as "CSR BS8510" and exposes a standard Bluetooth USB interface.

Where did you find this controller?

Quoted 10 lines

It currently matches the vendor-wide Realtek quirk and is therefore initialized through btrtl. The controller does not respond to the Realtek-specific register access and initialization fails with:

     Bluetooth: hci0: RTL: RTL: Read reg16 failed (-110)

No Bluetooth controller is then available to userspace.

Add an exact match for 0bda:0002 before the generic Realtek entry so that the device is handled as a generic USB HCI controller.

Does the device need any firmware?

Quoted 2 lines

With this change the controller registers successfully. Scanning, pairing and A2DP audio have been tested successfully.

Please include relevant output of /sys/kernel/debug/usb/devices.

Quoted 13 lines
Fixes a2698a9bf9b0 ("Bluetooth: btusb: Add Realtek 8723A/8723B/8761A/8821A support")
Assisted-by ChatGPT:GPT-5.6-Sol
---
  drivers/bluetooth/btusb.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/bluetooth/btusb.c +0 -0
index 184e95c1625e..fb9fdf90a3b9 100644

drivers/bluetooth/btusb.c static const struct usb_device_id quirks_table[] = { · line 620

Quoted 6 lines
drivers/bluetooth/btusb.c +3 -0
@@ -615,6 +615,9 @@ static const struct usb_device_id quirks_table[] = {
  	{ USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
  						     BTUSB_WIDEBAND_SPEECH },
 
+	/* CSR BS8510 device using a Realtek USB vendor ID */
+	{ USB_DEVICE(0x0bda, 0x0002) },
+

Could some sort of message be logged, as we don’t know if there actual Realtek devices out there, that would regress? (More info in the commit message regarding regression potential would be useful.)

drivers/bluetooth/btusb.c static const struct usb_device_id quirks_table[] = { · line 623

Quoted 3 lines
drivers/bluetooth/btusb.c +0 -0
  	/* Realtek Bluetooth devices */
  	{ USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
  	  .driver_info = BTUSB_REALTEK },

With my comments addressed:

Kind regards,

Paul

#3 lore raw

Hi Paul,

thank you for the review.

The controller is the internal Bluetooth adapter of an old Quanta JW6H laptop.

Its relevant USB information is:

D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P:  Vendor=0bda ProdID=0002 Rev=75.58
S:  Product=CSR BS8510

I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

No external firmware is required when the controller is handled through the generic HCI path; no Bluetooth firmware is requested by the kernel in this configuration.

I have addressed the possible regression for other 0bda:0002 devices by limiting the exception to the observed bcdDevice revision 0x7558. The driver also logs when the generic HCI path is selected.

I have sent v3 rebased onto the current bluetooth-next tree. I also re-tested it on the affected hardware: the controller registers successfully, and scanning, pairing and A2DP audio work correctly.

Thank you again for the review.

Kind regards,
Andrew

Quoted 66 lines · Paul Menzel

Dear Andrew,

Thank you for your patch.

Am 15.08.26 um 05:33 schrieb Andrew Bille:

Quoted 2 lines

The 0bda:0002 Bluetooth controller reports itself as "CSR BS8510" and exposes a standard Bluetooth USB interface.

Where did you find this controller?

Quoted 10 lines

It currently matches the vendor-wide Realtek quirk and is therefore initialized through btrtl. The controller does not respond to the Realtek-specific register access and initialization fails with:

     Bluetooth: hci0: RTL: RTL: Read reg16 failed (-110)

No Bluetooth controller is then available to userspace.

Add an exact match for 0bda:0002 before the generic Realtek entry so that the device is handled as a generic USB HCI controller.

Does the device need any firmware?

Quoted 2 lines

With this change the controller registers successfully. Scanning, pairing and A2DP audio have been tested successfully.

Please include relevant output of /sys/kernel/debug/usb/devices.

Quoted 13 lines
Fixes a2698a9bf9b0 ("Bluetooth: btusb: Add Realtek 8723A/8723B/8761A/8821A support")
Assisted-by ChatGPT:GPT-5.6-Sol
---
  drivers/bluetooth/btusb.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/bluetooth/btusb.c +0 -0
index 184e95c1625e..fb9fdf90a3b9 100644

drivers/bluetooth/btusb.c static const struct usb_device_id quirks_table[] = { · line 620

Quoted 6 lines
drivers/bluetooth/btusb.c +3 -0
@@ -615,6 +615,9 @@ static const struct usb_device_id quirks_table[] = {
      { USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
                                                   BTUSB_WIDEBAND_SPEECH },
 
+     /* CSR BS8510 device using a Realtek USB vendor ID */
+     { USB_DEVICE(0x0bda, 0x0002) },
+

Could some sort of message be logged, as we don’t know if there actual Realtek devices out there, that would regress? (More info in the commit message regarding regression potential would be useful.)

drivers/bluetooth/btusb.c static const struct usb_device_id quirks_table[] = { · line 623

Quoted 3 lines
drivers/bluetooth/btusb.c +0 -0
      /* Realtek Bluetooth devices */
      { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
        .driver_info = BTUSB_REALTEK },

With my comments addressed:

Kind regards,

Paul

#4 lore raw
In reply to Andrew Bille

Hi Andrew,

Quoted 8 lines · Andrew Bille

The 0bda:0002 Bluetooth controller reports itself as "CSR BS8510" and exposes a standard Bluetooth USB interface.

It currently matches the vendor-wide Realtek quirk and is therefore initialized through btrtl. The controller does not respond to the Realtek-specific register access and initialization fails with:

Quoted 6 lines
    Bluetooth: hci0: RTL: RTL: Read reg16 failed (-110)

No Bluetooth controller is then available to userspace.

Add an exact match for 0bda:0002 before the generic Realtek entry so that the device is handled as a generic USB HCI controller.

Okay, but what happens to the actual device with id 0x0002? Have you confirmed with Realtek that no other device uses this ID? If another device uses it, this change will break support for that device.

Quoted 2 lines

With this change the controller registers successfully. Scanning, pairing and A2DP audio have been tested successfully.

I may fix your controller but if breaks others, it is not a long term solution. To be clear, 0x0bda is controlled by Realtek; putting a CSR device under it invades another vendor's domain.

Quoted 25 lines
Fixes a2698a9bf9b0 ("Bluetooth: btusb: Add Realtek 8723A/8723B/8761A/8821A support")
Assisted-by ChatGPT:GPT-5.6-Sol
---
 drivers/bluetooth/btusb.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/btusb.c +3 -1
index 184e95c1625e..fb9fdf90a3b9 100644
@@ -615,6 +615,9 @@ static const struct usb_device_id quirks_table[] = {
        { USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
                                                     BTUSB_WIDEBAND_SPEECH },
 
+       /* CSR BS8510 device using a Realtek USB vendor ID */
+       { USB_DEVICE(0x0bda, 0x0002) },
+
        /* Realtek Bluetooth devices */
        { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
          .driver_info = BTUSB_REALTEK },
--

2.47.3

Signature · 1 line
Luiz Augusto von Dentz