Bluetooth: btusb: treat 0bda:0002 rev 7558 as a generic HCI device
PATCH v3 1/1 Bluetooth: btusb: treat 0bda:0002 rev 7558 as a generic HCI device
The internal Bluetooth controller of a Quanta JW6H laptop reports itself as "CSR BS8510" and exposes a standard Bluetooth USB interface.
Relevant /sys/kernel/debug/usb/devices output 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=btusbThe device currently matches the vendor-wide Realtek quirk and is therefore initialized through btrtl. It 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.
No external firmware is required when the device is handled through the generic HCI path.
It is not known whether other devices using USB ID 0bda:0002 are genuine Realtek controllers. Limit the exception to the observed bcdDevice revision 0x7558 and log when generic HCI handling is forced, so other revisions continue to use the existing Realtek path.
With this change the controller registers successfully. Scanning, pairing and A2DP audio have been tested successfully.
---
Changes in v3:
- Rebase onto the current bluetooth-next tree.
- Preserve the updated BTUSB_IGNORE bit test from upstream.
- No functional changes.
Changes in v2:
- Restrict the quirk to the observed bcdDevice revision 0x7558.
- Log when generic HCI handling is forced.
- Add the Quanta JW6H platform and USB descriptor information.
- Document that no external firmware is required.
- Document the possible conflict with other 0bda:0002 devices.
drivers/bluetooth/btusb.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/bluetooth/btusb.c +8 -0
@@ -67,6 +67,7 @@ static struct usb_driver btusb_driver;#define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26)#define BTUSB_ACTIONS_SEMI BIT(27)#define BTUSB_BARROT BIT(28) +#define BTUSB_FORCE_GENERIC BIT(29)static const struct usb_device_id btusb_table[] = {/* Generic Bluetooth USB device */
@@ -619,6 +620,10 @@ static const struct usb_device_id quirks_table[] = { { USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK | BTUSB_WIDEBAND_SPEECH }, + /* Device reporting itself as "CSR BS8510" */ + { USB_DEVICE_VER(0x0bda, 0x0002, 0x7558, 0x7558), + .driver_info = BTUSB_FORCE_GENERIC }, + /* Realtek Bluetooth devices */ { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01), .driver_info = BTUSB_REALTEK },
@@ -4122,6 +4127,9 @@ static int btusb_probe(struct usb_interface *intf, id = match; } +if (id->driver_info &BTUSB_FORCE_GENERIC ) +dev_info (&intf->dev,"using generic HCI handling\n" ); +if (id->driver_info &BTUSB_IGNORE )return -ENODEV ;
Signature · 1 line
2.47.3
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=1146453
---Test result---
Test Summary:
CheckPatch PASS 0.55 seconds VerifyFixes PASS 0.07 seconds VerifySignedoff PASS 0.07 seconds GitLint PASS 0.24 seconds SubjectPrefix PASS 0.06 seconds BuildKernel PASS 27.24 seconds CheckAllWarning PASS 29.85 seconds CheckSparse PASS 28.30 seconds BuildKernel32 PASS 26.17 seconds CheckKernelLLVM SKIP 0.00 seconds TestRunnerSetup PASS 506.94 seconds IncrementalBuild PASS 25.78 seconds
Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found
https://github.com/bluez/bluetooth-next/pull/588
---
Regards,
Linux Bluetooth