linux/drivers/base
Rafael J. Wysocki 34da25dd21 UPSTAREM: PM: runtime: Update device status before letting suppliers suspend
Because the PM-runtime status of the device is not updated in
__rpm_callback(), attempts to suspend the suppliers of the given
device triggered by rpm_put_suppliers() called by it may fail.

Fix this by making __rpm_callback() update the device's status to
RPM_SUSPENDED before calling rpm_put_suppliers() if the current
status of the device is RPM_SUSPENDING and the callback just invoked
by it has returned 0 (success).

While at it, modify the code in __rpm_callback() to always check
the device's PM-runtime status under its PM lock.

Change-Id: I801d91afcace8fb70fa92b447d8641cd0cd2b0cc
Link: https://lore.kernel.org/linux-pm/CAPDyKFqm06KDw_p8WXsM4dijDbho4bb6T4k50UqqvR1_COsp8g@mail.gmail.com/
Fixes: 21d5c57b37 ("PM / runtime: Use device links")
Reported-by: Elaine Zhang <zhangqing@rock-chips.com>
Diagnosed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Elaine Zhang <zhangiqng@rock-chips.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 44cc89f764)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-03-09 20:35:02 +08:00
..
firmware_loader This is the 4.19.116 stable release 2020-04-18 13:33:51 +02:00
memory_group_manager Add memory_group_manager introduced by Bifrost DDK r20p0-01rel0 2019-10-15 10:10:21 +08:00
power UPSTAREM: PM: runtime: Update device status before letting suppliers suspend 2021-03-09 20:35:02 +08:00
regmap This is the 4.19.168 stable release 2021-01-17 15:40:58 +01:00
test
arch_topology.c
attribute_container.c
base.h Merge tag 'ASB-2020-12-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-12-29 16:10:48 +08:00
bus.c UPSTREAM: driver core: Probe devices asynchronously instead of the driver 2020-03-23 10:28:09 +08:00
cacheinfo.c drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT 2019-07-21 09:03:03 +02:00
class.c
component.c component: Silence bind error on -EPROBE_DEFER 2020-05-27 17:37:33 +02:00
container.c
core.c Merge tag 'ASB-2021-02-05_4.19-stable' of https://android.googlesource.com/kernel/common 2021-02-26 15:30:04 +08:00
cpu.c This is the 4.19.128 stable release 2020-06-11 09:16:29 +02:00
dd.c Merge tag 'ASB-2020-12-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-12-29 16:10:48 +08:00
devcon.c
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig cma: decrease CMA_ALIGNMENT lower limit to 0 2020-12-08 20:40:46 +08:00
Makefile Add memory_group_manager introduced by Bifrost DDK r20p0-01rel0 2019-10-15 10:10:21 +08:00
map.c
memory.c mm/memory_hotplug: fix try_offline_node() 2020-01-29 16:43:27 +01:00
module.c
node.c This is the 4.19.150 stable release 2020-10-07 08:45:35 +02:00
pinctrl.c
platform-msi.c
platform.c Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
property.c
soc.c ANDROID: GKI: drivers: base: soc: export symbols for socinfo 2020-04-10 18:15:14 -07:00
syscore.c
topology.c
transport_class.c