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

Skip to content
Commit 49c45e0b authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3: gadget: Clear pending events when stopping controller



Just prior to stopping the controller, we may have issued stop
transfer commands to any endpoints with any pending transfers.
This will result in EP Command Complete events being generated.
However, as per the Databook, the controller will not assert the
halt status bit after clearing the run/stop bit if there are any
pending events in the GEVNTCOUNT(n) registers, so this results
in a timeout error. Fix this by simply clearing GEVNTCOUNT(n)
by reading and writing back the counts.

Change-Id: I2fd0b161b08048072aa7fcea8c636662bcd76bd4
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 46a8ee9f
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