USB: xHCI: Isoc urb enqueue
authorAndiry Xu <andiry.xu@amd.com>
Thu, 22 Jul 2010 22:23:52 +0000 (15:23 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:42 +0000 (14:35 -0700)
Enable isochronous urb enqueue.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci.c

index 295a0a2..89ac485 100644 (file)
@@ -897,7 +897,12 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
                                slot_id, ep_index);
                spin_unlock_irqrestore(&xhci->lock, flags);
        } else {
-               ret = -EINVAL;
+               spin_lock_irqsave(&xhci->lock, flags);
+               if (xhci->xhc_state & XHCI_STATE_DYING)
+                       goto dying;
+               ret = xhci_queue_isoc_tx_prepare(xhci, GFP_ATOMIC, urb,
+                               slot_id, ep_index);
+               spin_unlock_irqrestore(&xhci->lock, flags);
        }
 exit:
        return ret;