[PATCH v2 0/2] spi: fsl-lpspi: fix DMA termination issues

From: Carlos Song (OSS)

Date: Wed May 20 2026 - 05:53:13 EST


From: Carlos Song <carlos.song@xxxxxxx>

This series fixes two issues in the fsl-lpspi DMA transfer error paths.

Patch 1 replaces the deprecated dmaengine_terminate_all() with
dmaengine_terminate_sync() across all error paths in
fsl_lpspi_dma_transfer().

Patch 2 fixes a missing RX DMA channel termination when TX descriptor
preparation fails. Since the RX channel is already submitted and issued
before the TX descriptor is prepared, returning -EINVAL without
terminating the RX channel leaves it running against buffers that the
SPI core will unmap, potentially causing memory corruption.

Carlos Song (2):
spi: fsl-lpspi: replace dmaengine_terminate_all with
dmaengine_terminate_sync
spi: fsl-lpspi: fix missing RX DMA termination on TX prepare failure

drivers/spi/spi-fsl-lpspi.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

--
2.43.0