diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_host.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index e0dacbb336d0..e666f609ad7e 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -2029,14 +2029,15 @@ done: | |||
2029 | * called with controller locked, irqs blocked | 2029 | * called with controller locked, irqs blocked |
2030 | * that hardware queue advances to the next transfer, unless prevented | 2030 | * that hardware queue advances to the next transfer, unless prevented |
2031 | */ | 2031 | */ |
2032 | static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in) | 2032 | static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh) |
2033 | { | 2033 | { |
2034 | struct musb_hw_ep *ep = qh->hw_ep; | 2034 | struct musb_hw_ep *ep = qh->hw_ep; |
2035 | void __iomem *epio = ep->regs; | 2035 | void __iomem *epio = ep->regs; |
2036 | unsigned hw_end = ep->epnum; | 2036 | unsigned hw_end = ep->epnum; |
2037 | void __iomem *regs = ep->musb->mregs; | 2037 | void __iomem *regs = ep->musb->mregs; |
2038 | u16 csr; | 2038 | int is_in = usb_pipein(urb->pipe); |
2039 | int status = 0; | 2039 | int status = 0; |
2040 | u16 csr; | ||
2040 | 2041 | ||
2041 | musb_ep_select(regs, hw_end); | 2042 | musb_ep_select(regs, hw_end); |
2042 | 2043 | ||
@@ -2137,7 +2138,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
2137 | kfree(qh); | 2138 | kfree(qh); |
2138 | } | 2139 | } |
2139 | } else | 2140 | } else |
2140 | ret = musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN); | 2141 | ret = musb_cleanup_urb(urb, qh); |
2141 | done: | 2142 | done: |
2142 | spin_unlock_irqrestore(&musb->lock, flags); | 2143 | spin_unlock_irqrestore(&musb->lock, flags); |
2143 | return ret; | 2144 | return ret; |
@@ -2171,7 +2172,7 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) | |||
2171 | urb->status = -ESHUTDOWN; | 2172 | urb->status = -ESHUTDOWN; |
2172 | 2173 | ||
2173 | /* cleanup */ | 2174 | /* cleanup */ |
2174 | musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN); | 2175 | musb_cleanup_urb(urb, qh); |
2175 | 2176 | ||
2176 | /* Then nuke all the others ... and advance the | 2177 | /* Then nuke all the others ... and advance the |
2177 | * queue on hw_ep (e.g. bulk ring) when we're done. | 2178 | * queue on hw_ep (e.g. bulk ring) when we're done. |