diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch new file mode 100644 index 0000000000..16b5b9908b --- /dev/null +++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From ba59a0812ba0e223bd0af8f4dea6c971b6289696 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org> | ||
3 | Date: Thu, 2 Apr 2009 12:07:08 -0700 | ||
4 | Subject: [PATCH] musb: use dma mode 1 for TX if transfer size equals maxpacket (v2) | ||
5 | |||
6 | Currently, with Inventra DMA, we use Mode 0 if transfer size is less | ||
7 | than or equal to the endpoint's maxpacket size. This requires that | ||
8 | we explicitly set TXPKTRDY for that transfer. | ||
9 | |||
10 | However the musb_g_tx code will not set TXPKTRDY twice if the last | ||
11 | transfer is exactly equal to maxpacket, even if request->zero is set. | ||
12 | Using Mode 1 will solve this; a better fix might be in musb_g_tx(). | ||
13 | |||
14 | Without this change, musb will not correctly send out a ZLP if the | ||
15 | last transfer is the maxpacket size and request->zero is set. | ||
16 | |||
17 | Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org> | ||
18 | Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> | ||
19 | --- | ||
20 | drivers/usb/musb/musb_gadget.c | 2 +- | ||
21 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c | ||
24 | index bc197b2..e8f920c 100644 | ||
25 | --- a/drivers/usb/musb/musb_gadget.c | ||
26 | +++ b/drivers/usb/musb/musb_gadget.c | ||
27 | @@ -310,7 +310,7 @@ static void txstate(struct musb *musb, struct musb_request *req) | ||
28 | /* setup DMA, then program endpoint CSR */ | ||
29 | request_size = min(request->length, | ||
30 | musb_ep->dma->max_len); | ||
31 | - if (request_size <= musb_ep->packet_sz) | ||
32 | + if (request_size < musb_ep->packet_sz) | ||
33 | musb_ep->dma->desired_mode = 0; | ||
34 | else | ||
35 | musb_ep->dma->desired_mode = 1; | ||
36 | -- | ||
37 | 1.6.0.4 | ||
38 | |||