Lines Matching refs:urb

15 static int is_clear_halt_cmd(struct urb *urb)
19 req = (struct usb_ctrlrequest *) urb->setup_packet;
26 static int is_set_interface_cmd(struct urb *urb)
30 req = (struct usb_ctrlrequest *) urb->setup_packet;
36 static int is_set_configuration_cmd(struct urb *urb)
40 req = (struct usb_ctrlrequest *) urb->setup_packet;
46 static int is_reset_device_cmd(struct urb *urb)
52 req = (struct usb_ctrlrequest *) urb->setup_packet;
65 static int tweak_clear_halt_cmd(struct urb *urb)
73 req = (struct usb_ctrlrequest *) urb->setup_packet;
77 * of the urb is the target of this clear_halt request (i.e., control
86 target_pipe = usb_rcvctrlpipe(urb->dev, target_endp);
88 target_pipe = usb_sndctrlpipe(urb->dev, target_endp);
90 ret = usb_clear_halt(urb->dev, target_pipe);
92 dev_err(&urb->dev->dev,
94 urb->dev->devnum, target_endp, ret);
96 dev_info(&urb->dev->dev,
98 urb->dev->devnum, target_endp);
103 static int tweak_set_interface_cmd(struct urb *urb)
110 req = (struct usb_ctrlrequest *) urb->setup_packet;
117 ret = usb_set_interface(urb->dev, interface, alternate);
119 dev_err(&urb->dev->dev,
123 dev_info(&urb->dev->dev,
130 static int tweak_set_configuration_cmd(struct urb *urb)
132 struct stub_priv *priv = (struct stub_priv *) urb->context;
138 req = (struct usb_ctrlrequest *) urb->setup_packet;
150 static int tweak_reset_device_cmd(struct urb *urb)
152 struct stub_priv *priv = (struct stub_priv *) urb->context;
155 dev_info(&urb->dev->dev, "usb_queue_reset_device\n");
158 dev_err(&urb->dev->dev, "could not obtain lock to reset device\n");
170 static void tweak_special_requests(struct urb *urb)
172 if (!urb || !urb->setup_packet)
175 if (usb_pipetype(urb->pipe) != PIPE_CONTROL)
178 if (is_clear_halt_cmd(urb))
180 tweak_clear_halt_cmd(urb);
182 else if (is_set_interface_cmd(urb))
184 tweak_set_interface_cmd(urb);
186 else if (is_set_configuration_cmd(urb))
188 tweak_set_configuration_cmd(urb);
190 else if (is_reset_device_cmd(urb))
191 tweak_reset_device_cmd(urb);
198 * By unlinking the urb asynchronously, stub_rx can continuously
199 * process coming urbs. Even if the urb is unlinked, its completion
218 * This matched urb is not completed yet (i.e., be in
229 * is changed from the seqnum of the cancelling urb to
248 /* In the above case, urb->status is not -ECONNRESET,
256 "failed to unlink %d/%d urb of seqnum %lu, ret %d\n",
267 * The urb of the unlink target is not found in priv_init queue. It was
390 static void masking_bogus_flags(struct urb *urb)
398 if (!urb || urb->hcpriv || !urb->complete)
400 dev = urb->dev;
404 ep = (usb_pipein(urb->pipe) ? dev->ep_in : dev->ep_out)
405 [usb_pipeendpoint(urb->pipe)];
412 (struct usb_ctrlrequest *) urb->setup_packet;
438 urb->transfer_flags &= allowed;
491 /* allocate urb transfer buffer, if needed */
507 * urb->sg) and it is used as an indicator that
526 /* allocate urb array */
532 /* setup a urb */
551 /* copy urb setup packet */
595 /* urb is now ready to submit */
600 usbip_dbg_stub_rx("submit urb ok, seqnum %u\n",