spi: dw-mid: clear ongoing DMA transfers on timeout
This patch shuts up any ongoing DMA transfer in case of error.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index c7c2fcc..d53cffe 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -432,6 +432,9 @@
{
struct dw_spi *dws = spi_master_get_devdata(master);
+ if (dws->dma_mapped)
+ dws->dma_ops->dma_stop(dws);
+
spi_reset_chip(dws);
}