diff options
author | Marek Vasut <marex@denx.de> | 2012-10-14 04:32:56 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-17 16:11:09 +0900 |
commit | 44968466cfb969f960dbe422bbc785117f497729 (patch) | |
tree | dac3135460d2fa8dc0a07ff0e38b678812050c40 /drivers/spi | |
parent | d856f1eb56ae3d935fb502441aa37b650aeba683 (diff) | |
download | linux-44968466cfb969f960dbe422bbc785117f497729.tar.gz linux-44968466cfb969f960dbe422bbc785117f497729.tar.bz2 linux-44968466cfb969f960dbe422bbc785117f497729.zip |
spi: mxs: Terminate DMA in case of DMA timeout
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-mxs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 5a63bcd7a23d..86dd04d6bc87 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -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; } |