aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 35cdba10411b..db00492588b6 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -719,7 +719,6 @@ dead:
719 */ 719 */
720static int ehci_urb_enqueue ( 720static int ehci_urb_enqueue (
721 struct usb_hcd *hcd, 721 struct usb_hcd *hcd,
722 struct usb_host_endpoint *ep,
723 struct urb *urb, 722 struct urb *urb,
724 gfp_t mem_flags 723 gfp_t mem_flags
725) { 724) {
@@ -734,12 +733,12 @@ static int ehci_urb_enqueue (
734 default: 733 default:
735 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags)) 734 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
736 return -ENOMEM; 735 return -ENOMEM;
737 return submit_async (ehci, ep, urb, &qtd_list, mem_flags); 736 return submit_async(ehci, urb, &qtd_list, mem_flags);
738 737
739 case PIPE_INTERRUPT: 738 case PIPE_INTERRUPT:
740 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags)) 739 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
741 return -ENOMEM; 740 return -ENOMEM;
742 return intr_submit (ehci, ep, urb, &qtd_list, mem_flags); 741 return intr_submit(ehci, urb, &qtd_list, mem_flags);
743 742
744 case PIPE_ISOCHRONOUS: 743 case PIPE_ISOCHRONOUS:
745 if (urb->dev->speed == USB_SPEED_HIGH) 744 if (urb->dev->speed == USB_SPEED_HIGH)
@@ -777,13 +776,18 @@ static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
777 * completions normally happen asynchronously 776 * completions normally happen asynchronously
778 */ 777 */
779 778
780static int ehci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) 779static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
781{ 780{
782 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 781 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
783 struct ehci_qh *qh; 782 struct ehci_qh *qh;
784 unsigned long flags; 783 unsigned long flags;
784 int rc;
785 785
786 spin_lock_irqsave (&ehci->lock, flags); 786 spin_lock_irqsave (&ehci->lock, flags);
787 rc = usb_hcd_check_unlink_urb(hcd, urb, status);
788 if (rc)
789 goto done;
790
787 switch (usb_pipetype (urb->pipe)) { 791 switch (usb_pipetype (urb->pipe)) {
788 // case PIPE_CONTROL: 792 // case PIPE_CONTROL:
789 // case PIPE_BULK: 793 // case PIPE_BULK:
@@ -838,7 +842,7 @@ static int ehci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
838 } 842 }
839done: 843done:
840 spin_unlock_irqrestore (&ehci->lock, flags); 844 spin_unlock_irqrestore (&ehci->lock, flags);
841 return 0; 845 return rc;
842} 846}
843 847
844/*-------------------------------------------------------------------------*/ 848/*-------------------------------------------------------------------------*/