]>
Commit | Line | Data |
---|---|---|
e370d1cd GKH |
1 | From f3eec0cf784e0d6c47822ca6b66df3d5812af7e6 Mon Sep 17 00:00:00 2001 |
2 | From: Andrew Goodbody <andrew.goodbody@cambrionix.com> | |
3 | Date: Tue, 31 May 2016 10:05:26 -0500 | |
4 | Subject: usb: musb: Ensure rx reinit occurs for shared_fifo endpoints | |
5 | ||
6 | From: Andrew Goodbody <andrew.goodbody@cambrionix.com> | |
7 | ||
8 | commit f3eec0cf784e0d6c47822ca6b66df3d5812af7e6 upstream. | |
9 | ||
10 | shared_fifo endpoints would only get a previous tx state cleared | |
11 | out, the rx state was only cleared for non shared_fifo endpoints | |
12 | Change this so that the rx state is cleared for all endpoints. | |
13 | This addresses an issue that resulted in rx packets being dropped | |
14 | silently. | |
15 | ||
16 | Signed-off-by: Andrew Goodbody <andrew.goodbody@cambrionix.com> | |
17 | Signed-off-by: Bin Liu <b-liu@ti.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/usb/musb/musb_host.c | 13 ++++++------- | |
22 | 1 file changed, 6 insertions(+), 7 deletions(-) | |
23 | ||
24 | --- a/drivers/usb/musb/musb_host.c | |
25 | +++ b/drivers/usb/musb/musb_host.c | |
26 | @@ -594,14 +594,13 @@ musb_rx_reinit(struct musb *musb, struct | |
27 | musb_writew(ep->regs, MUSB_TXCSR, 0); | |
28 | ||
29 | /* scrub all previous state, clearing toggle */ | |
30 | - } else { | |
31 | - csr = musb_readw(ep->regs, MUSB_RXCSR); | |
32 | - if (csr & MUSB_RXCSR_RXPKTRDY) | |
33 | - WARNING("rx%d, packet/%d ready?\n", ep->epnum, | |
34 | - musb_readw(ep->regs, MUSB_RXCOUNT)); | |
35 | - | |
36 | - musb_h_flush_rxfifo(ep, MUSB_RXCSR_CLRDATATOG); | |
37 | } | |
38 | + csr = musb_readw(ep->regs, MUSB_RXCSR); | |
39 | + if (csr & MUSB_RXCSR_RXPKTRDY) | |
40 | + WARNING("rx%d, packet/%d ready?\n", ep->epnum, | |
41 | + musb_readw(ep->regs, MUSB_RXCOUNT)); | |
42 | + | |
43 | + musb_h_flush_rxfifo(ep, MUSB_RXCSR_CLRDATATOG); | |
44 | ||
45 | /* target addr and (for multipoint) hub addr/port */ | |
46 | if (musb->is_multipoint) { |