summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-08-07 11:43:07 +0800
committerFelipe Balbi <balbi@ti.com>2014-08-19 09:24:41 -0500
commitbcabdc24dff2d65dcc5bec093f30302283e5fdf4 (patch)
tree4ff7778baae1956ebfc618db0cf1129aa07e0621 /drivers/usb
parent20e7d4653d2b580e490dfbb1dfd138cd9844319c (diff)
downloadop-kernel-dev-bcabdc24dff2d65dcc5bec093f30302283e5fdf4.zip
op-kernel-dev-bcabdc24dff2d65dcc5bec093f30302283e5fdf4.tar.gz
usb: atmel_usba_udc: fix it to deal with final dma channel
As, the interrupt for DMA is counted from 1, so need to checked the USBA_NR_DMAS, in old way, it only check (USBA_NR_DMAS - 1), so fix it. Reported-by: Max Liao <liaops@embest-tech.com> Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/atmel_usba_udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 906e65f..c9fe67e 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1661,7 +1661,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
if (dma_status) {
int i;
- for (i = 1; i < USBA_NR_DMAS; i++)
+ for (i = 1; i <= USBA_NR_DMAS; i++)
if (dma_status & (1 << i))
usba_dma_irq(udc, &udc->usba_ep[i]);
}
OpenPOWER on IntegriCloud