提交 44968466 编写于 作者: M Marek Vasut 提交者: Mark Brown

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: NMarek Vasut <marex@denx.de>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 d856f1eb
...@@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs, ...@@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
if (!ret) { if (!ret) {
dev_err(ssp->dev, "DMA transfer timeout\n"); dev_err(ssp->dev, "DMA transfer timeout\n");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
dmaengine_terminate_all(ssp->dmach);
goto err_vmalloc; goto err_vmalloc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册