Re: [PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback

From: Amelie Delaunay

Date: Wed Oct 28 2026 - 11:19:16 EST


On 10/27/26 19:22, James Hilliard wrote:
Several virt-dma drivers implement device_synchronize with a wrapper that
only converts the DMA channel and calls vchan_synchronize(). Provide
vchan_dma_synchronize() with the DMAengine callback signature so these
drivers can assign it directly.

Document the requirement to stop the channel and prevent new callbacks
before synchronization, and the context in which the callback wait may
run. Replace the equivalent wrappers in the existing drivers with the
shared helper, preserving their callback-wait and descriptor-cleanup
behavior.

Suggested-by: Frank Li<Frank.li@xxxxxxxxxxx>
Signed-off-by: James Hilliard<james.hilliard1@xxxxxxxxx>
---
drivers/dma/stm32/stm32-dma.c | 9 +--------
drivers/dma/stm32/stm32-dma3.c | 9 +--------
drivers/dma/stm32/stm32-mdma.c | 9 +--------
drivers/dma/virt-dma.h | 15 +++++++++++++++

Reviewed-by: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx> # stm32, virt-dma

Regards,
Amelie