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>
This commit is contained in:
Andy Shevchenko
2015-03-09 16:48:48 +02:00
committed by Mark Brown
parent f051fc8f11
commit 4d5ac1edfd
3 changed files with 17 additions and 0 deletions

View File

@@ -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);
}