• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/usb/host/

Lines Matching defs:qtd

26  * Control, bulk, and interrupt traffic all use "qh" lists.  They list "qtd"
43 /* fill a qtd, returning how much of the buffer we were able to queue up */
46 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf,
53 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr);
54 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32));
62 /* per-qtd limit: from 16K to 20K (best alignment) */
65 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr);
66 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci,
79 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token);
80 qtd->length = count;
88 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
95 hw->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma);
106 is_out = !(qtd->hw_token & cpu_to_hc32(ehci, 1 << 8));
114 /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
126 struct ehci_qtd *qtd;
129 qtd = qh->dummy;
131 qtd = list_entry (qh->qtd_list.next,
133 /* first qtd may already be partially processed */
134 if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current)
135 qtd = NULL;
138 if (qtd)
139 qh_update (ehci, qh, qtd);
245 "dev%d ep%d%s qtd token %08x --> status %d\n",
348 struct ehci_qtd *qtd;
352 qtd = list_entry (entry, struct ehci_qtd, qtd_list);
353 urb = qtd->urb;
367 if (qtd == end)
370 /* hardware copies qtd out of qh overlay */
372 token = hc32_to_cpu(ehci, qtd->hw_token);
392 qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
394 /* reset the token in the qtd and the
396 * the qtd) so that we pick up from
402 qtd->hw_token = cpu_to_hc32(ehci,
416 * most other single-qtd reads ... the queue stops if
421 && !(qtd->hw_alt_next
440 /* this qtd is active; skip it unless a previous qtd
448 && cpu_to_hc32(ehci, qtd->qtd_dma)
470 /* unless we already know the urb's status, collect qtd status
472 * cases with only one data qtd (including control transfers),
474 * example, with a 32 KB transfer), when the first qtd gets a
479 qtd->length, token);
481 && (qtd->hw_alt_next
508 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) {
509 last = list_entry (qtd->qtd_list.prev,
511 last->hw_next = qtd->hw_next;
514 /* remove qtd; it's recycled after possible urb completion */
515 list_del (&qtd->qtd_list);
516 last = qtd;
518 /* reinit the xacterr counter for the next qtd */
549 * overlaying the dummy qtd (which reduces DMA chatter).
598 struct ehci_qtd *qtd;
600 qtd = list_entry (entry, struct ehci_qtd, qtd_list);
601 list_del (&qtd->qtd_list);
602 ehci_qtd_free (ehci, qtd);
616 struct ehci_qtd *qtd, *qtd_prev;
627 qtd = ehci_qtd_alloc (ehci, flags);
628 if (unlikely (!qtd))
630 list_add_tail (&qtd->qtd_list, head);
631 qtd->urb = urb;
641 qtd_fill(ehci, qtd, urb->setup_dma,
647 qtd_prev = qtd;
648 qtd = ehci_qtd_alloc (ehci, flags);
649 if (unlikely (!qtd))
651 qtd->urb = urb;
652 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
653 list_add_tail (&qtd->qtd_list, head);
692 this_qtd_len = qtd_fill(ehci, qtd, buf, this_sg_len, token,
700 * qtd ... that forces the queue to stop, for manual cleanup.
704 qtd->hw_alt_next = ehci->async->hw->hw_alt_next;
706 /* qh makes control packets use qtd toggle; maybe switch it */
718 qtd_prev = qtd;
719 qtd = ehci_qtd_alloc (ehci, flags);
720 if (unlikely (!qtd))
722 qtd->urb = urb;
723 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
724 list_add_tail (&qtd->qtd_list, head);
730 * last data qtd (the only one, for control and most other cases).
734 qtd->hw_alt_next = EHCI_LIST_END(ehci);
753 qtd_prev = qtd;
754 qtd = ehci_qtd_alloc (ehci, flags);
755 if (unlikely (!qtd))
757 qtd->urb = urb;
758 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
759 list_add_tail (&qtd->qtd_list, head);
762 qtd_fill(ehci, qtd, 0, 0, token, 0);
768 qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC);
786 * Each QH holds a qtd list; a QH is used for everything except iso.
898 info1 |= 1 << 14; /* toggle from qtd */
927 info1 |= 1 << 14; /* toggle from qtd */
1009 /* qtd completions reported later by interrupt */
1038 struct ehci_qtd *qtd;
1041 qtd = NULL;
1043 qtd = list_entry (qtd_list->next, struct ehci_qtd,
1054 /* just one way to queue requests: swap with the dummy qtd.
1057 if (likely (qtd != NULL)) {
1067 token = qtd->hw_token;
1068 qtd->hw_token = HALT_BIT(ehci);
1073 *dummy = *qtd;
1076 list_del (&qtd->qtd_list);
1080 ehci_qtd_init(ehci, qtd, qtd->qtd_dma);
1081 qh->dummy = qtd;
1084 dma = qtd->qtd_dma;
1085 qtd = list_entry (qh->qtd_list.prev,
1087 qtd->hw_next = QTD_NEXT(ehci, dma);
1108 struct ehci_qtd *qtd;
1114 qtd = list_entry (qtd_list->next, struct ehci_qtd, qtd_list);
1119 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
1123 qtd, urb->ep->hcpriv);