Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ba47d7d9 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma Committed by Stephen Boyd
Browse files

mmc: msm_sdcc: Fix deadlock while resuming sdcc from userspace



The runtime power management of sdcc can be controlled by
userspace with auto/on modes by writing into
/sys/devices/platform/msm_sdcc.1/power/control entry.
"auto" mode allows runtime pm suspend to happen.
"on" mode forbids runtime suspend of sdcc and also take care
of resuming the device if already suspended. During this resume
process there is a deadlock as described below:

o User writes "on" into control parameter.

o The sysfs write triggers a rpm_resume() (assume sdcc is
  already suspended, hence rpm_resume() tries to wake it up).

o rpm_resume() -> msmsdcc_runtime_resume() -> mmc_claim_host()
  -> msmsdcc_enable() -> pm_runtime_get_sync() -> rpm_resume()
  -> wait for previous rpm_resume() completion which cause deadlock.

CRs-Fixed: 372071
Change-Id: I0f666b56b6db98b182b8fc828588b476fd4eef6a
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 41defcfa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment