usb: dwc3: gadget: Fix extra increment of busy_slot index
busy_slot points to first TRB slot which is owned by hardware.
It is incremented by driver when a REQ is completed or dequeued by
gadget. Due to a bug in driver, busy_slot is getting incremented
twice instead of once for a REQ in below scenario:
1. REQ is queued to hardware and it gets completed later (or dequeued).
2. Above REQ is submitted again to DCD but is not queued to hardware
(waiting for XFERNOTREADY). Later this REQ is dequeued before
receiving XFERNOTREADY. Due to the bug, busy_slot gets incremented
in this case as well even though REQ is not queued to HW.
Fix this by not incrementing busy_slot unless REQ is queued to hardware.
Change-Id: I69faa412dc5967aebec13462d9dbe984c72e506b
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2 files changed