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

From: Carlos Song (OSS)

Date: Mon May 25 2026 - 02:22:50 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: terminate the RX channel on TX prepare failure path

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

--
2.43.0