From: Clark Wang Date: Tue, 2 Apr 2019 12:45:53 +0000 (+0000) Subject: spi: lpspi: add missing complete in abort func at dma mode X-Git-Tag: v5.2-rc1~173^2^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8863eca8c46affaa91ae35390b00358b925483eb;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 4de8eb378752b..2ad9d6262c2b7 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; }