urb->transfer_buffer_length and urb->transfer_buffer should be
updated based on urb->actual_length.For a fresh and first time urb,
actual_length will be zero but for urbs which has been stopped and
restarted (as bulk nak scheme does) actual_length may not be zero.

Signed-off-by: Ajay Kumar Gupta <[email protected]>
---
 drivers/usb/musb/musb_host.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index a776951..1a78f00 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -201,8 +201,8 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh 
*qh)
                len = urb->iso_frame_desc[0].length;
                break;
        default:                /* bulk, interrupt */
-               buf = urb->transfer_buffer;
-               len = urb->transfer_buffer_length;
+               buf = urb->transfer_buffer + urb->actual_length;
+               len = urb->transfer_buffer_length - urb->actual_length;
        }
 
        DBG(4, "qh %p urb %p dev%d ep%d%s%s, hw_ep %d, %p/%d\n",
-- 
1.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to