Skip to content

Commit 4496846

Browse files
Marek Vasutbroonie
authored andcommitted
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>
1 parent d856f1e commit 4496846

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/spi/spi-mxs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
323323
if (!ret) {
324324
dev_err(ssp->dev, "DMA transfer timeout\n");
325325
ret = -ETIMEDOUT;
326+
dmaengine_terminate_all(ssp->dmach);
326327
goto err_vmalloc;
327328
}
328329

0 commit comments

Comments
 (0)