]>
Commit | Line | Data |
---|---|---|
fc5fda92 GKH |
1 | From 6124607acc88fffeaadf3aacfeb3cc1304c87387 Mon Sep 17 00:00:00 2001 |
2 | From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
3 | Date: Wed, 27 Sep 2017 18:47:12 +0900 | |
4 | Subject: usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe | |
5 | ||
6 | From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
7 | ||
8 | commit 6124607acc88fffeaadf3aacfeb3cc1304c87387 upstream. | |
9 | ||
10 | This patch fixes an issue that the driver sets the BCLR bit of | |
11 | {C,Dn}FIFOCTR register to 1 even when it's non-DCP pipe and | |
12 | the FRDY bit of {C,Dn}FIFOCTR register is set to 1. | |
13 | ||
14 | Fixes: e8d548d54968 ("usb: renesas_usbhs: fifo became independent from pipe.") | |
15 | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
16 | Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | drivers/usb/renesas_usbhs/fifo.c | 10 ++++++++-- | |
21 | 1 file changed, 8 insertions(+), 2 deletions(-) | |
22 | ||
23 | --- a/drivers/usb/renesas_usbhs/fifo.c | |
24 | +++ b/drivers/usb/renesas_usbhs/fifo.c | |
25 | @@ -282,11 +282,17 @@ static void usbhsf_fifo_clear(struct usb | |
26 | struct usbhs_fifo *fifo) | |
27 | { | |
28 | struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); | |
29 | + int ret = 0; | |
30 | ||
31 | if (!usbhs_pipe_is_dcp(pipe)) | |
32 | - usbhsf_fifo_barrier(priv, fifo); | |
33 | + ret = usbhsf_fifo_barrier(priv, fifo); | |
34 | ||
35 | - usbhs_write(priv, fifo->ctr, BCLR); | |
36 | + /* | |
37 | + * if non-DCP pipe, this driver should set BCLR when | |
38 | + * usbhsf_fifo_barrier() returns 0. | |
39 | + */ | |
40 | + if (!ret) | |
41 | + usbhs_write(priv, fifo->ctr, BCLR); | |
42 | } | |
43 | ||
44 | static int usbhsf_fifo_rcv_len(struct usbhs_priv *priv, |