Message ID | 20221216201247.297210-1-marcel@holtmann.org |
---|---|
State | Accepted |
Commit | b03b141b1e81ee18dc04534fccf19c0895249f46 |
Headers | show |
Series | Bluetooth: Fix issue with Actions Semi ATS2851 based devices | expand |
On Fri, Dec 16, 2022, at 12:12 PM, Marcel Holtmann wrote: > Their devices claim to support the erroneous data reporting, but don't > actually support the required commands. So blacklist them and add a > quirk. This device appears to not support HCI_OP_LE_READ_TRANSMIT_POWER, either. I get this with the above patch applied: > Bluetooth: hci0: Opcode 0x204b failed: -56 Then it fails to register as a functioning interface, and bluez thinks bluetooth is turned off. In my case, it's a Techkey long range adapter, which is probably a similar model to the above mentioned Ugreen device, except that it also has a detachable pole antenna.
So sorry for the noise, I didn't notice there was a new patch revision.
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 2ad4efdd9e40..afd2f08ffe30 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -64,6 +64,7 @@ static struct usb_driver btusb_driver; #define BTUSB_INTEL_BROKEN_SHUTDOWN_LED BIT(24) #define BTUSB_INTEL_BROKEN_INITIAL_NCMD BIT(25) #define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26) +#define BTUSB_ACTIONS_SEMI BIT(27) static const struct usb_device_id btusb_table[] = { /* Generic Bluetooth USB device */ @@ -677,6 +678,9 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x0cb5, 0xc547), .driver_info = BTUSB_REALTEK | BTUSB_WIDEBAND_SPEECH }, + /* Actions Semiconductor ATS2851 based devices */ + { USB_DEVICE(0x10d7, 0xb012), .driver_info = BTUSB_ACTIONS_SEMI }, + /* Silicon Wave based devices */ { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE }, @@ -4098,6 +4102,11 @@ static int btusb_probe(struct usb_interface *intf, set_bit(BTUSB_USE_ALT3_FOR_WBS, &data->flags); } + if (id->driver_info & BTUSB_ACTIONS_SEMI) { + /* Support is advertised, but not implemented */ + set_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &hdev->quirks); + } + if (!reset) set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);