Re: [PATCH] dmaengine: stm32-dma: fix potential race between pause and resume

From: Vinod Koul
Date: Fri Nov 04 2022 - 10:44:21 EST


On 24-10-22, 10:36, Amelie Delaunay wrote:
> When disabling dma channel, a TCF flag is set and as TCIE is enabled, an
> interrupt is raised.
> On a busy system, the interrupt may have latency and the user can ask for
> dmaengine_resume while stm32-dma driver has not yet managed the complete
> pause (backup of registers to restore state in resume).
> To avoid such a case, instead of waiting the interrupt to backup the
> registers, do it just after disabling the channel and discard Transfer
> Complete interrupt in case the channel is paused.

Applied, thanks

--
~Vinod