Lines Matching refs:priv_req

411 		struct cdns3_request *priv_req;
414 priv_req = to_cdns3_request(request);
415 if ((priv_req->flags & REQUEST_INTERNAL) ||
526 struct cdns3_request *priv_req)
529 priv_req->flags & REQUEST_INTERNAL) {
561 return &priv_req->request;
566 struct cdns3_request *priv_req)
596 !(priv_req->flags & REQUEST_INTERNAL)) {
598 &priv_req->request);
602 list_add_tail(&priv_req->request.list,
604 cdns3_gadget_giveback(priv_ep, priv_req,
605 priv_req->request.status);
624 if (priv_req->flags & REQUEST_INTERNAL)
625 list_add_tail(&priv_req->list,
634 struct cdns3_request *priv_req;
639 priv_req = cdns3_next_priv_request(&priv_ep->wa2_descmiss_req_list);
640 chain = !!(priv_req->flags & REQUEST_INTERNAL_CH);
644 kfree(priv_req->request.buf);
645 list_del_init(&priv_req->list);
647 &priv_req->request);
664 struct cdns3_request *priv_req;
691 priv_req = to_cdns3_request(request);
692 priv_req->flags |= REQUEST_INTERNAL;
703 priv_req->request.buf = kzalloc(CDNS3_DESCMIS_BUF_SIZE,
707 if (!priv_req->request.buf) {
712 priv_req->request.length = CDNS3_DESCMIS_BUF_SIZE;
713 priv_ep->descmis_req = priv_req;
801 * @priv_req: The request we're giving back
809 struct cdns3_request *priv_req,
813 struct usb_request *request = &priv_req->request;
823 if ((priv_req->flags & REQUEST_UNALIGNED) &&
825 memcpy(request->buf, priv_req->aligned_buf->buf,
828 priv_req->flags &= ~(REQUEST_PENDING | REQUEST_UNALIGNED);
830 priv_req->finished_trb = 0;
831 trace_cdns3_gadget_giveback(priv_req);
835 priv_req);
898 static int cdns3_prepare_aligned_request_buf(struct cdns3_request *priv_req)
900 struct cdns3_endpoint *priv_ep = priv_req->priv_ep;
905 if (!((uintptr_t)priv_req->request.buf & 0x7))
908 buf = priv_req->aligned_buf;
910 if (!buf || priv_req->request.length > buf->size) {
915 buf->size = priv_req->request.length;
926 if (priv_req->aligned_buf) {
927 trace_cdns3_free_aligned_request(priv_req);
928 priv_req->aligned_buf->in_use = 0;
934 priv_req->aligned_buf = buf;
941 memcpy(buf->buf, priv_req->request.buf,
942 priv_req->request.length);
945 priv_req->flags |= REQUEST_UNALIGNED;
946 trace_cdns3_prepare_aligned_request(priv_req);
990 struct cdns3_request *priv_req;
999 priv_req = to_cdns3_request(request);
1005 if (priv_req->flags & REQUEST_UNALIGNED)
1006 trb_dma = priv_req->aligned_buf->dma;
1012 priv_req->start_trb = priv_ep->enqueue;
1013 priv_req->end_trb = priv_req->start_trb;
1014 priv_req->trb = trb;
1019 TRB_STREAM_ID(priv_req->request.stream_id) | TRB_ISP;
1042 priv_req->flags |= REQUEST_PENDING;
1046 trace_cdns3_prepare_trb(priv_ep, priv_req->trb);
1076 priv_ep->last_stream_id = priv_req->request.stream_id;
1078 writel(EP_CMD_ERDY_SID(priv_req->request.stream_id) |
1115 struct cdns3_request *priv_req;
1139 priv_req = to_cdns3_request(request);
1145 if (priv_req->flags & REQUEST_UNALIGNED)
1146 trb_dma = priv_req->aligned_buf->dma;
1151 priv_req->start_trb = priv_ep->enqueue;
1152 priv_req->trb = trb;
1198 priv_req->trb = trb;
1296 priv_req->trb->control = cpu_to_le32(control);
1309 priv_req->end_trb = priv_ep->enqueue;
1315 trb = priv_req->trb;
1317 priv_req->flags |= REQUEST_PENDING;
1318 priv_req->num_of_trb = num_trb;
1366 trace_cdns3_prepare_trb(priv_ep, priv_req->trb);
1393 priv_req->start_trb * TRB_SIZE),
1444 * @priv_req: request object for checking
1454 * ST = priv_req->start_trb - index of first TRB in transfer ring
1455 * ET = priv_req->end_trb - index of last TRB in transfer ring
1480 struct cdns3_request *priv_req)
1492 if (priv_req->start_trb < priv_req->end_trb) {
1493 if (priv_ep->dequeue > priv_req->end_trb)
1496 if (priv_ep->dequeue < priv_req->start_trb)
1500 if ((priv_req->start_trb > priv_req->end_trb) &&
1501 (priv_ep->dequeue > priv_req->end_trb) &&
1502 (priv_ep->dequeue < priv_req->start_trb))
1505 if ((priv_req->start_trb == priv_req->end_trb) &&
1506 (priv_ep->dequeue != priv_req->end_trb))
1537 trace_cdns3_request_handled(priv_req, current_index, handled);
1545 struct cdns3_request *priv_req;
1553 priv_req = to_cdns3_request(request);
1576 while (cdns3_trb_handled(priv_ep, priv_req)) {
1577 priv_req->finished_trb++;
1578 if (priv_req->finished_trb >= priv_req->num_of_trb)
1588 if (priv_req->num_of_trb > 1 &&
1601 cdns3_gadget_giveback(priv_ep, priv_req, 0);
1620 if (trb != priv_req->trb)
1623 priv_req->trb, trb);
1630 cdns3_gadget_giveback(priv_ep, priv_req, 0);
2308 struct cdns3_request *priv_req;
2310 priv_req = kzalloc(sizeof(*priv_req), gfp_flags);
2311 if (!priv_req)
2314 priv_req->priv_ep = priv_ep;
2316 trace_cdns3_alloc_request(priv_req);
2317 return &priv_req->request;
2328 struct cdns3_request *priv_req = to_cdns3_request(request);
2330 if (priv_req->aligned_buf)
2331 priv_req->aligned_buf->in_use = 0;
2333 trace_cdns3_free_request(priv_req);
2334 kfree(priv_req);
2486 struct cdns3_request *priv_req;
2540 priv_req = cdns3_next_priv_request(&priv_ep->wa2_descmiss_req_list);
2542 kfree(priv_req->request.buf);
2544 &priv_req->request);
2545 list_del_init(&priv_req->list);
2581 struct cdns3_request *priv_req;
2586 priv_req = to_cdns3_request(request);
2587 trace_cdns3_ep_queue(priv_req);
2591 priv_req);
2597 ret = cdns3_prepare_aligned_request_buf(priv_req);
2649 struct cdns3_request *priv_req;
2655 priv_req = to_cdns3_request(zlp_request);
2656 priv_req->flags |= REQUEST_ZLP;
2680 struct cdns3_request *priv_req;
2693 priv_req = to_cdns3_request(request);
2695 trace_cdns3_ep_dequeue(priv_req);
2716 link_trb = priv_req->trb;
2721 ((priv_req->end_trb + 1) * TRB_SIZE)));
2725 if (priv_ep->wa1_trb == priv_req->trb)
2729 cdns3_gadget_giveback(priv_ep, priv_req, -ECONNRESET);
2766 struct cdns3_request *priv_req;
2776 priv_req = to_cdns3_request(request);
2777 trb = priv_req->trb;