Lines Matching refs:urb

107  * recovery (including urb dequeue) would need software changes to a QH...
153 struct urb *urb, u32 token)
162 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
164 struct usb_device *tt = urb->dev->tt->hub;
167 urb->dev->ttport, urb->dev->devnum,
168 usb_pipeendpoint(urb->pipe), token);
171 || urb->dev->tt->hub !=
173 if (usb_hub_clear_tt_buffer(urb) == 0)
186 struct urb *urb,
195 urb->actual_length += length - QTD_LENGTH (token);
198 if (unlikely(urb->unlinked))
235 urb->dev->devpath,
236 usb_pipeendpoint(urb->pipe),
237 usb_pipein(urb->pipe) ? "in" : "out");
248 ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
250 if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
255 if (unlikely(urb->unlinked)) {
266 "%s %s urb %p ep%d%s status %d len %d/%d\n",
267 __func__, urb->dev->devpath, urb,
268 usb_pipeendpoint (urb->pipe),
269 usb_pipein (urb->pipe) ? "in" : "out",
271 urb->actual_length, urb->transfer_buffer_length);
274 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
275 usb_hcd_giveback_urb(ehci_to_hcd(ehci), urb, status);
315 * after faults (including short reads), cleanup this urb
321 struct urb *urb;
325 urb = qtd->urb;
329 if (likely (last->urb != urb)) {
330 ehci_urb_done(ehci, last->urb, last_status);
352 "detected DataBufferErr for urb %p ep%d%s len %d, qtd %p [qh %p]\n",
353 urb,
354 usb_endpoint_num(&urb->ep->desc),
355 usb_endpoint_dir_in(&urb->ep->desc) ? "in" : "out",
356 urb->transfer_buffer_length,
360 /* on STALL, error, and short reads this urb must
371 !urb->unlinked) {
426 * for its urb faulted, or its urb was canceled.
428 else if (last_status == -EINPROGRESS && !urb->unlinked)
450 ehci_clear_tt_buffer(ehci, qh, urb, token);
454 /* unless we already know the urb's status, collect qtd status
462 last_status = qtd_copy_status(ehci, urb,
484 ehci_clear_tt_buffer(ehci, qh, urb,
498 /* remove qtd; it's recycled after possible urb completion */
506 /* last urb's completion might still need calling */
508 ehci_urb_done(ehci, last->urb, last_status);
554 struct urb *urb,
574 struct urb *urb,
593 qtd->urb = urb;
599 len = urb->transfer_buffer_length;
600 is_input = usb_pipein (urb->pipe);
601 if (usb_pipecontrol (urb->pipe)) {
603 qtd_fill(ehci, qtd, urb->setup_dma,
613 qtd->urb = urb;
625 i = urb->num_mapped_sgs;
627 sg = urb->sg;
630 /* urb->transfer_buffer_length may be smaller than the
636 buf = urb->transfer_dma;
644 maxpacket = usb_endpoint_maxp(&urb->ep->desc);
684 qtd->urb = urb;
694 if (likely ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0
695 || usb_pipecontrol (urb->pipe)))
703 if (likely (urb->transfer_buffer_length != 0)) {
706 if (usb_pipecontrol (urb->pipe)) {
710 } else if (usb_pipeout(urb->pipe)
711 && (urb->transfer_flags & URB_ZERO_PACKET)
712 && !(urb->transfer_buffer_length % maxpacket)) {
720 qtd->urb = urb;
729 /* by default, enable interrupt on urb completion */
730 if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
735 qtd_list_free (ehci, urb, head);
759 struct urb *urb,
768 struct usb_tt *tt = urb->dev->tt;
777 info1 |= usb_pipeendpoint (urb->pipe) << 8;
778 info1 |= usb_pipedevice (urb->pipe) << 0;
780 is_input = usb_pipein (urb->pipe);
781 type = usb_pipetype (urb->pipe);
782 ep = usb_pipe_endpoint (urb->dev, urb->pipe);
809 if (urb->dev->speed == USB_SPEED_HIGH) {
813 if (urb->interval > 1 && urb->interval < 8) {
818 urb->interval = 1;
819 } else if (urb->interval > ehci->periodic_size << 3) {
820 urb->interval = ehci->periodic_size << 3;
822 qh->ps.period = urb->interval >> 3;
826 1 << (urb->ep->desc.bInterval - 1));
828 /* Allow urb->interval to override */
829 qh->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval);
835 qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed,
849 usb_calc_bus_time (urb->dev->speed,
851 if (urb->interval > ehci->periodic_size)
852 urb->interval = ehci->periodic_size;
853 qh->ps.period = urb->interval;
857 urb->ep->desc.bInterval);
860 /* Allow urb->interval to override */
861 qh->ps.bw_period = min_t(unsigned, tmp, urb->interval);
867 qh->ps.udev = urb->dev;
868 qh->ps.ep = urb->ep;
871 switch (urb->dev->speed) {
892 info2 |= (urb->dev->ttport-1) << 23;
894 info2 |= urb->dev->ttport << 23;
929 ehci_dbg(ehci, "bogus dev %p speed %d\n", urb->dev,
930 urb->dev->speed);
944 usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
1019 struct urb *urb,
1031 qh = qh_make (ehci, urb, GFP_ATOMIC);
1047 if (usb_pipedevice (urb->pipe) == 0)
1090 urb->hcpriv = qh;
1101 struct urb *urb,
1110 epnum = urb->ep->desc.bEndpointAddress;
1117 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
1118 __func__, urb->dev->devpath, urb,
1120 urb->transfer_buffer_length,
1121 qtd, urb->ep->hcpriv);
1130 rc = usb_hcd_link_urb_to_ep(ehci_to_hcd(ehci), urb);
1134 qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv);
1136 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
1149 qtd_list_free (ehci, urb, qtd_list);
1167 struct urb *urb,
1187 qtd->urb = urb;
1192 len = urb->transfer_buffer_length;
1200 qtd_fill(ehci, qtd, urb->setup_dma,
1204 submit_async(ehci, urb, &qtd_list, GFP_ATOMIC);
1213 buf = urb->transfer_dma;
1217 maxpacket = usb_endpoint_maxp(&urb->ep->desc);
1235 qtd->urb = urb;
1242 submit_async(ehci, urb, &qtd_list, GFP_KERNEL);
1247 qtd_list_free(ehci, urb, head);