* [PATCH] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks
@ 2018-03-29 16:53 Geert Uytterhoeven
2018-04-04 5:54 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2018-03-29 16:53 UTC (permalink / raw)
To: Vinod Koul
Cc: Dan Williams, Ulf Hansson, Rafael J . Wysocki, Yoshihiro Shimoda,
Kuninori Morimoto, Niklas Söderlund, dmaengine,
linux-renesas-soc, linux-pm, linux-kernel, Geert Uytterhoeven
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 <yoshihiro.shimoda.uh@renesas.com>
Fixes: 1131b0a4af911de5 ("dmaengine: rcar-dmac: Make DMAC reinit during system resume explicit")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This is a fix for a regression introduced in v4.16-rc1.
---
drivers/dma/sh/rcar-dmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index b10bf71ef5ae2b34..386894fa9ecaa2f1 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1686,8 +1686,8 @@ static const struct dev_pm_ops rcar_dmac_pm = {
* - Wait for the current transfer to complete and stop the device,
* - Resume transfers, if any.
*/
- SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
- pm_runtime_force_resume)
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume,
NULL)
};
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks
2018-03-29 16:53 [PATCH] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks Geert Uytterhoeven
@ 2018-04-04 5:54 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-04-04 5:54 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Dan Williams, Ulf Hansson, Rafael J . Wysocki, Yoshihiro Shimoda,
Kuninori Morimoto, Niklas Söderlund, dmaengine,
linux-renesas-soc, linux-pm, linux-kernel
On Thu, Mar 29, 2018 at 06:53:32PM +0200, Geert Uytterhoeven wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-04 5:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 16:53 [PATCH] dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks Geert Uytterhoeven
2018-04-04 5:54 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).