Lines Matching refs:urb

40 void stub_complete(struct urb *urb)  in stub_complete()  argument
42 struct stub_priv *priv = (struct stub_priv *) urb->context; in stub_complete()
46 usbip_dbg_stub_tx("complete! status %d\n", urb->status); in stub_complete()
48 switch (urb->status) { in stub_complete()
53 dev_info(&urb->dev->dev, in stub_complete()
57 dev_info(&urb->dev->dev, in stub_complete()
61 dev_info(&urb->dev->dev, "endpoint %d is stalled\n", in stub_complete()
62 usb_pipeendpoint(urb->pipe)); in stub_complete()
65 dev_info(&urb->dev->dev, "device removed?\n"); in stub_complete()
68 dev_info(&urb->dev->dev, in stub_complete()
70 urb->status); in stub_complete()
83 if (urb->status && !priv->urb_status) in stub_complete()
84 priv->urb_status = urb->status; in stub_complete()
96 stub_enqueue_ret_unlink(sdev, priv->seqnum, urb->status); in stub_complete()
117 static void setup_ret_submit_pdu(struct usbip_header *rpdu, struct urb *urb) in setup_ret_submit_pdu() argument
119 struct stub_priv *priv = (struct stub_priv *) urb->context; in setup_ret_submit_pdu()
122 usbip_pack_pdu(rpdu, urb, USBIP_RET_SUBMIT, 1); in setup_ret_submit_pdu()
161 struct urb *urb = priv->urbs[0]; in stub_send_ret_submit() local
175 if (urb->actual_length > 0 && !urb->transfer_buffer && in stub_send_ret_submit()
176 !urb->num_sgs) { in stub_send_ret_submit()
179 urb->actual_length); in stub_send_ret_submit()
183 if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) in stub_send_ret_submit()
184 iovnum = 2 + urb->number_of_packets; in stub_send_ret_submit()
185 else if (usb_pipein(urb->pipe) && urb->actual_length > 0 && in stub_send_ret_submit()
186 urb->num_sgs) in stub_send_ret_submit()
187 iovnum = 1 + urb->num_sgs; in stub_send_ret_submit()
188 else if (usb_pipein(urb->pipe) && priv->sgl) in stub_send_ret_submit()
203 setup_ret_submit_pdu(&pdu_header, urb); in stub_send_ret_submit()
223 if (usb_pipein(urb->pipe) && priv->sgl) { in stub_send_ret_submit()
237 } else if (usb_pipein(urb->pipe) && in stub_send_ret_submit()
238 usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS && in stub_send_ret_submit()
239 urb->actual_length > 0) { in stub_send_ret_submit()
240 if (urb->num_sgs) { in stub_send_ret_submit()
241 unsigned int copy = urb->actual_length; in stub_send_ret_submit()
244 for_each_sg(urb->sg, sg, urb->num_sgs, i) { in stub_send_ret_submit()
260 iov[iovnum].iov_base = urb->transfer_buffer; in stub_send_ret_submit()
261 iov[iovnum].iov_len = urb->actual_length; in stub_send_ret_submit()
264 txsize += urb->actual_length; in stub_send_ret_submit()
265 } else if (usb_pipein(urb->pipe) && in stub_send_ret_submit()
266 usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { in stub_send_ret_submit()
277 for (i = 0; i < urb->number_of_packets; i++) { in stub_send_ret_submit()
278 iov[iovnum].iov_base = urb->transfer_buffer + in stub_send_ret_submit()
279 urb->iso_frame_desc[i].offset; in stub_send_ret_submit()
281 urb->iso_frame_desc[i].actual_length; in stub_send_ret_submit()
283 txsize += urb->iso_frame_desc[i].actual_length; in stub_send_ret_submit()
286 if (txsize != sizeof(pdu_header) + urb->actual_length) { in stub_send_ret_submit()
289 urb->actual_length, in stub_send_ret_submit()
299 if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { in stub_send_ret_submit()
302 iso_buffer = usbip_alloc_iso_desc_pdu(urb, &len); in stub_send_ret_submit()