usb: dwc3-msm: Handle erratic event with full POR sequence
The current handling of erratic errors that occur in peripheral
mode does so by scheduling a block reset. Since this occurs
asynchronously, additional changes needed to be made to ensure
the device controller would not generate spurious events or
try to access any registers while the reset was in progress
and the clocks were off. Even after that, the controller would
still not be functional until a cable reconnect since the block
reset routine did not do anything to re-establish the peripheral
session.
Instead, improve the erratic error handling to simulate a
cable disconnection-reconnection sequence. The forced disconnect
should solve issues related to post-error events as well as
prevent any function drivers from continuing to issue endpoint
commands. This is followed with the controller entering low
power mode. If the cable is still physically connected, then
invoke a reconnection which does the full reset and power-on
initialization sequence that is more complete than the current
block reset. The USB session would then get re-enumerated.
Change-Id: I45ccb30ff12064e5410d45c423a404d97b299022
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment