Skip to content

Commit 9834e58

Browse files
holtmannJohan Hedberg
authored andcommitted
Bluetooth: btusb: Add workaround for Broadcom devices without product id
The GPD Pocket is shipping with a BCM2045 USB HCI with its vendor and product information set to 0000:0000 and also has its interface class set to 255 (Vendor Specific Class). Luckily it does advertise usable manufacturer and product strings. T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM2045A0 S: SerialNumber=AC83F30677CB C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) Reported-by: Christopher Williamson <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]> Signed-off-by: Johan Hedberg <[email protected]>
1 parent 3dfe55d commit 9834e58

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/bluetooth/btusb.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static struct usb_driver btusb_driver;
6666
#define BTUSB_BCM2045 0x40000
6767
#define BTUSB_IFNUM_2 0x80000
6868
#define BTUSB_CW6622 0x100000
69+
#define BTUSB_BCM_NO_PRODID 0x200000
6970

7071
static const struct usb_device_id btusb_table[] = {
7172
/* Generic Bluetooth USB device */
@@ -170,6 +171,10 @@ static const struct usb_device_id btusb_table[] = {
170171
{ USB_VENDOR_AND_INTERFACE_INFO(0x0930, 0xff, 0x01, 0x01),
171172
.driver_info = BTUSB_BCM_PATCHRAM },
172173

174+
/* Broadcom devices with missing product id */
175+
{ USB_DEVICE_AND_INTERFACE_INFO(0x0000, 0x0000, 0xff, 0x01, 0x01),
176+
.driver_info = BTUSB_BCM_PATCHRAM | BTUSB_BCM_NO_PRODID },
177+
173178
/* Intel Bluetooth USB Bootloader (RAM module) */
174179
{ USB_DEVICE(0x8087, 0x0a5a),
175180
.driver_info = BTUSB_INTEL_BOOT | BTUSB_BROKEN_ISOC },
@@ -2899,6 +2904,19 @@ static int btusb_probe(struct usb_interface *intf,
28992904
if (id->driver_info == BTUSB_IGNORE)
29002905
return -ENODEV;
29012906

2907+
if (id->driver_info & BTUSB_BCM_NO_PRODID) {
2908+
struct usb_device *udev = interface_to_usbdev(intf);
2909+
2910+
/* For the broken Broadcom devices that show 0000:0000
2911+
* as USB vendor and product information, check that the
2912+
* manufacturer string identifies them as Broadcom based
2913+
* devices.
2914+
*/
2915+
if (!udev->manufacturer ||
2916+
strcmp(udev->manufacturer, "Broadcom Corp"))
2917+
return -ENODEV;
2918+
}
2919+
29022920
if (id->driver_info & BTUSB_ATH3012) {
29032921
struct usb_device *udev = interface_to_usbdev(intf);
29042922

0 commit comments

Comments
 (0)