]> git.baikalelectronics.ru Git - kernel.git/commit
PM / sleep: Clear pm_suspend_global_flags upon hibernate
authorLukas Wunner <lukas@wunner.de>
Tue, 22 Mar 2016 23:11:20 +0000 (00:11 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Mar 2016 01:43:11 +0000 (02:43 +0100)
commitc33b8ffc84523d1e5fb0f5ac61a2cb4f6b3b61c1
tree5e0cf4bb7fd8a00f16dc5956c701e1a63a1c6c91
parentf9de6760790c06781fd1d52d0f55271241cd5368
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: 1d8c2fd2ddbf (PM / sleep: Add flags to indicate platform firmware involvement)
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/hibernate.c