From: Arnaud Mandy <ext-arnaud.2.mandy@xxxxxxxxx> - separate DMAENAB and DMAMODE bit setting as mentioned in user manual. - 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> --- drivers/usb/musb/musbhsdma.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) 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); + musb_writew(mbase, offset, csr); + addr = musb_read_hsdma_addr(mbase, bchannel); + channel->actual_len = addr - musb_channel->start_addr; } musb_writew(mbase, -- 1.6.6.rc0 -- 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