/* -------------------------------------------------------------------------- */
-static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep,
- struct dwc3_request *req, struct dwc3_trb *trb,
- const struct dwc3_event_depevt *event, int status,
- int chain)
+static int dwc3_gadget_ep_reclaim_completed_trbs(struct dwc3 *dwc,
+ struct dwc3_ep *dep, struct dwc3_request *req,
+ struct dwc3_trb *trb, const struct dwc3_event_depevt *event,
+ int status, int chain)
{
unsigned int count;
unsigned int s_pkt = 0;
return 0;
}
-static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
- const struct dwc3_event_depevt *event, int status)
+static int dwc3_gadget_ep_cleanup_completed_requests(struct dwc3 *dwc,
+ struct dwc3_ep *dep, const struct dwc3_event_depevt *event,
+ int status)
{
struct dwc3_request *req, *n;
struct dwc3_trb *trb;
req->sg = sg_next(s);
req->num_pending_sgs--;
- ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb,
- event, status, chain);
+ ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc,
+ dep, req, trb, event, status,
+ chain);
if (ret)
break;
}
} else {
trb = &dep->trb_pool[dep->trb_dequeue];
- ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb,
- event, status, chain);
+ ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep,
+ req, trb, event, status, chain);
}
if (req->unaligned || req->zero) {
trb = &dep->trb_pool[dep->trb_dequeue];
- ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb,
- event, status, false);
+ ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep,
+ req, trb, event, status, false);
req->unaligned = false;
req->zero = false;
}
if (event->status & DEPEVT_STATUS_BUSERR)
status = -ECONNRESET;
- clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status);
+ clean_busy = dwc3_gadget_ep_cleanup_completed_requests(dwc, dep, event,
+ status);
if (clean_busy && (!dep->endpoint.desc ||
usb_endpoint_xfer_isoc(dep->endpoint.desc)))
dep->flags &= ~DWC3_EP_BUSY;