usb: gadget: ci13xxx: Don't prime EP with finished TD
During ep_queue driver first adds the TD to the end of TD
list and then acquires the ATDTW hw_mutex to check EPSTAT.
Based on EP status driver may prime EP with new TD if needed.
There is a possibility that by the time driver checks for EP
status, hardware already finished this last TD. In this case
driver ends up priming the EP with finished TD without
checking for ACTIVE bit. Since, ACTIVE bit is cleared in this
case, hardware stops processing EP. This stall condition may
not recover if remaining TDs are queued back to back before
PRIME bit could get cleared and qH never gets updated with
ACTIVE TDs.
Change-Id: If8a33d4968519324d02780d4e8039549e03a2bb0
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment