Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dmaengine: stm32-dma: fix potential race between pause and resume
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. Change-Id: I8d07cd3a2cbb9ff3056b104fea6cab10d90c32fd Signed-off-by: Amelie Delaunay <[email protected]> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/252593 Reviewed-by: CITOOLS <[email protected]> Reviewed-by: Fabien DESSENNE <[email protected]>
- Loading branch information