Re: [PATCH 17/22] usb: musb: received data length updated on dma abort

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

 



Hello.

Felipe Balbi wrote:

From: Arnaud Mandy <ext-arnaud.2.mandy@xxxxxxxxx>

- separate DMAENAB and DMAMODE bit setting as mentioned in
user manual.

I haven't seen anything about these bits of the RXCSR (compared to TXCSR -- where they indeed must be cleared separately) in the programming guide...

- update actual data length received during dma abort.

Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@xxxxxxxxx>
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>

[...]

diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index 4fccab9..1b0f9ab 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -205,6 +205,7 @@ static int dma_channel_abort(struct dma_channel *channel)
 	struct musb_dma_channel *musb_channel = channel->private_data;
 	void __iomem *mbase = musb_channel->controller->base;
+ u32 addr = 0;
 	u8 bchannel = musb_channel->idx;
 	int offset;
 	u16 csr;
@@ -229,9 +230,12 @@ static int dma_channel_abort(struct dma_channel *channel)
csr = musb_readw(mbase, offset);
 			csr &= ~(MUSB_RXCSR_AUTOCLEAR |
-				 MUSB_RXCSR_DMAENAB |
-				 MUSB_RXCSR_DMAMODE);
+				 MUSB_RXCSR_DMAENAB);
 			musb_writew(mbase, offset, csr);
+			csr &= ~(MUSB_RXCSR_DMAENAB);

Parens not needed here. And why clear DMAENAB twice? And I don't see where you're clearing DMAMODE now... :-/

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux