Skip to content

Commit 73dcc66

Browse files
geertuVinod Koul
authored andcommitted
dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks
If serial console wake-up is enabled ("echo enabled > /sys/.../ttySC0/power/wakeup"), and any serial input is received while the system is suspended, serial port input no longer works after system resume. Note that: 1) The system can still be woken up using the serial console, 2) Serial port input keeps working if the system is woken up in some other way (e.g. Wake-on-LAN or gpio-keys), and no serial input was received while suspended. To fix this, replace SET_LATE_SYSTEM_SLEEP_PM_OPS() by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), as the callbacks installed by the former happen too early resp. late in the suspend resp. resume process. Reported-by: RVC test team via Yoshihiro Shimoda <[email protected]> Fixes: 1131b0a ("dmaengine: rcar-dmac: Make DMAC reinit during system resume explicit") Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 3e08162 commit 73dcc66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/sh/rcar-dmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,8 @@ static const struct dev_pm_ops rcar_dmac_pm = {
16861686
* - Wait for the current transfer to complete and stop the device,
16871687
* - Resume transfers, if any.
16881688
*/
1689-
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1690-
pm_runtime_force_resume)
1689+
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1690+
pm_runtime_force_resume)
16911691
SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume,
16921692
NULL)
16931693
};

0 commit comments

Comments
 (0)