* errors which will force us issue EndTransfer command.
*/
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
+ if (!(dep->flags & DWC3_EP_PENDING_REQUEST) &&
+ !(dep->flags & DWC3_EP_TRANSFER_STARTED))
+ return 0;
+
if ((dep->flags & DWC3_EP_PENDING_REQUEST)) {
- if (dep->flags & DWC3_EP_TRANSFER_STARTED) {
- dwc3_stop_active_transfer(dep, true);
- dep->flags = DWC3_EP_ENABLED;
- } else {
+ if (!(dep->flags & DWC3_EP_TRANSFER_STARTED)) {
__dwc3_gadget_start_isoc(dep);
- dep->flags &= ~DWC3_EP_PENDING_REQUEST;
+ return 0;
}
- return 0;
}
-
- if (dep->flags & DWC3_EP_TRANSFER_STARTED)
- goto out;
-
- return 0;
}
-out:
return __dwc3_gadget_kick_transfer(dep);
}