linux/drivers/base
Ulf Hansson cbaab786ee PM / core: Propagate dev->power.wakeup_path when no callbacks
[ Upstream commit dc351d4c5f ]

The dev->power.direct_complete flag may become set in device_prepare() in
case the device don't have any PM callbacks (dev->power.no_pm_callbacks is
set). This leads to a broken behaviour, when there is child having wakeup
enabled and relies on its parent to be used in the wakeup path.

More precisely, when the direct complete path becomes selected for the
child in __device_suspend(), the propagation of the dev->power.wakeup_path
becomes skipped as well.

Let's address this problem, by checking if the device is a part the wakeup
path or has wakeup enabled, then prevent the direct complete path from
being used.

Reported-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ rjw: Comment cleanup ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:46:23 -07:00
..
firmware_loader firmware: Always initialize the fw_priv list object 2018-09-30 08:49:55 -07:00
power PM / core: Propagate dev->power.wakeup_path when no callbacks 2019-05-31 06:46:23 -07:00
regmap
test
arch_topology.c
attribute_container.c
base.h
bus.c kobject: return error code if writing /sys/.../uevent fails 2019-02-12 19:47:06 +01:00
cacheinfo.c cacheinfo: Keep the old value if of_property_read_u32 fails 2019-02-12 19:47:26 +01:00
class.c
component.c
container.c
core.c kobject: return error code if writing /sys/.../uevent fails 2019-02-12 19:47:06 +01:00
cpu.c x86/speculation/mds: Add sysfs reporting for MDS 2019-05-14 19:17:56 +02:00
dd.c driver core: Postpone DMA tear-down until after devres release for probe failure 2019-05-25 18:23:47 +02:00
devcon.c
devcoredump.c
devres.c devres: Align data[] to ARCH_KMALLOC_MINALIGN 2019-02-12 19:46:56 +01:00
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c memory_hotplug: fix kernel_panic on offline page processing 2018-09-04 16:45:02 -07:00
module.c
node.c mm: hide incomplete nr_indirectly_reclaimable in sysfs 2019-04-20 09:16:05 +02:00
pinctrl.c
platform-msi.c platform-msi: Free descriptors in platform_msi_domain_free() 2019-01-09 17:38:42 +01:00
platform.c
property.c
soc.c
syscore.c
topology.c
transport_class.c