summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-07-06 14:53:54 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-06 16:16:05 +0300
commit3a5ef20c979c0f33b6fb2582d04957397a6bf51f (patch)
tree4346ac28f1cc002b52fb6240500a7985bf7baa3c
parent223683a54bf3f371683c401b9a759c54e1452fa3 (diff)
Bluetooth: Handle Intel USB bootloader with buggy interrupt
The interrupt interface for the Intel USB bootloader devices is only enabled after receiving SetInterface(0, AltSetting=0). When this USB command is not send, then no HCI events will be received. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--drivers/bluetooth/btusb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 14314a12babe..fe24f600ed65 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1807,6 +1807,18 @@ static int btusb_probe(struct usb_interface *intf,
data->isoc = NULL;
}
+ if (id->driver_info & BTUSB_INTEL_BOOT) {
+ /* A bug in the bootloader causes that interrupt interface is
+ * only enabled after receiving SetInterface(0, AltSetting=0).
+ */
+ err = usb_set_interface(data->udev, 0, 0);
+ if (err < 0) {
+ BT_ERR("failed to set interface 0, alt 0 %d", err);
+ hci_free_dev(hdev);
+ return err;
+ }
+ }
+
if (data->isoc) {
err = usb_driver_claim_interface(&btusb_driver,
data->isoc, data);