diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2018-06-08 10:09:28 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 10:09:28 -0300 |
commit | 5b5a04065fb5487303869fd6080c30f86530005d (patch) | |
tree | d1442504baf73be22d9e6bc1864206df5ccedfeb /drivers/usb/renesas_usbhs/fifo.c | |
parent | 0e674a64b86e2bb00ab43f56104d3ea85dda0066 (diff) | |
parent | 8d99753ad93af6bcaf798232eeb15e60bdd7e94b (diff) |
Merge pull request #25 from MaxKrummenacher/4.9-1.0.x-imx-stable-merge
4.9 1.0.x imx stable merge
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 6c6a3a8df07a..968ade5a35f5 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -1001,6 +1001,10 @@ static int usbhsf_dma_prepare_pop_with_usb_dmac(struct usbhs_pkt *pkt, if ((uintptr_t)pkt->buf & (USBHS_USB_DMAC_XFER_SIZE - 1)) goto usbhsf_pio_prepare_pop; + /* return at this time if the pipe is running */ + if (usbhs_pipe_is_running(pipe)) + return 0; + usbhs_pipe_config_change_bfre(pipe, 1); ret = usbhsf_fifo_select(pipe, fifo, 0); @@ -1191,6 +1195,7 @@ static int usbhsf_dma_pop_done_with_usb_dmac(struct usbhs_pkt *pkt, usbhsf_fifo_clear(pipe, fifo); pkt->actual = usbhs_dma_calc_received_size(pkt, chan, rcv_len); + usbhs_pipe_running(pipe, 0); usbhsf_dma_stop(pipe, fifo); usbhsf_dma_unmap(pkt); usbhsf_fifo_unselect(pipe, pipe->fifo); |