Commit 7d34eca
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 <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/252593
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Fabien DESSENNE <fabien.dessenne@foss.st.com>1 parent 85c7123 commit 7d34eca
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
1068 | 1070 | | |
1069 | 1071 | | |
1070 | 1072 | | |
| |||
1182 | 1184 | | |
1183 | 1185 | | |
1184 | 1186 | | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| |||
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
| 1240 | + | |
1240 | 1241 | | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | 1242 | | |
1246 | | - | |
| 1243 | + | |
| 1244 | + | |
1247 | 1245 | | |
1248 | 1246 | | |
1249 | 1247 | | |
| |||
0 commit comments