1 Use USB_INTERFACE_INFO to do device matching, other than USB_DEVICE_INFO. 2 Delete desc.bInterfaceNumber != 0 check. Signed-off-by: Costa Yao <cqyao@xxxxxxxxxxxxxxxx> --- drivers/bluetooth/btusb.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 2bd87d4..39dd65c 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -57,8 +57,8 @@ static struct usb_driver btusb_driver; #define BTUSB_ATH3012 0x80 static struct usb_device_id btusb_table[] = { - /* Generic Bluetooth USB device */ - { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, + /* Bluetooth USB interface */ + { USB_INTERFACE_INFO(0xe0, 0x01, 0x01) }, /* Broadcom SoftSailing reporting vendor specific */ { USB_DEVICE(0x05ac, 0x21e1) }, @@ -918,10 +918,6 @@ static int btusb_probe(struct usb_interface *intf, BT_DBG("intf %p id %p", intf, id); - /* interface numbers are hardcoded in the spec */ - if (intf->cur_altsetting->desc.bInterfaceNumber != 0) - return -ENODEV; - if (!id->driver_info) { const struct usb_device_id *match; match = usb_match_id(intf, blacklist_table); @@ -1017,8 +1013,12 @@ static int btusb_probe(struct usb_interface *intf, hdev->owner = THIS_MODULE; - /* Interface numbers are hardcoded in the specification */ - data->isoc = usb_ifnum_to_if(data->udev, 1); + /* According to HCI-USB specification, the interface for + * SCO data endpoints follows the interface for commands, + * events and ACL data + */ + data->isoc = usb_ifnum_to_if(data->udev, + intf->cur_altsetting->desc.bInterfaceNumber + 1); if (!reset) set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); -- 1.7.4.1 > -----Original Message----- > From: Marcel Holtmann [mailto:marcel@xxxxxxxxxxxx] > Sent: 2011年11月16日 9:16 > To: Yao, Costa > Cc: padovan@xxxxxxxxxxxxxx; linux-bluetooth@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] Bluetooth: btusb: Use USB_INTERFACE_INFO to do device > matching > > Hi Costa, > > > 1 Use USB_INTERFACE_INFO to do device matching, other than > USB_DEVICE_INFO. > > 2 Delete desc.bInterfaceNumber != 0 check. > > > > Signed-off-by: Costa Yao <cqyao@xxxxxxxxxxxxxxxx> > > --- > > drivers/bluetooth/btusb.c | 16 ++++++++-------- > > 1 files changed, 8 insertions(+), 8 deletions(-) > > this looks fine to me now. And isn't this a much cleaner patch ;) > > > - /* Interface numbers are hardcoded in the specification */ > > - data->isoc = usb_ifnum_to_if(data->udev, 1); > > + /* According to HCI-USB specification, the interface for > > + * SCO data endpoint follows the interface for commands, > > + * events and ACL data > > + */ > > Minor nitpick here. It is SCO data endpoints (plural). Just resend the patch with > this fixed and feel free to add my ACK. > > > + data->isoc = usb_ifnum_to_if(data->udev, > > + intf->cur_altsetting->desc.bInterfaceNumber + 1); > > > > if (!reset) > > set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); > > Acked-by: Marcel Holtmann <marcel@xxxxxxxxxxxx> > > Regards > > Marcel > ��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�