Re: [PATCH v2] usb: dwc3: gadget: check drained isoc ep
From: Thinh Nguyen
Date: Tue Apr 02 2024 - 19:19:17 EST
On Tue, Apr 02, 2024, Thinh Nguyen wrote:
> My concern here is for the case where transfer_in_flight == true and
I mean transfer_in_flight == false
> list_empty(started_list) == false. That means that the requests in the
> started_list are completed but are not given back to the gadget driver.
>
> Since they remained in the started_list, they will be resubmitted again
> on the next usb_ep_queue. We may send duplicate transfers right?
>
> You can try to cleanup requests in the started_list, but you need to be
> careful to make sure you're not out of sync with the transfer completion
> events and new requests from gadget driver.
>