linux/drivers/base
Prasad Sodagudi bcbaadf442 UPSTREAM: PM: sleep: core: Avoid setting power.must_resume to false
There are variables(power.may_skip_resume and dev->power.must_resume)
and DPM_FLAG_MAY_SKIP_RESUME flags to control the resume of devices after
a system wide suspend transition.

Setting the DPM_FLAG_MAY_SKIP_RESUME flag means that the driver allows
its "noirq" and "early" resume callbacks to be skipped if the device
can be left in suspend after a system-wide transition into the working
state. PM core determines that the driver's "noirq" and "early" resume
callbacks should be skipped or not with dev_pm_skip_resume() function by
checking power.may_skip_resume variable.

power.must_resume variable is getting set to false in __device_suspend()
function without checking device's DPM_FLAG_MAY_SKIP_RESUME settings.
In problematic scenario, where all the devices in the suspend_late
stage are successful and some device can fail to suspend in
suspend_noirq phase. So some devices successfully suspended in suspend_late
stage are not getting chance to execute __device_suspend_noirq()
to set dev->power.must_resume variable to true and not getting
resumed in early_resume phase.

Add a check for device's DPM_FLAG_MAY_SKIP_RESUME flag before
setting power.must_resume variable in __device_suspend function.

Fixes: 6e176bf8d4 ("PM: sleep: core: Do not skip callbacks in the resume phase")
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Bug: 195393473
Change-Id: I641a7ba20cc14f6519e1869b4651cda894400274
(cherry picked from commit 4a9344cd0a)
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2021-09-15 15:25:30 +00:00
..
firmware_loader Char/Misc driver patches for 5.10-rc1 2020-10-15 10:01:51 -07:00
power UPSTREAM: PM: sleep: core: Avoid setting power.must_resume to false 2021-09-15 15:25:30 +00:00
regmap regmap: set debugfs_name to NULL after it is freed 2021-05-14 09:50:09 +02:00
test drivers/base: build kunit tests without structleak plugin 2021-03-17 17:06:24 +01:00
arch_topology.c ANDROID: topology: Add flag to indicate topology has been updated 2021-05-11 22:55:07 +00:00
attribute_container.c
base.h UPSTREAM: Revert "driver core: fw_devlink: Add support for batching fwnode parsing" 2021-01-21 18:01:50 -08:00
bus.c
cacheinfo.c
class.c
component.c
container.c
core.c FROMGIT: drivers: base: Reduce device link removal code duplication 2021-06-04 11:15:18 -07:00
cpu.c
dd.c Merge 5.10.30 into android12-5.10 2021-04-15 14:23:41 +02:00
devcoredump.c
devres.c
devtmpfs.c devtmpfs: fix placement of complete() call 2021-05-14 09:50:11 +02:00
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c drivers/base/memory: don't store phys_device in memory blocks 2021-03-17 17:06:25 +01:00
module.c
node.c node: fix device cleanups in error handling code 2021-05-14 09:50:19 +02:00
pinctrl.c
platform-msi.c
platform.c
property.c UPSTREAM: device property: Add fwnode_is_ancestor_of() and fwnode_get_next_parent_dev() 2021-01-21 18:04:03 -08:00
soc.c
swnode.c UPSTREAM: software node: Handle software node injection to an existing device properly 2021-08-27 12:26:09 -07:00
syscore.c Merge 3e4fb4346c ("Merge tag 'spdx-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx") into android-mailine 2020-10-26 07:05:05 +01:00
topology.c
transport_class.c