usb: gadget: Give back request from ep_dequeue
Consider a case where DWC3_DEPCMD_ENDTRANSFER command times out,
then controller will not receive DWC3_DEPEVT_EPCMDCMPLT event and
request queued will not be given back to the function driver from
remove_requests. Now, if a function driver(e.g mass storage)
tries to dequeue the request, gadget driver will move the request
from started_list to cancelled_list but will not giveback the
request to function driver causing it to wait forever for the
transfer to be completed. This can lead the tasks to be in hung
state causing a crash.
Fix this by giving back the request from ep_dequeue by cleaning up
the cancelled requests.
Change-Id: I08b7a766d34992808260788a907054c835402c45
Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment