Lines Matching refs:req
89 struct usb_request *req, gfp_t gfp_flags);
90 static int ci_ep_dequeue(struct usb_ep *ep, struct usb_request *req);
270 return &controller.ep0_req->req; in ci_ep_alloc_request()
281 return &ci_req->req; in ci_ep_alloc_request()
284 static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *req) in ci_ep_free_request() argument
287 struct ci_req *ci_req = container_of(req, struct ci_req, req); in ci_ep_free_request()
359 struct usb_request *req = &ci_req->req; in ci_bounce() local
360 unsigned long addr = (unsigned long)req->buf; in ci_bounce()
369 if (req->length & (ARCH_DMA_MINALIGN - 1)) in ci_bounce()
373 ci_req->hw_len = req->length; in ci_bounce()
374 ci_req->hw_buf = req->buf; in ci_bounce()
378 if (ci_req->b_buf && req->length > ci_req->b_len) { in ci_bounce()
383 ci_req->b_len = roundup(req->length, ARCH_DMA_MINALIGN); in ci_bounce()
392 memcpy(ci_req->hw_buf, req->buf, req->length); in ci_bounce()
396 aligned_used_len = roundup(req->length, ARCH_DMA_MINALIGN); in ci_bounce()
404 struct usb_request *req = &ci_req->req; in ci_debounce() local
405 unsigned long addr = (unsigned long)req->buf; in ci_debounce()
412 aligned_used_len = roundup(req->actual, ARCH_DMA_MINALIGN); in ci_debounce()
418 memcpy(req->buf, ci_req->hw_buf, req->actual); in ci_debounce()
440 len = ci_req->req.length; in ci_ep_submit_next_request()
491 if (in && len && !(len % ci_ep->ep.maxpacket) && ci_req->req.zero) { in ci_ep_submit_next_request()
534 if (&ci_req->req == _req) in ci_ep_dequeue()
538 if (&ci_req->req != _req) in ci_ep_dequeue()
543 if (ci_req->req.status == -EINPROGRESS) { in ci_ep_dequeue()
544 ci_req->req.status = -ECONNRESET; in ci_ep_dequeue()
545 if (ci_req->req.complete) in ci_ep_dequeue()
546 ci_req->req.complete(_ep, _req); in ci_ep_dequeue()
553 struct usb_request *req, gfp_t gfp_flags) in ci_ep_queue() argument
556 struct ci_req *ci_req = container_of(req, struct ci_req, req); in ci_ep_queue()
637 ci_req->req.actual = ci_req->req.length - len; in handle_ep_complete()
643 ci_req->req.complete(&ci_ep->ep, &ci_req->req); in handle_ep_complete()
652 ci_req->req.length = 0; in handle_ep_complete()
653 usb_ep_queue(&ci_ep->ep, &ci_req->req, 0); in handle_ep_complete()
663 struct usb_request *req; in handle_setup() local
672 req = &ci_req->req; in handle_setup()
712 req->length = 0; in handle_setup()
725 req, 0); in handle_setup()
738 req->length = 0; in handle_setup()
739 usb_ep_queue(controller.gadget.ep0, req, 0); in handle_setup()
743 req->length = 2; in handle_setup()
744 buf = (char *)req->buf; in handle_setup()
747 usb_ep_queue(controller.gadget.ep0, req, 0); in handle_setup()
1043 ci_ep_free_request(&controller.ep[0].ep, &controller.ep0_req->req); in usb_gadget_unregister_driver()