Skip to content

Commit

Permalink
spi: mxs: Terminate DMA in case of DMA timeout
Browse files Browse the repository at this point in the history
In case the SPI DMA times out, the DMA might still be in some kind of
inconsistent state. Issue dmaengine_terminate_all() on the particular
channel to kill off all operations before continuing.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Marek Vasut authored and Mark Brown committed Oct 17, 2012
1 parent d856f1e commit 4496846
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
if (!ret) {
dev_err(ssp->dev, "DMA transfer timeout\n");
ret = -ETIMEDOUT;
dmaengine_terminate_all(ssp->dmach);
goto err_vmalloc;
}

Expand Down

0 comments on commit 4496846

Please sign in to comment.