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

Commit 18b8f133 authored by Mayank Rana's avatar Mayank Rana
Browse files

dwc3_otg: Increment dwc3 PM usage count unconditionally



Commit b402fb7d9721f ("usb: dwc3-msm: Ignore multiple VBUS
notifications") increments dwc3 PM usage count only if usage
count is zero on receiving DWC3_EVENT_PHY_RESUME event.
dwc3_gadget_start() also increments and decrements PM usage
count which happens only when android gadget is binded with
UDC driver (happens only once at bootup time). With USB cable
connect case, sometime race condition is happening where
dwc3_gadget_start() has incremented usage count and notification
for DWC3_EVENT_PHY_RESUME is being received due to vbus event
before dwc3_gaget_start() has decremented usage count. Due to
this condition USB controller is going into Low Power mode which
results into no USB enumeration with connected host. Fix this
issue by incrementing dwc3 PM usage count unconditionally.

Change-Id: I07f1aadc117651e14c9a894ddcb3fd6dc9aeae40
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 28bbe02e
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