]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PM / sleep: Handle failures in device_suspend_late() consistently
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 20 May 2016 21:09:49 +0000 (23:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:14:37 +0000 (18:14 -0700)
commit98c28450538d0a191d031cce8852e568b62a1127
tree66dca65214907d6b49b9a01f65526be9a23e2993
parent8b8de1c9295cafcc9a9b85b3287acac7d948fb63
PM / sleep: Handle failures in device_suspend_late() consistently

commit 3a17fb329da68cb00558721aff876a80bba2fdb9 upstream.

Grygorii Strashko reports:

 The PM runtime will be left disabled for the device if its
 .suspend_late() callback fails and async suspend is not allowed
 for this device. In this case device will not be added in
 dpm_late_early_list and dpm_resume_early() will ignore this
 device, as result PM runtime will be disabled for it forever
 (side effect: after 8 subsequent failures for the same device
 the PM runtime will be reenabled due to disable_depth overflow).

To fix this problem, add devices to dpm_late_early_list regardless
of whether or not device_suspend_late() returns errors for them.

That will ensure failures in there to be handled consistently for
all devices regardless of their async suspend/resume status.

Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/main.c