diff options
author | Clark Wang <xiaoning.wang@nxp.com> | 2019-04-02 15:45:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-04-03 07:32:26 +0300 |
commit | 8863eca8c46affaa91ae35390b00358b925483eb (patch) | |
tree | 04857a63b8868ff681b57a4f6d7c59c41c34eb09 | |
parent | 703b476695237dda54233d2dadb37d2d49de23cf (diff) | |
download | linux-8863eca8c46affaa91ae35390b00358b925483eb.tar.xz |
spi: lpspi: add missing complete in abort func at dma mode
Add the missing complete operations for dma_completion to fix the
problem of blocking at the wait_for_completion_interruptible()
function when use spi_slave_abort().
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-fsl-lpspi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 4de8eb378752..2ad9d6262c2b 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -482,7 +482,13 @@ static int fsl_lpspi_slave_abort(struct spi_controller *controller) spi_controller_get_devdata(controller); fsl_lpspi->slave_aborted = true; - complete(&fsl_lpspi->xfer_done); + if (!fsl_lpspi->usedma) + complete(&fsl_lpspi->xfer_done); + else { + complete(&fsl_lpspi->dma_tx_completion); + complete(&fsl_lpspi->dma_rx_completion); + } + return 0; } |