USB: phy: Dont flush work from set suspend during runtime idle
Race condition may occur if set suspend is waiting
for sm work to finish from runtime idle but OTG cable
is disconnected. As part of disconnect, sm work removes
hcd which inturn it is waiting for pm framework to finish
the previous runtime idle processing.
Dont flush the work, as there is no guarantee that when
OTG state machine runs, OTG cable would remain
connected. Instead wait for USB in LPM or ID float
and bail out waiting in set suspend. Also a timeout
of 2 second will bring the wait state. This way we
make sure that no such race condition would occur.
CRs-Fixed: 786472
Change-Id: I16516cd1864587f017b54907e9c41aaa384a240f
Signed-off-by:
Sujeet Kumar <ksujeet@codeaurora.org>
Loading
Please register or sign in to comment