Skip to content

Commit

Permalink
usb: musb: fix bug in musb_cleanup_urb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ajay Kumar Gupta authored and Felipe Balbi committed Apr 10, 2012
1 parent 8545e60 commit 692933b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 692933b

Please sign in to comment.