Lines Matching refs:req
53 ret = usb_ep_queue(fu->ep_out, fu->cmd.req, GFP_ATOMIC);
59 static void bot_status_complete(struct usb_ep *ep, struct usb_request *req)
61 struct usbg_cmd *cmd = req->context;
65 if (req->status < 0) {
83 fu->bot_status.req->context = cmd;
84 ret = usb_ep_queue(fu->ep_in, fu->bot_status.req, GFP_ATOMIC);
89 static void bot_err_compl(struct usb_ep *ep, struct usb_request *req)
91 struct usbg_cmd *cmd = req->context;
94 if (req->status < 0)
99 req->length = ep->maxpacket;
102 req->length = cmd->data_len;
106 usb_ep_queue(ep, req, GFP_ATOMIC);
116 struct usb_request *req;
124 req = fu->bot_req_in;
127 req = fu->bot_req_out;
131 req->length = ep->maxpacket;
134 req->length = cmd->data_len;
137 req->complete = bot_err_compl;
138 req->context = cmd;
139 req->buf = fu->cmd.buf;
140 usb_ep_queue(ep, req, GFP_KERNEL);
166 fu->bot_status.req->context = cmd;
168 ret = usb_ep_queue(fu->ep_in, fu->bot_status.req, GFP_KERNEL);
192 static void bot_read_compl(struct usb_ep *ep, struct usb_request *req)
194 struct usbg_cmd *cmd = req->context;
196 if (req->status < 0)
290 static void bot_cmd_complete(struct usb_ep *ep, struct usb_request *req)
292 struct f_uas *fu = req->context;
297 if (req->status < 0)
300 ret = bot_submit_command(fu, req->buf, req->actual);
317 fu->cmd.req = usb_ep_alloc_request(fu->ep_out, GFP_KERNEL);
318 if (!fu->cmd.req)
321 fu->bot_status.req = usb_ep_alloc_request(fu->ep_in, GFP_KERNEL);
322 if (!fu->bot_status.req)
325 fu->bot_status.req->buf = &fu->bot_status.csw;
326 fu->bot_status.req->length = US_BULK_CS_WRAP_LEN;
327 fu->bot_status.req->complete = bot_status_complete;
334 fu->cmd.req->complete = bot_cmd_complete;
335 fu->cmd.req->buf = fu->cmd.buf;
336 fu->cmd.req->length = fu->ep_out->maxpacket;
337 fu->cmd.req->context = fu;
347 usb_ep_free_request(fu->ep_in, fu->bot_status.req);
349 usb_ep_free_request(fu->ep_out, fu->cmd.req);
350 fu->cmd.req = NULL;
375 usb_ep_free_request(fu->ep_out, fu->cmd.req);
376 usb_ep_free_request(fu->ep_in, fu->bot_status.req);
382 fu->cmd.req = NULL;
383 fu->bot_status.req = NULL;
453 ret_lun = cdev->req->buf;
455 cdev->req->length = 1;
456 return usb_ep_queue(cdev->gadget->ep0, cdev->req, GFP_ATOMIC);
485 usb_ep_free_request(fu->ep_cmd, fu->cmd.req);
487 fu->cmd.req = NULL;
508 static void uasp_status_data_cmpl(struct usb_ep *ep, struct usb_request *req);
565 static void uasp_status_data_cmpl(struct usb_ep *ep, struct usb_request *req)
567 struct usbg_cmd *cmd = req->context;
572 if (req->status < 0)
604 usb_ep_queue(fu->ep_cmd, fu->cmd.req, GFP_ATOMIC);
721 static void uasp_cmd_complete(struct usb_ep *ep, struct usb_request *req)
723 struct f_uas *fu = req->context;
726 if (req->status < 0)
729 ret = usbg_submit_command(fu, req->buf, req->actual);
731 * Once we tune for performance enqueue the command req here again so
738 usb_ep_queue(fu->ep_cmd, fu->cmd.req, GFP_ATOMIC);
769 fu->cmd.req = usb_ep_alloc_request(fu->ep_cmd, GFP_KERNEL);
770 if (!fu->cmd.req)
777 fu->cmd.req->complete = uasp_cmd_complete;
778 fu->cmd.req->buf = fu->cmd.buf;
779 fu->cmd.req->length = fu->ep_cmd->maxpacket;
780 fu->cmd.req->context = fu;
784 usb_ep_free_request(fu->ep_cmd, fu->cmd.req);
824 ret = usb_ep_queue(fu->ep_cmd, fu->cmd.req, GFP_ATOMIC);
955 static void usbg_data_write_cmpl(struct usb_ep *ep, struct usb_request *req)
957 struct usbg_cmd *cmd = req->context;
960 if (req->status < 0) {
965 if (req->num_sgs == 0) {
979 static int usbg_prepare_w_request(struct usbg_cmd *cmd, struct usb_request *req)
990 req->buf = cmd->data_buf;
992 req->buf = NULL;
993 req->num_sgs = se_cmd->t_data_nents;
994 req->sg = se_cmd->t_data_sg;
997 req->is_last = 1;
998 req->complete = usbg_data_write_cmpl;
999 req->length = se_cmd->data_length;
1000 req->context = cmd;