usb: dwc3: gadget: don't issue End Transfer if we have started reqs
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 11 Apr 2018 07:32:52 +0000 (10:32 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:01:00 +0000 (10:01 +0300)
In case we have many started requests and one of them in the middle is
completed with Missed Isoc, let's not End Transfer as that would
result in us loosing (possibly) many more intervals.

Instead, let's allow the controller to go through its list of started
requests.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c

index 694e55c01f3aa1d78476550f0f1ad5a5275cac7b..e9e0e280543164f0bae66e3e83db2481c0b24b2f 100644 (file)
@@ -2398,7 +2398,9 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
 
        if (event->status & DEPEVT_STATUS_MISSED_ISOC) {
                status = -EXDEV;
-               stop = true;
+
+               if (list_empty(&dep->started_list))
+                       stop = true;
        }
 
        dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);