aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 0c3e179b7589..55ac349695c4 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -101,6 +101,7 @@ static struct usb_device_id btusb_table[] = {
101 { USB_DEVICE(0x0c10, 0x0000) }, 101 { USB_DEVICE(0x0c10, 0x0000) },
102 102
103 /* Broadcom BCM20702A0 */ 103 /* Broadcom BCM20702A0 */
104 { USB_DEVICE(0x0a5c, 0x21e3) },
104 { USB_DEVICE(0x413c, 0x8197) }, 105 { USB_DEVICE(0x413c, 0x8197) },
105 106
106 { } /* Terminating entry */ 107 { } /* Terminating entry */
@@ -315,7 +316,8 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
315 316
316 err = usb_submit_urb(urb, mem_flags); 317 err = usb_submit_urb(urb, mem_flags);
317 if (err < 0) { 318 if (err < 0) {
318 BT_ERR("%s urb %p submission failed (%d)", 319 if (err != -EPERM && err != -ENODEV)
320 BT_ERR("%s urb %p submission failed (%d)",
319 hdev->name, urb, -err); 321 hdev->name, urb, -err);
320 usb_unanchor_urb(urb); 322 usb_unanchor_urb(urb);
321 } 323 }
@@ -400,7 +402,8 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
400 402
401 err = usb_submit_urb(urb, mem_flags); 403 err = usb_submit_urb(urb, mem_flags);
402 if (err < 0) { 404 if (err < 0) {
403 BT_ERR("%s urb %p submission failed (%d)", 405 if (err != -EPERM && err != -ENODEV)
406 BT_ERR("%s urb %p submission failed (%d)",
404 hdev->name, urb, -err); 407 hdev->name, urb, -err);
405 usb_unanchor_urb(urb); 408 usb_unanchor_urb(urb);
406 } 409 }
@@ -506,15 +509,10 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags)
506 509
507 pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress); 510 pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress);
508 511
509 urb->dev = data->udev; 512 usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_isoc_complete,
510 urb->pipe = pipe; 513 hdev, data->isoc_rx_ep->bInterval);
511 urb->context = hdev;
512 urb->complete = btusb_isoc_complete;
513 urb->interval = data->isoc_rx_ep->bInterval;
514 514
515 urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP; 515 urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP;
516 urb->transfer_buffer = buf;
517 urb->transfer_buffer_length = size;
518 516
519 __fill_isoc_descriptor(urb, size, 517 __fill_isoc_descriptor(urb, size,
520 le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize)); 518 le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize));
@@ -523,7 +521,8 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags)
523 521
524 err = usb_submit_urb(urb, mem_flags); 522 err = usb_submit_urb(urb, mem_flags);
525 if (err < 0) { 523 if (err < 0) {
526 BT_ERR("%s urb %p submission failed (%d)", 524 if (err != -EPERM && err != -ENODEV)
525 BT_ERR("%s urb %p submission failed (%d)",
527 hdev->name, urb, -err); 526 hdev->name, urb, -err);
528 usb_unanchor_urb(urb); 527 usb_unanchor_urb(urb);
529 } 528 }
@@ -727,6 +726,9 @@ static int btusb_send_frame(struct sk_buff *skb)
727 usb_fill_bulk_urb(urb, data->udev, pipe, 726 usb_fill_bulk_urb(urb, data->udev, pipe,
728 skb->data, skb->len, btusb_tx_complete, skb); 727 skb->data, skb->len, btusb_tx_complete, skb);
729 728
729 if (skb->priority >= HCI_PRIO_MAX - 1)
730 urb->transfer_flags = URB_ISO_ASAP;
731
730 hdev->stat.acl_tx++; 732 hdev->stat.acl_tx++;
731 break; 733 break;
732 734
@@ -770,7 +772,9 @@ skip_waking:
770 772
771 err = usb_submit_urb(urb, GFP_ATOMIC); 773 err = usb_submit_urb(urb, GFP_ATOMIC);
772 if (err < 0) { 774 if (err < 0) {
773 BT_ERR("%s urb %p submission failed", hdev->name, urb); 775 if (err != -EPERM && err != -ENODEV)
776 BT_ERR("%s urb %p submission failed (%d)",
777 hdev->name, urb, -err);
774 kfree(urb->setup_packet); 778 kfree(urb->setup_packet);
775 usb_unanchor_urb(urb); 779 usb_unanchor_urb(urb);
776 } else { 780 } else {