Commit 0c9c1ea
serial: sh-sci: let timeout timer only run when DMA is scheduled
The hrtimer for RXDMA timeout was unconditionally restarted in the RXDMA
complete handler ignoring the fact that setting up DMA may fail and PIO
is used instead. Explicitly stop the timer when DMA is completed and
only restart it when setting up DMA was successful. This makes the
intention of the timer much clearer, the driver easier to understand and
simplifies assumptions about the timer. The latter avoids race
conditions if these assumptions were not met or confused.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240506114016.30498-9-wsa+renesas@sang-engineering.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8efc440 commit 0c9c1ea
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
| 1327 | + | |
| 1328 | + | |
1327 | 1329 | | |
1328 | 1330 | | |
1329 | 1331 | | |
1330 | 1332 | | |
1331 | 1333 | | |
1332 | 1334 | | |
1333 | | - | |
1334 | | - | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | 1337 | | |
| |||
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1357 | 1360 | | |
1358 | 1361 | | |
1359 | 1362 | | |
| |||
0 commit comments