From: Bo Shen <voice.shen@atmel.com>
To: <balbi@ti.com>, <nicolas.ferre@atmel.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
Bo Shen <voice.shen@atmel.com>
Subject: [PATCH 2/2] USB: gadget: udc: atmel: fix possible IN hang issue
Date: Wed, 17 Dec 2014 17:18:49 +0800 [thread overview]
Message-ID: <1418807929-31952-2-git-send-email-voice.shen@atmel.com> (raw)
In-Reply-To: <1418807929-31952-1-git-send-email-voice.shen@atmel.com>
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.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
drivers/usb/gadget/udc/atmel_usba_udc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 63e90f5..93328ea 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);
}
}
--
2.1.0.24.g4109c28
next prev parent reply other threads:[~2014-12-17 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 9:18 [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Bo Shen
2014-12-17 9:18 ` Bo Shen [this message]
2014-12-18 17:22 ` [PATCH 2/2] USB: gadget: udc: atmel: fix possible IN hang issue Nicolas Ferre
2014-12-18 17:20 ` [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Nicolas Ferre
2014-12-22 16:38 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418807929-31952-2-git-send-email-voice.shen@atmel.com \
--to=voice.shen@atmel.com \
--cc=balbi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®