mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] spi: fsl-lpspi: fix DMA termination issues
@ 2026-05-20  9:43 Carlos Song (OSS)
  2026-05-20  9:43 ` [PATCH v2 1/2] spi: fsl-lpspi: replace dmaengine_terminate_all with dmaengine_terminate_sync Carlos Song (OSS)
  2026-05-20  9:43 ` [PATCH v2 2/2] spi: fsl-lpspi: fix missing RX DMA termination on TX prepare failure Carlos Song (OSS)
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Song (OSS) @ 2026-05-20  9:43 UTC (permalink / raw)
  To: Frank.Li, broonie, xiaoning.wang, Fugang.duan
  Cc: linux-spi, imx, linux-kernel, Carlos Song

From: Carlos Song <carlos.song@nxp.com>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-20 16:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-20  9:43 [PATCH v2 0/2] spi: fsl-lpspi: fix DMA termination issues Carlos Song (OSS)
2026-05-20  9:43 ` [PATCH v2 1/2] spi: fsl-lpspi: replace dmaengine_terminate_all with dmaengine_terminate_sync Carlos Song (OSS)
2026-05-20 16:52   ` Frank Li
2026-05-20  9:43 ` [PATCH v2 2/2] spi: fsl-lpspi: fix missing RX DMA termination on TX prepare failure Carlos Song (OSS)
2026-05-20 16:57   ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®