From 4d5ac1edfdd79aea31983333cb53dd5db29559f9 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 9 Mar 2015 16:48:48 +0200 Subject: 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 Signed-off-by: Mark Brown --- drivers/spi/spi-dw.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/spi/spi-dw.c') diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index c7c2fcc2b58e..d53cffe7ff22 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -432,6 +432,9 @@ static void dw_spi_handle_err(struct spi_master *master, { struct dw_spi *dws = spi_master_get_devdata(master); + if (dws->dma_mapped) + dws->dma_ops->dma_stop(dws); + spi_reset_chip(dws); } -- cgit v1.2.3