linux/drivers/base/power
Alan Stern 6d0e0e84f6 PM: Fix async resume following suspend failure
The PM core doesn't handle suspend failures correctly when it comes to
asynchronously suspended devices.  These devices are moved onto the
dpm_suspended_list as soon as the corresponding async thread is
started up, and they remain on the list even if they fail to suspend
or the sleep transition is cancelled before they get suspended.  As a
result, when the PM core unwinds the transition, it tries to resume
the devices even though they were never suspended.

This patch (as1474) fixes the problem by adding a new "is_suspended"
flag to dev_pm_info.  Devices are resumed only if the flag is set.

[rjw:
 * Moved the dev->power.is_suspended check into device_resume(),
   because we need to complete dev->power.completion and clear
   dev->power.is_prepared too for devices whose
   dev->power.is_suspended flags are unset.
 * Fixed __device_suspend() to avoid setting dev->power.is_suspended
   if async_error is different from zero.]

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
2011-06-21 23:20:20 +02:00
..
clock_ops.c PM / Runtime: Fix loops in pm_runtime_clk_notify() 2011-06-07 23:34:58 +02:00
generic_ops.c PM: Introduce generic prepare and complete callbacks for subsystems 2011-05-17 23:26:21 +02:00
main.c PM: Fix async resume following suspend failure 2011-06-21 23:20:20 +02:00
Makefile PM: Remove CONFIG_PM_VERBOSE 2011-05-17 23:25:10 +02:00
opp.c PM / OPP: opp_find_freq_exact() documentation fix 2011-03-15 00:43:17 +01:00
power.h PM: Do not create wakeup sysfs files for devices that cannot wake up 2011-03-15 00:43:14 +01:00
runtime.c PM: Make power domain callbacks take precedence over subsystem ones 2011-04-29 00:35:50 +02:00
sysfs.c PM / Wakeup: Fix build warning related to the "wakeup" sysfs file 2011-05-17 23:19:18 +02:00
trace.c PM: Use appropriate printk() priority level in trace.c 2011-03-15 00:43:14 +01:00
wakeup.c PM / Wakeup: Remove useless synchronize_rcu() call 2011-05-17 23:19:19 +02:00