linux-stable/drivers/dma/ti
Tony Lindgren 3e285a5c14 dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle
commit bacdcb6675 upstream.

Yegor Yefremov <yegorslists@googlemail.com> reported that musb and ftdi
uart can fail for the first open of the uart unless connected using
a hub.

This is because the first dma call done by musb_ep_program() must wait
if cppi41 is PM runtime suspended. Otherwise musb_ep_program() continues
with other non-dma packets before the DMA transfer is started causing at
least ftdi uarts to fail to receive data.

Let's fix the issue by waking up cppi41 with PM runtime calls added to
cppi41_dma_prep_slave_sg() and return NULL if still idled. This way we
have musb_ep_program() continue with PIO until cppi41 is awake.

Fixes: fdea2d09b9 ("dmaengine: cppi41: Add basic PM runtime support")
Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: stable@vger.kernel.org # v4.9+
Link: https://lore.kernel.org/r/20191023153138.23442-1-tony@atomide.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-06 13:06:21 +01:00
..
cppi41.c dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle 2019-11-06 13:06:21 +01:00
dma-crossbar.c dmaengine: ti: dma-crossbar: Fix a memory leak bug 2019-09-21 07:17:11 +02:00
edma.c dmaengine: ti: edma: Do not reset reserved paRAM slots 2019-10-05 13:09:54 +02:00
Kconfig
Makefile
omap-dma.c dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() 2019-09-21 07:17:11 +02:00