usb: dwc3: gadget: Update dwc->link_state after reset/disconnect
commit 417a775c (usb: dwc3: gadget: Ignore L1 RESUME events) changed the check in dwc3_gadget_is_suspended() to rely only on the tracking variable dwc->link_state, rather than actually reading from the equivalent HW register. However, this variable is only getting updated in the suspend & wakeup event handlers. Consequently, a SUSPEND preceding a DISCONNECT will leave this variable indicating LINK_STATE_U3, and a later re-connect will fail to enumerate, since function drivers will try to call dwc3_gadget_ep_queue(), see that is_suspended() is true, and will bail because of the -EAGAIN that's returned. Fix this by updating this link_state variable after the RESET and DISCONNECT events as well. Change-Id: I76558717661f749f715627a03b1e9298b941d0fb Signed-off-by:Jack Pham <jackp@codeaurora.org> [mattw@codeaurora.org: resolved trivial context conflict] Signed-off-by:
Matt Wagantall <mattw@codeaurora.org>
Loading
Please register or sign in to comment