提交 27614273 编写于 作者: L Lukas Wunner 提交者: Rafael J. Wysocki

PM / sleep: Clear pm_suspend_global_flags upon hibernate

When suspending to RAM, waking up and later suspending to disk,
we gratuitously runtime resume devices after the thaw phase.
This does not occur if we always suspend to RAM or always to disk.

pm_complete_with_resume_check(), which gets called from
pci_pm_complete() among others, schedules a runtime resume
if PM_SUSPEND_FLAG_FW_RESUME is set. The flag is set during
a suspend-to-RAM cycle. It is cleared at the beginning of
the suspend-to-RAM cycle but not afterwards and it is not
cleared during a suspend-to-disk cycle at all. Fix it.

Fixes: ef25ba04 (PM / sleep: Add flags to indicate platform firmware involvement)
Signed-off-by: NLukas Wunner <lukas@wunner.de>
Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 22e09b33
...@@ -339,6 +339,7 @@ int hibernation_snapshot(int platform_mode) ...@@ -339,6 +339,7 @@ int hibernation_snapshot(int platform_mode)
pm_message_t msg; pm_message_t msg;
int error; int error;
pm_suspend_clear_flags();
error = platform_begin(platform_mode); error = platform_begin(platform_mode);
if (error) if (error)
goto Close; goto Close;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册