aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2023-05-12 13:33:13 +0300
committerMark Brown <[email protected]>2023-05-15 10:20:57 +0900
commit3de975862f985f1c9e225a0d13aa3d501373f7c3 (patch)
treeb12974f8b95999d5f7690dc0b18af502551b6b00 /drivers/fpga/fpga-mgr.c
parentf63550e2b165208a2f382afcaf5551df9569e1d4 (diff)
ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions
When a firmware IPC error happens during a pm_runtime suspend, we ignore the error and suspend anyways. However, the code unconditionally increases the runtime_pm counter. This results in a confusing configuration where the code will suspend, resume but never suspend again due to the use of pm_runtime_get_noresume(). The intent of the counter increase was to prevent entry in D3, but if that transition to D3 is already started it cannot be stopped. In addition, there's no point in that case in trying to prevent anything, the firmware error is handled and the next resume will re-initialize the firmware completely. This patch changes the logic to prevent suspend when the device is pm_runtime active and has a use_count > 0. Signed-off-by: Pierre-Louis Bossart <[email protected] Reviewed-by: Daniel Baluta <[email protected] Reviewed-by: Ranjani Sridharan <[email protected] Signed-off-by: Peter Ujfalusi <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions