USB: musb: correct DMA address for tx
authorCliff Cai <cliff.cai@analog.com>
Tue, 22 Dec 2009 02:18:02 +0000 (21:18 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Dec 2009 19:34:18 +0000 (11:34 -0800)
Since a DMA transfer may need to be kicked off several times to complete,
the DMA start must include the length that has already been transferred.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget.c

index e164999..ac30698 100644 (file)
@@ -319,7 +319,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
                        use_dma = use_dma && c->channel_program(
                                        musb_ep->dma, musb_ep->packet_sz,
                                        musb_ep->dma->desired_mode,
-                                       request->dma, request_size);
+                                       request->dma + request->actual, request_size);
                        if (use_dma) {
                                if (musb_ep->dma->desired_mode == 0) {
                                        /*