]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 12:54:01 +0000 (06:54 -0600)
commitca0c8aeee4462f815dc18d128f6e59eee9eae1cb
tree1ac167dc199c128023bcd88534a3d5849d022370
parentba3b4dd5c2d9ca6109770c95358a44afb1e27acd
PM / sleep: Clear pm_suspend_global_flags upon hibernate

BugLink: http://bugs.launchpad.net/bugs/1572722
commit 276142730c39c9839465a36a90e5674a8c34e839 upstream.

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: ef25ba047601 (PM / sleep: Add flags to indicate platform firmware involvement)
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
kernel/power/hibernate.c