Lines Matching refs:req
462 static int check_read_data(struct f_sourcesink *ss, struct usb_request *req)
465 u8 *buf = req->buf;
472 for (i = 0; i < req->actual; i++, buf++) {
500 static void reinit_write_data(struct usb_ep *ep, struct usb_request *req)
503 u8 *buf = req->buf;
509 memset(req->buf, 0, req->length);
512 for (i = 0; i < req->length; i++)
520 static void source_sink_complete(struct usb_ep *ep, struct usb_request *req)
524 int status = req->status;
536 check_read_data(ss, req);
538 memset(req->buf, 0x55, req->length);
547 req->actual, req->length);
549 check_read_data(ss, req);
550 free_ep_req(ep, req);
560 status, req->actual, req->length);
567 status = usb_ep_queue(ep, req, GFP_ATOMIC);
570 ep->name, req->length, status);
580 struct usb_request *req;
608 req = ss_alloc_ep_req(ep, size);
609 if (!req)
612 req->complete = source_sink_complete;
614 reinit_write_data(ep, req);
616 memset(req->buf, 0x55, req->length);
618 status = usb_ep_queue(ep, req, GFP_ATOMIC);
626 free_ep_req(ep, req);
766 struct usb_request *req = c->cdev->req;
772 req->length = USB_COMP_EP0_BUFSIZ;
784 * NOTE: the Control-OUT data stays in req->buf ... better
794 if (w_length > req->length)
804 if (w_length > req->length)
812 "unknown control req%02x.%02x v%04x i%04x l%d\n",
819 VDBG(c->cdev, "source/sink req%02x.%02x v%04x i%04x l%d\n",
822 req->zero = 0;
823 req->length = value;
824 value = usb_ep_queue(c->cdev->gadget->ep0, req, GFP_ATOMIC);