usb: dwc3: gadget: Check if suspended in dwc3_thread_interrupt
Since dwc3_thread_interrupt is part of interrupt handling that
can be scheduled to run in thread context, it leaves open a
window in which the controller might be placed into low power
mode. In this state, clocks would be disabled, and by the time
dwc3_thread_interrupt runs, would result in an unclocked I/O
access when it tries to write to the GEVNTCOUNT register.
Prevent this by checking PM runtime status and simply bail out
if the core is suspended. When the controller next comes out
of low power mode, it is presumably restarting the gadget
and would reset the event buffers.
CRs-fixed: 609233
Change-Id: I4bee4de6fd4c1650051df82b676a5b2a6d6d5b43
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment