Lines Matching refs:urb

110  * recovery (including urb dequeue) would need software changes to a QH...
156 struct urb *urb, u32 token)
165 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
167 struct usb_device *tt = urb->dev->tt->hub;
170 urb->dev->ttport, urb->dev->devnum,
171 usb_pipeendpoint(urb->pipe), token);
174 || urb->dev->tt->hub !=
176 if (usb_hub_clear_tt_buffer(urb) == 0)
189 struct urb *urb,
198 urb->actual_length += length - QTD_LENGTH (token);
201 if (unlikely(urb->unlinked))
238 urb->dev->devpath,
239 usb_pipeendpoint(urb->pipe),
240 usb_pipein(urb->pipe) ? "in" : "out");
251 ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
253 if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
258 if (unlikely(urb->unlinked)) {
269 "%s %s urb %p ep%d%s status %d len %d/%d\n",
270 __func__, urb->dev->devpath, urb,
271 usb_pipeendpoint (urb->pipe),
272 usb_pipein (urb->pipe) ? "in" : "out",
274 urb->actual_length, urb->transfer_buffer_length);
277 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
278 usb_hcd_giveback_urb(ehci_to_hcd(ehci), urb, status);
318 * after faults (including short reads), cleanup this urb
324 struct urb *urb;
328 urb = qtd->urb;
332 if (likely (last->urb != urb)) {
333 ehci_urb_done(ehci, last->urb, last_status);
355 "detected DataBufferErr for urb %p ep%d%s len %d, qtd %p [qh %p]\n",
356 urb,
357 usb_endpoint_num(&urb->ep->desc),
358 usb_endpoint_dir_in(&urb->ep->desc) ? "in" : "out",
359 urb->transfer_buffer_length,
363 /* on STALL, error, and short reads this urb must
374 !urb->unlinked) {
429 * for its urb faulted, or its urb was canceled.
431 else if (last_status == -EINPROGRESS && !urb->unlinked)
453 ehci_clear_tt_buffer(ehci, qh, urb, token);
457 /* unless we already know the urb's status, collect qtd status
465 last_status = qtd_copy_status(ehci, urb,
487 ehci_clear_tt_buffer(ehci, qh, urb,
501 /* remove qtd; it's recycled after possible urb completion */
509 /* last urb's completion might still need calling */
511 ehci_urb_done(ehci, last->urb, last_status);
557 struct urb *urb,
577 struct urb *urb,
596 qtd->urb = urb;
602 len = urb->transfer_buffer_length;
603 is_input = usb_pipein (urb->pipe);
604 if (usb_pipecontrol (urb->pipe)) {
606 qtd_fill(ehci, qtd, urb->setup_dma,
616 qtd->urb = urb;
628 i = urb->num_mapped_sgs;
630 sg = urb->sg;
633 /* urb->transfer_buffer_length may be smaller than the
639 buf = urb->transfer_dma;
647 maxpacket = usb_maxpacket(urb->dev, urb->pipe, !is_input);
687 qtd->urb = urb;
697 if (likely ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0
698 || usb_pipecontrol (urb->pipe)))
706 if (likely (urb->transfer_buffer_length != 0)) {
709 if (usb_pipecontrol (urb->pipe)) {
713 } else if (usb_pipeout(urb->pipe)
714 && (urb->transfer_flags & URB_ZERO_PACKET)
715 && !(urb->transfer_buffer_length % maxpacket)) {
723 qtd->urb = urb;
732 /* by default, enable interrupt on urb completion */
733 if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
738 qtd_list_free (ehci, urb, head);
762 struct urb *urb,
771 struct usb_tt *tt = urb->dev->tt;
780 info1 |= usb_pipeendpoint (urb->pipe) << 8;
781 info1 |= usb_pipedevice (urb->pipe) << 0;
783 is_input = usb_pipein (urb->pipe);
784 type = usb_pipetype (urb->pipe);
785 ep = usb_pipe_endpoint (urb->dev, urb->pipe);
812 if (urb->dev->speed == USB_SPEED_HIGH) {
816 if (urb->interval > 1 && urb->interval < 8) {
821 urb->interval = 1;
822 } else if (urb->interval > ehci->periodic_size << 3) {
823 urb->interval = ehci->periodic_size << 3;
825 qh->ps.period = urb->interval >> 3;
829 1 << (urb->ep->desc.bInterval - 1));
831 /* Allow urb->interval to override */
832 qh->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval);
838 qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed,
852 usb_calc_bus_time (urb->dev->speed,
854 if (urb->interval > ehci->periodic_size)
855 urb->interval = ehci->periodic_size;
856 qh->ps.period = urb->interval;
860 urb->ep->desc.bInterval);
863 /* Allow urb->interval to override */
864 qh->ps.bw_period = min_t(unsigned, tmp, urb->interval);
870 qh->ps.udev = urb->dev;
871 qh->ps.ep = urb->ep;
874 switch (urb->dev->speed) {
895 info2 |= (urb->dev->ttport-1) << 23;
897 info2 |= urb->dev->ttport << 23;
932 ehci_dbg(ehci, "bogus dev %p speed %d\n", urb->dev,
933 urb->dev->speed);
947 usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
1022 struct urb *urb,
1034 qh = qh_make (ehci, urb, GFP_ATOMIC);
1050 if (usb_pipedevice (urb->pipe) == 0)
1093 urb->hcpriv = qh;
1104 struct urb *urb,
1113 epnum = urb->ep->desc.bEndpointAddress;
1120 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
1121 __func__, urb->dev->devpath, urb,
1123 urb->transfer_buffer_length,
1124 qtd, urb->ep->hcpriv);
1133 rc = usb_hcd_link_urb_to_ep(ehci_to_hcd(ehci), urb);
1137 qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv);
1139 usb_hcd_unlink_urb_from_ep(ehci_to_hcd(ehci), urb);
1152 qtd_list_free (ehci, urb, qtd_list);
1170 struct urb *urb,
1190 qtd->urb = urb;
1195 len = urb->transfer_buffer_length;
1203 qtd_fill(ehci, qtd, urb->setup_dma,
1207 submit_async(ehci, urb, &qtd_list, GFP_ATOMIC);
1216 buf = urb->transfer_dma;
1220 maxpacket = usb_maxpacket(urb->dev, urb->pipe, 0);
1238 qtd->urb = urb;
1245 submit_async(ehci, urb, &qtd_list, GFP_KERNEL);
1250 qtd_list_free(ehci, urb, head);