Lines Matching refs:urb

28 	struct urb *urb = priv->urb;  in stub_free_priv_and_urb()  local
30 kfree(urb->setup_packet); in stub_free_priv_and_urb()
31 kfree(urb->transfer_buffer); in stub_free_priv_and_urb()
34 usb_free_urb(urb); in stub_free_priv_and_urb()
64 void stub_complete(struct urb *urb) in stub_complete() argument
66 struct stub_priv *priv = (struct stub_priv *) urb->context; in stub_complete()
70 usbip_dbg_stub_tx("complete! status %d\n", urb->status); in stub_complete()
72 switch (urb->status) { in stub_complete()
77 dev_info(&urb->dev->dev, in stub_complete()
81 dev_info(&urb->dev->dev, in stub_complete()
85 dev_info(&urb->dev->dev, "endpoint %d is stalled\n", in stub_complete()
86 usb_pipeendpoint(urb->pipe)); in stub_complete()
89 dev_info(&urb->dev->dev, "device removed?\n"); in stub_complete()
92 dev_info(&urb->dev->dev, in stub_complete()
94 urb->status); in stub_complete()
101 stub_enqueue_ret_unlink(sdev, priv->seqnum, urb->status); in stub_complete()
122 static void setup_ret_submit_pdu(struct usbip_header *rpdu, struct urb *urb) in setup_ret_submit_pdu() argument
124 struct stub_priv *priv = (struct stub_priv *) urb->context; in setup_ret_submit_pdu()
127 usbip_pack_pdu(rpdu, urb, USBIP_RET_SUBMIT, 1); in setup_ret_submit_pdu()
167 struct urb *urb = priv->urb; in stub_send_ret_submit() local
177 if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) in stub_send_ret_submit()
178 iovnum = 2 + urb->number_of_packets; in stub_send_ret_submit()
192 setup_ret_submit_pdu(&pdu_header, urb); in stub_send_ret_submit()
194 pdu_header.base.seqnum, urb); in stub_send_ret_submit()
203 if (usb_pipein(urb->pipe) && in stub_send_ret_submit()
204 usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS && in stub_send_ret_submit()
205 urb->actual_length > 0) { in stub_send_ret_submit()
206 iov[iovnum].iov_base = urb->transfer_buffer; in stub_send_ret_submit()
207 iov[iovnum].iov_len = urb->actual_length; in stub_send_ret_submit()
209 txsize += urb->actual_length; in stub_send_ret_submit()
210 } else if (usb_pipein(urb->pipe) && in stub_send_ret_submit()
211 usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { in stub_send_ret_submit()
222 for (i = 0; i < urb->number_of_packets; i++) { in stub_send_ret_submit()
223 iov[iovnum].iov_base = urb->transfer_buffer + in stub_send_ret_submit()
224 urb->iso_frame_desc[i].offset; in stub_send_ret_submit()
226 urb->iso_frame_desc[i].actual_length; in stub_send_ret_submit()
228 txsize += urb->iso_frame_desc[i].actual_length; in stub_send_ret_submit()
231 if (txsize != sizeof(pdu_header) + urb->actual_length) { in stub_send_ret_submit()
234 urb->actual_length, in stub_send_ret_submit()
244 if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { in stub_send_ret_submit()
247 iso_buffer = usbip_alloc_iso_desc_pdu(urb, &len); in stub_send_ret_submit()