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

Carlos Song (OSS) posted 2 patches 2 weeks ago
drivers/spi/spi-fsl-lpspi.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
[PATCH v3 0/2] spi: fsl-lpspi: fix DMA termination issues
Posted by Carlos Song (OSS) 2 weeks ago
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: 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
Re: [PATCH v3 0/2] spi: fsl-lpspi: fix DMA termination issues
Posted by Mark Brown 1 week ago
On Mon, 25 May 2026 14:23:55 +0800, Carlos Song (OSS) wrote:
> spi: fsl-lpspi: fix DMA termination issues
> 
> 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().
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.2

Thanks!

[1/2] spi: fsl-lpspi: replace dmaengine_terminate_all() with dmaengine_terminate_sync()
      https://git.kernel.org/broonie/spi/c/e703ce47691b
[2/2] spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
      https://git.kernel.org/broonie/spi/c/01980b5da56e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark