}
static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep,
- gfp_t gfp_flags)
+ gfp_t gfp_flags)
{
struct dwc3_request *req;
struct dwc3_ep *dep = to_dwc3_ep(ep);
req->epnum = dep->number;
req->dep = dep;
- dep->allocated_requests++;
-
trace_dwc3_alloc_request(req);
return &req->request;
struct usb_request *request)
{
struct dwc3_request *req = to_dwc3_request(request);
- struct dwc3_ep *dep = to_dwc3_ep(ep);
- dep->allocated_requests--;
trace_dwc3_free_request(req);
kfree(req);
}
dwc3_gadget_move_started_request(req);
req->trb = trb;
req->trb_dma = dwc3_trb_dma_offset(dep, trb);
- dep->queued_requests++;
}
__dwc3_prepare_one_trb(dep, trb, dma, length, chain, node,
*/
if (req->trb)
memset(req->trb, 0, sizeof(struct dwc3_trb));
- dep->queued_requests--;
dwc3_gadget_del_and_unmap_request(dep, req, ret);
return ret;
}
out1:
/* giveback the request */
- dep->queued_requests--;
+
dwc3_gadget_giveback(dep, req, -ECONNRESET);
out0:
/* -------------------------------------------------------------------------- */
-static int dwc3_gadget_ep_reclaim_completed_trbs(struct dwc3 *dwc,
+static int dwc3_gadget_ep_reclaim_completed_trb(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)
dwc3_ep_inc_deq(dep);
- if (req->trb == trb)
- dep->queued_requests--;
-
trace_dwc3_complete_trb(dep, trb);
/*
req->sg = sg_next(s);
req->num_pending_sgs--;
- ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc,
+ ret = dwc3_gadget_ep_reclaim_completed_trb(dwc,
dep, req, trb, event, status,
chain);
if (ret)
}
} else {
trb = &dep->trb_pool[dep->trb_dequeue];
- ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep,
+ ret = dwc3_gadget_ep_reclaim_completed_trb(dwc, dep,
req, trb, event, status, chain);
}
if (req->unaligned || req->zero) {
trb = &dep->trb_pool[dep->trb_dequeue];
- ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep,
+ ret = dwc3_gadget_ep_reclaim_completed_trb(dwc, dep,
req, trb, event, status, false);
req->unaligned = false;
req->zero = false;
TP_fast_assign(
__assign_str(name, dep->name);
__entry->trb = trb;
- __entry->allocated = dep->allocated_requests;
- __entry->queued = dep->queued_requests;
__entry->bpl = trb->bpl;
__entry->bph = trb->bph;
__entry->size = trb->size;
__entry->ctrl = trb->ctrl;
__entry->type = usb_endpoint_type(dep->endpoint.desc);
),
- TP_printk("%s: %d/%d trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
- __get_str(name), __entry->queued, __entry->allocated,
- __entry->trb, __entry->bph, __entry->bpl,
+ TP_printk("%s: trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
+ __get_str(name), __entry->trb, __entry->bph, __entry->bpl,
({char *s;
int pcm = ((__entry->size >> 24) & 3) + 1;
switch (__entry->type) {