[PATCH] usb: musb: fix bug in musbhsdma programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mode bit should be set based on function parameter "mode" of
configure_channel() function.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
---
 drivers/usb/musb/musbhsdma.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index a23d005..d87c6c7 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -225,13 +225,14 @@ static void configure_channel(struct dma_channel *channel,
 			csr |= MUSB_HSDMA_BURSTMODE_INCR4;
 
 		csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
-			| MUSB_HSDMA_MODE1
 			| MUSB_HSDMA_ENABLE
 			| MUSB_HSDMA_IRQENABLE
 			| (musb_channel->transmit
 					? MUSB_HSDMA_TRANSMIT
 					: 0);
 
+		if (mode)
+			csr |= MUSB_HSDMA_MODE1;
 		/* address/count */
 		musb_write_hsdma_addr(mbase, bchannel, dma_addr);
 		musb_write_hsdma_count(mbase, bchannel, len);
-- 
1.5.6

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux