usb: dwc3: gadget: Avoid unclocked access due to pm_runtime_get failure
If remote wakeup request is received during system resume where
resume_early is still processing, pm_runtime_get_sync returns -EACCES error
as pm_runtime framework is disabled between late_suspend and early_resume.
Due to failure of this API controller did not exit LPM. This leads to
unclocked access of registers as part of remote wakeup processing causing
target to crash.
Fix this by checking for return value of pm_runtime_get_sync, and queuing
dwc3_gadget_wakeup_work again with intermediate delay of 100ms for maximum
of 20 times.
Change-Id: I8e2215ef9ee708e86356622e85fd2f23a18f7944
Signed-off-by:
Tarun Gupta <tarung@codeaurora.org>
Loading
Please register or sign in to comment