diff options
author | Anton Bondarenko <anton.bondarenko.sama@gmail.com> | 2015-12-05 19:56:59 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-07 22:53:35 +0300 |
commit | e47b33c0765400d38ebaf57908f00abab2488f74 (patch) | |
tree | d4dd4000a017c9b07c82a06183ea8567e9a8771a /drivers/spi | |
parent | 9f6aa42bbbb23d2115704c5044da951a7e685cc5 (diff) | |
download | linux-e47b33c0765400d38ebaf57908f00abab2488f74.tar.xz |
spi: imx: terminate RX DMA transaction in case of TX DMA timeout
Not only TX DMA should be terminated, but RX DMA also. It's required
to avoid accidential DMA memory writes from RX DMA channel and properly
terminate transaction.
Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-imx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index e7e4f0c0f14d..d6dc66542811 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -968,6 +968,7 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx, dev_driver_string(&master->dev), dev_name(&master->dev)); dmaengine_terminate_all(master->dma_tx); + dmaengine_terminate_all(master->dma_rx); } else { timeout = wait_for_completion_timeout( &spi_imx->dma_rx_completion, IMX_DMA_TIMEOUT); |