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

Commit 13672aa0 authored by Jack Pham's avatar Jack Pham Committed by Matt Wagantall
Browse files

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: default avatarJack Pham <jackp@codeaurora.org>
[mattw@codeaurora.org: resolved trivial context conflict]
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 37bfb3c4
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