DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/4] dmaengine: stm32-dma3: fix IRQ flag race and linked-list handling
@ 2026-11-20  9:18 Amelie Delaunay
  2026-11-20  9:18 ` [PATCH 1/4] dmaengine: stm32-dma3: clear flags before signaling transfer completion Amelie Delaunay
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Amelie Delaunay @ 2026-11-20  9:18 UTC (permalink / raw)
  To: Vinod Koul, Frank Li, Maxime Coquelin, Alexandre Torgue
  Cc: dmaengine, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Jerome Audu, stable

This series fixes issues in the STM32 DMA3 driver around transfer
completion and linked-list (LL) handling, plus a related cleanup.

- Patch 1: clear channel flags before handling completion, so the
  Transfer Complete flag of a new transfer started from the completion
  path is no longer cleared, which could lead to a timeout.
- Patch 2: write the LL base address (CxLBAR) when starting a transfer
  rather than at allocation, as other transfers prepared in between could
  change it.
- Patch 3: reject linked lists spanning several 64 KiB windows, since
  CLBAR provides the common upper address bits. Lists may now fail to be
  prepared when crossing a 64KiB boundary, which is preferable to
  the hardware fetching descriptors from the wrong addresses.
- Patch 4: cleanup, derive the descriptor size from the structure and
  correct the maximum descriptor count to (CLLR_LA / size) + 1.

Patches 1 to 3 fix issues present since the driver was introduced and
are marked for stable.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
Amelie Delaunay (3):
      dmaengine: stm32-dma3: set LL base address when transfer starts
      dmaengine: stm32-dma3: validate LLI pool allocations and fix cleanup
      dmaengine: stm32-dma3: replace hardcoded LLI size with aligned descriptor size

Jerome Audu (1):
      dmaengine: stm32-dma3: clear flags before signaling transfer completion

 drivers/dma/stm32/stm32-dma3.c | 78 ++++++++++++++++++++++++++----------------
 1 file changed, 49 insertions(+), 29 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261119-dma3-fixes-d6c3ee1dada0

Best regards,
--  
Amelie Delaunay <amelie.delaunay@foss.st.com>


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

end of thread, other threads:[~2026-11-20 18:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20  9:18 [PATCH 0/4] dmaengine: stm32-dma3: fix IRQ flag race and linked-list handling Amelie Delaunay
2026-11-20  9:18 ` [PATCH 1/4] dmaengine: stm32-dma3: clear flags before signaling transfer completion Amelie Delaunay
2026-11-20 17:48   ` Frank Li
2026-11-20  9:18 ` [PATCH 2/4] dmaengine: stm32-dma3: set LL base address when transfer starts Amelie Delaunay
2026-11-20 17:51   ` Frank Li
2026-11-20  9:18 ` [PATCH 3/4] dmaengine: stm32-dma3: validate LLI pool allocations and fix cleanup Amelie Delaunay
2026-11-20  9:24   ` sashiko-bot
2026-11-20 18:02   ` Frank Li
2026-11-20  9:18 ` [PATCH 4/4] dmaengine: stm32-dma3: replace hardcoded LLI size with aligned descriptor size Amelie Delaunay
2026-11-20 18:05   ` Frank Li

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