diff options
Diffstat (limited to 'drivers/usb/host/xhci-hcd.c')
-rw-r--r-- | drivers/usb/host/xhci-hcd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 50ab525f65be..e5fbdcdbf676 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c | |||
@@ -589,12 +589,6 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
589 | 589 | ||
590 | slot_id = urb->dev->slot_id; | 590 | slot_id = urb->dev->slot_id; |
591 | ep_index = xhci_get_endpoint_index(&urb->ep->desc); | 591 | ep_index = xhci_get_endpoint_index(&urb->ep->desc); |
592 | /* Only support ep 0 control transfers for now */ | ||
593 | if (ep_index != 0) { | ||
594 | xhci_dbg(xhci, "WARN: urb submitted to unsupported ep %x\n", | ||
595 | urb->ep->desc.bEndpointAddress); | ||
596 | return -ENOSYS; | ||
597 | } | ||
598 | 592 | ||
599 | spin_lock_irqsave(&xhci->lock, flags); | 593 | spin_lock_irqsave(&xhci->lock, flags); |
600 | if (!xhci->devs || !xhci->devs[slot_id]) { | 594 | if (!xhci->devs || !xhci->devs[slot_id]) { |
@@ -608,7 +602,12 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
608 | ret = -ESHUTDOWN; | 602 | ret = -ESHUTDOWN; |
609 | goto exit; | 603 | goto exit; |
610 | } | 604 | } |
611 | ret = queue_ctrl_tx(xhci, mem_flags, urb, slot_id, ep_index); | 605 | if (usb_endpoint_xfer_control(&urb->ep->desc)) |
606 | ret = queue_ctrl_tx(xhci, mem_flags, urb, slot_id, ep_index); | ||
607 | else if (usb_endpoint_xfer_bulk(&urb->ep->desc)) | ||
608 | ret = queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index); | ||
609 | else | ||
610 | ret = -EINVAL; | ||
612 | exit: | 611 | exit: |
613 | spin_unlock_irqrestore(&xhci->lock, flags); | 612 | spin_unlock_irqrestore(&xhci->lock, flags); |
614 | return ret; | 613 | return ret; |