Lines Matching refs:qtd
37 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf, in qtd_fill() argument
44 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
45 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill()
56 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
57 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill()
70 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill()
71 qtd->length = count; in qtd_fill()
79 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) in qh_update() argument
86 hw->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_update()
115 struct ehci_qtd *qtd; in qh_refresh() local
117 qtd = list_entry(qh->qtd_list.next, struct ehci_qtd, qtd_list); in qh_refresh()
127 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
131 qh_update(ehci, qh, qtd); in qh_refresh()
323 struct ehci_qtd *qtd; in qh_completions() local
327 qtd = list_entry (entry, struct ehci_qtd, qtd_list); in qh_completions()
328 urb = qtd->urb; in qh_completions()
341 if (qtd == end) in qh_completions()
346 token = hc32_to_cpu(ehci, qtd->hw_token); in qh_completions()
360 qtd, in qh_completions()
377 qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); in qh_completions()
387 qtd->hw_token = cpu_to_hc32(ehci, in qh_completions()
407 && !(qtd->hw_alt_next in qh_completions()
443 qh->qtd_list.next == &qtd->qtd_list && in qh_completions()
466 qtd->length, token); in qh_completions()
468 && (qtd->hw_alt_next in qh_completions()
495 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
496 last = list_entry (qtd->qtd_list.prev, in qh_completions()
498 last->hw_next = qtd->hw_next; in qh_completions()
502 list_del (&qtd->qtd_list); in qh_completions()
503 last = qtd; in qh_completions()
563 struct ehci_qtd *qtd; in qtd_list_free() local
565 qtd = list_entry (entry, struct ehci_qtd, qtd_list); in qtd_list_free()
566 list_del (&qtd->qtd_list); in qtd_list_free()
567 ehci_qtd_free (ehci, qtd); in qtd_list_free()
581 struct ehci_qtd *qtd, *qtd_prev; in qh_urb_transaction() local
592 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
593 if (unlikely (!qtd)) in qh_urb_transaction()
595 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
596 qtd->urb = urb; in qh_urb_transaction()
606 qtd_fill(ehci, qtd, urb->setup_dma, in qh_urb_transaction()
612 qtd_prev = qtd; in qh_urb_transaction()
613 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
614 if (unlikely (!qtd)) in qh_urb_transaction()
616 qtd->urb = urb; in qh_urb_transaction()
617 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
618 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
657 this_qtd_len = qtd_fill(ehci, qtd, buf, this_sg_len, token, in qh_urb_transaction()
669 qtd->hw_alt_next = ehci->async->hw->hw_alt_next; in qh_urb_transaction()
683 qtd_prev = qtd; in qh_urb_transaction()
684 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
685 if (unlikely (!qtd)) in qh_urb_transaction()
687 qtd->urb = urb; in qh_urb_transaction()
688 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
689 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
699 qtd->hw_alt_next = EHCI_LIST_END(ehci); in qh_urb_transaction()
719 qtd_prev = qtd; in qh_urb_transaction()
720 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
721 if (unlikely (!qtd)) in qh_urb_transaction()
723 qtd->urb = urb; in qh_urb_transaction()
724 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
725 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
728 qtd_fill(ehci, qtd, 0, 0, token, 0); in qh_urb_transaction()
734 qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC); in qh_urb_transaction()
1038 struct ehci_qtd *qtd; in qh_append_tds() local
1041 qtd = NULL; in qh_append_tds()
1043 qtd = list_entry (qtd_list->next, struct ehci_qtd, in qh_append_tds()
1057 if (likely (qtd != NULL)) { in qh_append_tds()
1067 token = qtd->hw_token; in qh_append_tds()
1068 qtd->hw_token = HALT_BIT(ehci); in qh_append_tds()
1073 *dummy = *qtd; in qh_append_tds()
1076 list_del (&qtd->qtd_list); in qh_append_tds()
1080 ehci_qtd_init(ehci, qtd, qtd->qtd_dma); in qh_append_tds()
1081 qh->dummy = qtd; in qh_append_tds()
1084 dma = qtd->qtd_dma; in qh_append_tds()
1085 qtd = list_entry (qh->qtd_list.prev, in qh_append_tds()
1087 qtd->hw_next = QTD_NEXT(ehci, dma); in qh_append_tds()
1117 struct ehci_qtd *qtd; in submit_async() local
1118 qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list); in submit_async()
1124 qtd, urb->ep->hcpriv); in submit_async()
1177 struct ehci_qtd *qtd, *qtd_prev; in ehci_submit_single_step_set_feature() local
1186 qtd = ehci_qtd_alloc(ehci, GFP_KERNEL); in ehci_submit_single_step_set_feature()
1187 if (unlikely(!qtd)) in ehci_submit_single_step_set_feature()
1189 list_add_tail(&qtd->qtd_list, head); in ehci_submit_single_step_set_feature()
1190 qtd->urb = urb; in ehci_submit_single_step_set_feature()
1203 qtd_fill(ehci, qtd, urb->setup_dma, in ehci_submit_single_step_set_feature()
1222 qtd_fill(ehci, qtd, buf, len, token, maxpacket); in ehci_submit_single_step_set_feature()
1228 qtd->hw_alt_next = EHCI_LIST_END(ehci); in ehci_submit_single_step_set_feature()
1234 qtd_prev = qtd; in ehci_submit_single_step_set_feature()
1235 qtd = ehci_qtd_alloc(ehci, GFP_ATOMIC); in ehci_submit_single_step_set_feature()
1236 if (unlikely(!qtd)) in ehci_submit_single_step_set_feature()
1238 qtd->urb = urb; in ehci_submit_single_step_set_feature()
1239 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in ehci_submit_single_step_set_feature()
1240 list_add_tail(&qtd->qtd_list, head); in ehci_submit_single_step_set_feature()
1243 qtd_fill(ehci, qtd, 0, 0, token | QTD_IOC, 0); in ehci_submit_single_step_set_feature()