aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2009-04-02 15:07:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:41 -0400
commitd1043a2697effee3054451a9293a376bfb013e4b (patch)
tree4a614ab79c9c44b23a45b9f0bb3e0f8352a4d99d /drivers
parentab983f2a1be582b00f706013f40f658769d0823a (diff)
musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)
Currently, with Inventra DMA, we use Mode 0 if transfer size is less than or equal to the endpoint's maxpacket size. This requires that we explicitly set TXPKTRDY for that transfer. However the musb_g_tx code will not set TXPKTRDY twice if the last transfer is exactly equal to maxpacket, even if request->zero is set. Using Mode 1 will solve this; a better fix might be in musb_g_tx(). Without this change, musb will not correctly send out a ZLP if the last transfer is the maxpacket size and request->zero is set. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/musb/musb_gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 858d005fae6d..8b3c4e2ed7b8 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -310,7 +310,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
310 /* setup DMA, then program endpoint CSR */ 310 /* setup DMA, then program endpoint CSR */
311 request_size = min(request->length, 311 request_size = min(request->length,
312 musb_ep->dma->max_len); 312 musb_ep->dma->max_len);
313 if (request_size <= musb_ep->packet_sz) 313 if (request_size < musb_ep->packet_sz)
314 musb_ep->dma->desired_mode = 0; 314 musb_ep->dma->desired_mode = 0;
315 else 315 else
316 musb_ep->dma->desired_mode = 1; 316 musb_ep->dma->desired_mode = 1;