mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 19:36:43 +07:00
usb: dwc3: gadget: simplify queueing of isoc transfers
After all the previous changes, it's now a lot clearer how isoc transfers should be managed. We don't need to try to End Transfers from ep_queue since that's already done by cleanup_requests. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
4d588a145b
commit
fe990cea8e
@ -1322,24 +1322,18 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
|
||||
* errors which will force us issue EndTransfer command.
|
||||
*/
|
||||
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
||||
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 {
|
||||
__dwc3_gadget_start_isoc(dep);
|
||||
dep->flags &= ~DWC3_EP_PENDING_REQUEST;
|
||||
}
|
||||
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_gadget_start_isoc(dep);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (dep->flags & DWC3_EP_TRANSFER_STARTED)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
out:
|
||||
return __dwc3_gadget_kick_transfer(dep);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user