Lines Matching refs:req
464 static int check_read_data(struct f_sourcesink *ss, struct usb_request *req)
467 u8 *buf = req->buf;
474 for (i = 0; i < req->actual; i++, buf++) {
502 static void reinit_write_data(struct usb_ep *ep, struct usb_request *req)
505 u8 *buf = req->buf;
511 memset(req->buf, 0, req->length);
514 for (i = 0; i < req->length; i++)
522 static void source_sink_complete(struct usb_ep *ep, struct usb_request *req)
526 int status = req->status;
538 check_read_data(ss, req);
540 memset(req->buf, 0x55, req->length);
549 req->actual, req->length);
551 check_read_data(ss, req);
552 free_ep_req(ep, req);
562 status, req->actual, req->length);
568 status = usb_ep_queue(ep, req, GFP_ATOMIC);
571 ep->name, req->length, status);
581 struct usb_request *req;
609 req = ss_alloc_ep_req(ep, size);
610 if (!req)
613 req->complete = source_sink_complete;
615 reinit_write_data(ep, req);
617 memset(req->buf, 0x55, req->length);
619 status = usb_ep_queue(ep, req, GFP_ATOMIC);
627 free_ep_req(ep, req);
767 struct usb_request *req = c->cdev->req;
773 req->length = USB_COMP_EP0_BUFSIZ;
785 * NOTE: the Control-OUT data stays in req->buf ... better
795 if (w_length > req->length)
805 if (w_length > req->length)
813 "unknown control req%02x.%02x v%04x i%04x l%d\n",
820 VDBG(c->cdev, "source/sink req%02x.%02x v%04x i%04x l%d\n",
823 req->zero = 0;
824 req->length = value;
825 value = usb_ep_queue(c->cdev->gadget->ep0, req, GFP_ATOMIC);