Lines Matching refs:preq
344 int cdnsp_ep_enqueue(struct cdnsp_ep *pep, struct cdnsp_request *preq) in cdnsp_ep_enqueue() argument
350 if (preq->epnum == 0 && !list_empty(&pep->pending_list)) { in cdnsp_ep_enqueue()
351 trace_cdnsp_request_enqueue_busy(preq); in cdnsp_ep_enqueue()
355 request = &preq->request; in cdnsp_ep_enqueue()
358 preq->direction = pep->direction; in cdnsp_ep_enqueue()
359 preq->epnum = pep->number; in cdnsp_ep_enqueue()
360 preq->td.drbl = 0; in cdnsp_ep_enqueue()
364 trace_cdnsp_request_enqueue_error(preq); in cdnsp_ep_enqueue()
368 list_add_tail(&preq->list, &pep->pending_list); in cdnsp_ep_enqueue()
370 trace_cdnsp_request_enqueue(preq); in cdnsp_ep_enqueue()
374 ret = cdnsp_queue_ctrl_tx(pdev, preq); in cdnsp_ep_enqueue()
378 ret = cdnsp_queue_bulk_tx(pdev, preq); in cdnsp_ep_enqueue()
381 ret = cdnsp_queue_isoc_tx(pdev, preq); in cdnsp_ep_enqueue()
390 usb_gadget_unmap_request_by_dev(pdev->dev, &preq->request, in cdnsp_ep_enqueue()
392 list_del(&preq->list); in cdnsp_ep_enqueue()
393 trace_cdnsp_request_enqueue_error(preq); in cdnsp_ep_enqueue()
423 int cdnsp_ep_dequeue(struct cdnsp_ep *pep, struct cdnsp_request *preq) in cdnsp_ep_dequeue() argument
429 trace_cdnsp_request_dequeue(preq); in cdnsp_ep_dequeue()
434 ret_rem = cdnsp_remove_request(pdev, preq, pep); in cdnsp_ep_dequeue()
1003 struct cdnsp_request *preq; in cdnsp_gadget_ep_disable() local
1034 preq = next_request(&pep->pending_list); in cdnsp_gadget_ep_disable()
1035 cdnsp_ep_dequeue(pep, preq); in cdnsp_gadget_ep_disable()
1067 struct cdnsp_request *preq; in cdnsp_gadget_ep_alloc_request() local
1069 preq = kzalloc(sizeof(*preq), gfp_flags); in cdnsp_gadget_ep_alloc_request()
1070 if (!preq) in cdnsp_gadget_ep_alloc_request()
1073 preq->epnum = pep->number; in cdnsp_gadget_ep_alloc_request()
1074 preq->pep = pep; in cdnsp_gadget_ep_alloc_request()
1076 trace_cdnsp_alloc_request(preq); in cdnsp_gadget_ep_alloc_request()
1078 return &preq->request; in cdnsp_gadget_ep_alloc_request()
1084 struct cdnsp_request *preq = to_cdnsp_request(request); in cdnsp_gadget_ep_free_request() local
1086 trace_cdnsp_free_request(preq); in cdnsp_gadget_ep_free_request()
1087 kfree(preq); in cdnsp_gadget_ep_free_request()
1094 struct cdnsp_request *preq; in cdnsp_gadget_ep_queue() local
1112 preq = to_cdnsp_request(request); in cdnsp_gadget_ep_queue()
1114 ret = cdnsp_ep_enqueue(pep, preq); in cdnsp_gadget_ep_queue()
1153 struct cdnsp_request *preq; in cdnsp_gadget_ep_set_halt() local
1159 preq = next_request(&pep->pending_list); in cdnsp_gadget_ep_set_halt()
1161 if (preq) { in cdnsp_gadget_ep_set_halt()
1213 struct cdnsp_request *preq, in cdnsp_gadget_giveback() argument
1218 list_del(&preq->list); in cdnsp_gadget_giveback()
1220 if (preq->request.status == -EINPROGRESS) in cdnsp_gadget_giveback()
1221 preq->request.status = status; in cdnsp_gadget_giveback()
1223 usb_gadget_unmap_request_by_dev(pdev->dev, &preq->request, in cdnsp_gadget_giveback()
1224 preq->direction); in cdnsp_gadget_giveback()
1226 trace_cdnsp_request_giveback(preq); in cdnsp_gadget_giveback()
1228 if (preq != &pdev->ep0_preq) { in cdnsp_gadget_giveback()
1230 usb_gadget_giveback_request(&pep->endpoint, &preq->request); in cdnsp_gadget_giveback()