mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
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>
This commit is contained in:
parent
9f6aa42bbb
commit
e47b33c076
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue