diff options
author | Bo Shen <voice.shen@atmel.com> | 2014-12-17 17:18:49 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-12-22 10:41:15 -0600 |
commit | 6785a1034461c2d2c205215f63a50a740896e55b (patch) | |
tree | ce268162cac862c48ce60b1d7ac2b963efadaaa9 /drivers/usb | |
parent | f40afdddeb6c54ffd1e2920a5e93e363d6748db6 (diff) | |
download | talos-op-linux-6785a1034461c2d2c205215f63a50a740896e55b.tar.gz talos-op-linux-6785a1034461c2d2c205215f63a50a740896e55b.zip |
usb: gadget: udc: atmel: fix possible IN hang issue
When receive data, the RXRDY in status register set by hardware
after a new packet has been stored in the endpoint FIFO. When it
is copied from FIFO, this bit is cleared which make the FIFO can
be accessed again.
In the receive_data() function, this bit RXRDY has been cleared.
So, after the receive_data() function return, this bit should
not be cleared again, or else it may cause the accessing FIFO
corrupt, which will make the data loss.
Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver)
Cc: <stable@vger.kernel.org> # 2.6.24+
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.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.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 63e90f5c05cb..93328ea7eb1b 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -1563,7 +1563,6 @@ static void usba_ep_irq(struct usba_udc *udc, struct usba_ep *ep) if ((epstatus & epctrl) & USBA_RX_BK_RDY) { DBG(DBG_BUS, "%s: RX data ready\n", ep->ep.name); receive_data(ep); - usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY); } } |