usb: dwc3: gadget: Issue soft reset as part of composition switch
As part of composition switch, the device initiates
disconnect from the host by clearing the run/stop
bit of DCTL and initiates a connect by setting the run/stop bit.
But during this entire scenario the core is not reset
and there is a possibility of core caching the SETUP packets
from the previous session and giving this to the driver once the
run/stop bit is set leading to unintnented SETUP packets further
leading to stall on endpoint 0. This caused the endpoint 0 to
go into a bad state leading to enumeration failures.
Also, the databook clearly mentions that the soft reset has
to be issued before setting the run/stop bit to initialize a
conenct after a disconnect.
So, issue soft reset as part of composition switch to fix this
issue.
Change-Id: Id93bef710e7cdb67a6820cb4c9defecc5ad2a34e
Signed-off-by:
Sriharsha Allenki <sallenki@codeaurora.org>
Loading
Please register or sign in to comment