linux/drivers/base
Rafael J. Wysocki cc85b20780 PM / Domains: Fix handling of wakeup devices during system resume
During system suspend pm_genpd_suspend_noirq() checks if the given
device is in a wakeup path (i.e. it appears to be needed for one or
more wakeup devices to work or is a wakeup device itself) and if it
needs to be "active" for wakeup to work.  If that is the case, the
function returns 0 without incrementing the device domain's counter
of suspended devices and without executing genpd_stop_dev() for the
device.  In consequence, the device is not stopped (e.g. its clock
isn't disabled) and power is always supplied to its domain in the
resulting system sleep state.

However, pm_genpd_resume_noirq() doesn't repeat that check and it
runs genpd_start_dev() and decrements the domain's counter of
suspended devices even for the wakeup device that weren't stopped by
pm_genpd_suspend_noirq().  As a result, the start callback may be run
unnecessarily for them and their domains' counters of suspended
devices may become negative.  Both outcomes aren't desirable, so fix
pm_genpd_resume_noirq() to look for wakeup devices that might not be
stopped by during system suspend.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Simon Horman <horms@verge.net.au>
Cc: stable@vger.kernel.org
2012-03-16 21:44:41 +01:00
..
power PM / Domains: Fix handling of wakeup devices during system resume 2012-03-16 21:44:41 +01:00
regmap regmap: Reset cache status when reinitialsing the cache 2012-01-20 13:49:30 +00:00
attribute_container.c [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init 2010-03-27 15:15:24 -04:00
base.h cpu: Do not return errors from cpu_dev_init() which will be ignored 2012-01-11 15:49:43 -08:00
bus.c kernel-doc: fix new warnings in driver-core 2012-01-24 10:47:41 -08:00
class.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
core.c base/core.c:fix typo in comment in function device_add 2012-01-24 10:47:42 -08:00
cpu.c cpu: Register a generic CPU device on architectures that currently do not 2012-01-11 15:50:11 -08:00
dd.c drivers: base: print rejected matches with DEBUG_DRIVER 2011-09-26 16:21:15 -07:00
devres.c devres: Fix a typo in devm_kfree comment 2011-12-21 00:31:47 +01:00
devtmpfs.c Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
dma-buf.c dma-buf: Introduce dma buffer sharing mechanism 2012-01-06 10:20:21 +00:00
dma-coherent.c drivers/base: dma-coherent.c is a module and needs module.h 2011-10-31 19:31:38 -04:00
dma-mapping.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
driver.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
firmware_class.c PM / Sleep: Fix read_unlock_usermodehelper() call. 2012-01-23 21:59:08 +01:00
firmware.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
hypervisor.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
Kconfig dma-buf: drop option text so users don't select it. 2012-01-13 09:05:14 +00:00
Makefile driver core: remove drivers/base/sys.c and include/linux/sysdev.h 2012-01-22 14:31:15 -07:00
map.c
memory.c kdump: add udev events for memory online/offline 2012-01-12 20:13:11 -08:00
module.c driver core: module.c: Use kasprintf 2010-05-21 09:37:29 -07:00
node.c Merge branch 'driver-core-next' into Linux 3.2 2012-01-06 11:42:52 -08:00
platform.c Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c drivers/base: transport_class explicitly requires EXPORT_SYMBOL 2011-10-31 19:31:15 -04:00