usb: ep0: complete the pending control request before soft-disconnect
We abort the control request enqueue during a device initiated disconnect
as soon as the softconnect flag gets cleared. Whenever there is a race
between a control request and soft disconnect, the pending control
request is aborted before dwc3_gadget_pullup() function tries to
complete it. As a result the subsequent soft reconnect fails resulting
in usb connection loss. Avoid this by deciding the enqueue() operation
based on pullups_connected flag which gets cleared after completing the
pending request and putting the core in setup phase.
Change-Id: Ie21ecead7ed73569a426cd8bac586a5576c72993
Signed-off-by:
Elson Roy Serrao <eserrao@codeaurora.org>
Loading
Please register or sign in to comment