Commit 86bacfa156ece31016c3b380b73c4cc3c062b273
1 parent
94ce880ba7
Exists in
smarc_8mm_imx_4.14.98_2.0.0_ga
and in
4 other branches
MLK-21313 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 in some situations. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit a19a00c51df5c3ead4d64ea3136f5bce60b2e6af)
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
drivers/spi/spi-fsl-lpspi.c
... | ... | @@ -486,7 +486,12 @@ |
486 | 486 | spi_controller_get_devdata(controller); |
487 | 487 | |
488 | 488 | fsl_lpspi->slave_aborted = true; |
489 | - complete(&fsl_lpspi->xfer_done); | |
489 | + if (!fsl_lpspi->usedma) | |
490 | + complete(&fsl_lpspi->xfer_done); | |
491 | + else { | |
492 | + complete(&fsl_lpspi->dma_tx_completion); | |
493 | + complete(&fsl_lpspi->dma_rx_completion); | |
494 | + } | |
490 | 495 | return 0; |
491 | 496 | } |
492 | 497 |