diff options
author | Ajay Kumar Gupta <ajay.gupta@ti.com> | 2012-03-14 17:33:35 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 19:11:48 +0300 |
commit | 692933b2ccfce02400dc8360a97acde2846e8541 (patch) | |
tree | aa7a78df5ee6e02264fc5bbf85980a21ad2c57ff /drivers/usb/musb | |
parent | 8545e6031a719675da9f3d21f1c8ce143dac7fe5 (diff) | |
download | linux-stable-692933b2ccfce02400dc8360a97acde2846e8541.tar.gz linux-stable-692933b2ccfce02400dc8360a97acde2846e8541.tar.bz2 linux-stable-692933b2ccfce02400dc8360a97acde2846e8541.zip |
usb: musb: fix bug in musb_cleanup_urb
Control transfers with data expected from device to host will use usb_rcvctrlpipe()
for urb->pipe so for such urbs 'is_in' will be set causing control urb to fall
into the first "if" condition in musb_cleanup_urb().
Fixed by adding logic to check for non control endpoints.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 79cb0af779fa..ef8d744800ac 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2098,7 +2098,7 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh) } /* turn off DMA requests, discard state, stop polling ... */ - if (is_in) { + if (ep->epnum && is_in) { /* giveback saves bulk toggle */ csr = musb_h_flush_rxfifo(ep, 0); |