Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b61d5608 authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3: gadget: Update dwc->link_state after reset/disconnect



commit 9a5e551d (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: default avatarJack Pham <jackp@codeaurora.org>
parent 17dc38a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment