Re: [PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback
From: Keguang Zhang
Date: Thu Oct 29 2026 - 08:17:45 EST
On Wed, Oct 28, 2026 at 2:43 AM James Hilliard
<james.hilliard1@xxxxxxxxx> 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/loongson/loongson1-apb-dma.c | 7 +------
Reviewed-by: Keguang Zhang <keguang.zhang@xxxxxxxxx> # loongson1, virt-dma
--
Best regards,
Keguang Zhang