diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-29 10:25:46 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-29 10:25:46 +0200 |
| commit | 80c82ffebd2ec3f91a2daa24b561392de7fda895 (patch) | |
| tree | 7fc2358e6676cd431186eb88005b7778e1035834 /drivers/usb/renesas_usbhs/fifo.c | |
| parent | 8fec9355a968ad240f3a2e9ad55b823cf1cc52ff (diff) | |
| parent | c3cdce45f8d3dfa5c3467894aa89798314920328 (diff) | |
| download | talos-op-linux-80c82ffebd2ec3f91a2daa24b561392de7fda895.tar.gz talos-op-linux-80c82ffebd2ec3f91a2daa24b561392de7fda895.zip | |
Merge tag 'fixes-for-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes:
usb: fixes for v4.14-rc3
Alan Stern fixed 3 old bugs on dummy_hcd which were reported recently.
Yoshihiro Shimoda continues his work on the renensas_usb3 driver by
fixing several bugs all over the place. The most important of which is
a fix for 2-stage control transfers, previously renesas_usb3 would,
anyway, try to move a 0-length data stage, which is wrong.
Apart from these, there are two minor bug fixes (atmel udc and ffs)
and a new device ID for dwc3-of-simple.c
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
| -rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index d1af831f43eb..68f26904c316 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -282,11 +282,26 @@ static void usbhsf_fifo_clear(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo) { struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); + int ret = 0; - if (!usbhs_pipe_is_dcp(pipe)) - usbhsf_fifo_barrier(priv, fifo); + if (!usbhs_pipe_is_dcp(pipe)) { + /* + * This driver checks the pipe condition first to avoid -EBUSY + * from usbhsf_fifo_barrier() with about 10 msec delay in + * the interrupt handler if the pipe is RX direction and empty. + */ + if (usbhs_pipe_is_dir_in(pipe)) + ret = usbhs_pipe_is_accessible(pipe); + if (!ret) + ret = usbhsf_fifo_barrier(priv, fifo); + } - usbhs_write(priv, fifo->ctr, BCLR); + /* + * if non-DCP pipe, this driver should set BCLR when + * usbhsf_fifo_barrier() returns 0. + */ + if (!ret) + usbhs_write(priv, fifo->ctr, BCLR); } static int usbhsf_fifo_rcv_len(struct usbhs_priv *priv, |

