summaryrefslogtreecommitdiffstats
path: root/drivers/base/dma-mapping.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-06-18 22:42:09 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-06-21 23:20:20 +0200
commit6d0e0e84f66d32c33511984dd3badd32364b863c (patch)
tree215916af1632fbaff9d46676d14dafd52143d578 /drivers/base/dma-mapping.c
parentPM: Free memory bitmaps if opening /dev/snapshot fails (diff)
downloadlinux-6d0e0e84f66d32c33511984dd3badd32364b863c.tar.xz
linux-6d0e0e84f66d32c33511984dd3badd32364b863c.zip
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
Diffstat (limited to 'drivers/base/dma-mapping.c')
0 files changed, 0 insertions, 0 deletions