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

Skip to content
Commit 23bafa2f authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: phy-msm-usb: Avoid race b/w sm_work and set_suspend



OTG's set_suspend routine is used by host controller (EHCI)
driver to suspend or resume USB OTG/PHY hardware from its
runtime suspend/resume callbacks. OTG set_suspend routine
uses sm_workqueue to put hardware in LPM (or suspend it).
As there is no synchronization between sm_work and
set_suspend, this results in both racing with each other.
Sometimes with fast back to back set_suspend calls, PHY LPM
state goes out of sync than what requested by host driver.
Fix this by flushing work from set_suspend to complete
event processing by sm_work.

CRs-fixed: 654489
Change-Id: I5e0bfa3bc6c12af23fd26b2496c7ee5b7fc1488e
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 1e733ca9
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