Lines Matching refs:urb

111  * recovery (including urb dequeue) would need software changes to a QH...
157 struct urb *urb, u32 token)
166 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
168 struct usb_device *tt = urb->dev->tt->hub;
171 urb->dev->ttport, urb->dev->devnum,
172 usb_pipeendpoint(urb->pipe), token);
175 || urb->dev->tt->hub !=
177 if (usb_hub_clear_tt_buffer(urb) == 0)
190 struct urb *urb,
199 urb->actual_length += length - QTD_LENGTH (token);
202 if (unlikely(urb->unlinked))
239 urb->dev->devpath,
240 usb_pipeendpoint(urb->pipe),
241 usb_pipein(urb->pipe) ? "in" : "out");
252 ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
254 if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
259 if (unlikely(urb->unlinked)) {
270 "%s %s urb %p ep%d%s status %d len %d/%d\n",
271 __func__, urb->dev->devpath, urb,
272 usb_pipeendpoint (urb->pipe),
273 usb_pipein (urb->pipe) ? "in" : "out",
275 urb->actual_length, urb->transfer_buffer_length);
278 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
279 usb_hcd_giveback_urb(ehci_to_hcd(ehci), urb, status);
319 * after faults (including short reads), cleanup this urb
325 struct urb *urb;
329 urb = qtd->urb;
333 if (likely (last->urb != urb)) {
334 ehci_urb_done(ehci, last->urb, last_status);
356 "detected DataBufferErr for urb %p ep%d%s len %d, qtd %p [qh %p]\n",
357 urb,
358 usb_endpoint_num(&urb->ep->desc),
359 usb_endpoint_dir_in(&urb->ep->desc) ? "in" : "out",
360 urb->transfer_buffer_length,
364 /* on STALL, error, and short reads this urb must
375 !urb->unlinked) {
430 * for its urb faulted, or its urb was canceled.
432 else if (last_status == -EINPROGRESS && !urb->unlinked)
454 ehci_clear_tt_buffer(ehci, qh, urb, token);
458 /* unless we already know the urb's status, collect qtd status
466 last_status = qtd_copy_status(ehci, urb,
488 ehci_clear_tt_buffer(ehci, qh, urb,
502 /* remove qtd; it's recycled after possible urb completion */
510 /* last urb's completion might still need calling */
512 ehci_urb_done(ehci, last->urb, last_status);
558 struct urb *urb,
578 struct urb *urb,
597 qtd->urb = urb;
603 len = urb->transfer_buffer_length;
604 is_input = usb_pipein (urb->pipe);
605 if (usb_pipecontrol (urb->pipe)) {
607 qtd_fill(ehci, qtd, urb->setup_dma,
617 qtd->urb = urb;
629 i = urb->num_mapped_sgs;
631 sg = urb->sg;
634 /* urb->transfer_buffer_length may be smaller than the
640 buf = urb->transfer_dma;
648 maxpacket = usb_endpoint_maxp(&urb->ep->desc);
688 qtd->urb = urb;
698 if (likely ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0
699 || usb_pipecontrol (urb->pipe)))
707 if (likely (urb->transfer_buffer_length != 0)) {
710 if (usb_pipecontrol (urb->pipe)) {
714 } else if (usb_pipeout(urb->pipe)
715 && (urb->transfer_flags & URB_ZERO_PACKET)
716 && !(urb->transfer_buffer_length % maxpacket)) {
724 qtd->urb = urb;
733 /* by default, enable interrupt on urb completion */
734 if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
739 qtd_list_free (ehci, urb, head);
763 struct urb *urb,
772 struct usb_tt *tt = urb->dev->tt;
781 info1 |= usb_pipeendpoint (urb->pipe) << 8;
782 info1 |= usb_pipedevice (urb->pipe) << 0;
784 is_input = usb_pipein (urb->pipe);
785 type = usb_pipetype (urb->pipe);
786 ep = usb_pipe_endpoint (urb->dev, urb->pipe);
813 if (urb->dev->speed == USB_SPEED_HIGH) {
817 if (urb->interval > 1 && urb->interval < 8) {
822 urb->interval = 1;
823 } else if (urb->interval > ehci->periodic_size << 3) {
824 urb->interval = ehci->periodic_size << 3;
826 qh->ps.period = urb->interval >> 3;
830 1 << (urb->ep->desc.bInterval - 1));
832 /* Allow urb->interval to override */
833 qh->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval);
839 qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed,
853 usb_calc_bus_time (urb->dev->speed,
855 if (urb->interval > ehci->periodic_size)
856 urb->interval = ehci->periodic_size;
857 qh->ps.period = urb->interval;
861 urb->ep->desc.bInterval);
864 /* Allow urb->interval to override */
865 qh->ps.bw_period = min_t(unsigned, tmp, urb->interval);
871 qh->ps.udev = urb->dev;
872 qh->ps.ep = urb->ep;
875 switch (urb->dev->speed) {
896 info2 |= (urb->dev->ttport-1) << 23;
898 info2 |= urb->dev->ttport << 23;
933 ehci_dbg(ehci, "bogus dev %p speed %d\n", urb->dev,
934 urb->dev->speed);
948 usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
1023 struct urb *urb,
1035 qh = qh_make (ehci, urb, GFP_ATOMIC);
1051 if (usb_pipedevice (urb->pipe) == 0)
1094 urb->hcpriv = qh;
1105 struct urb *urb,
1114 epnum = urb->ep->desc.bEndpointAddress;
1121 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
1122 __func__, urb->dev->devpath, urb,
1124 urb->transfer_buffer_length,
1125 qtd, urb->ep->hcpriv);
1134 rc = usb_hcd_link_urb_to_ep(ehci_to_hcd(ehci), urb);
1138 qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv);
1140 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
1153 qtd_list_free (ehci, urb, qtd_list);
1171 struct urb *urb,
1191 qtd->urb = urb;
1196 len = urb->transfer_buffer_length;
1204 qtd_fill(ehci, qtd, urb->setup_dma,
1208 submit_async(ehci, urb, &qtd_list, GFP_ATOMIC);
1217 buf = urb->transfer_dma;
1221 maxpacket = usb_endpoint_maxp(&urb->ep->desc);
1239 qtd->urb = urb;
1246 submit_async(ehci, urb, &qtd_list, GFP_KERNEL);
1251 qtd_list_free(ehci, urb, head);