]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc: atmel: fix possible IN hang issue
authorBo Shen <voice.shen@atmel.com>
Wed, 17 Dec 2014 09:18:49 +0000 (17:18 +0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 22 Dec 2014 16:41:15 +0000 (10:41 -0600)
commit3434cc50a1f0068caca43e6eb802f903daba00a0
treece268162cac862c48ce60b1d7ac2b963efadaaa9
parenta1888c206f72868a5239edaf4f079142f583cc69
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: 252683fc7258 (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>
drivers/usb/gadget/udc/atmel_usba_udc.c