Lines Matching refs:qtd
46 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf, in qtd_fill() argument
53 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
54 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill()
65 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
66 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill()
79 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill()
80 qtd->length = count; in qtd_fill()
88 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) in qh_update() argument
95 hw->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_update()
124 struct ehci_qtd *qtd; in qh_refresh() local
126 qtd = list_entry(qh->qtd_list.next, struct ehci_qtd, qtd_list); in qh_refresh()
136 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
138 qh_update(ehci, qh, qtd); in qh_refresh()
321 struct ehci_qtd *qtd; in qh_completions() local
325 qtd = list_entry (entry, struct ehci_qtd, qtd_list); in qh_completions()
326 urb = qtd->urb; in qh_completions()
339 if (qtd == end) in qh_completions()
344 token = hc32_to_cpu(ehci, qtd->hw_token); in qh_completions()
358 qtd, in qh_completions()
375 qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); in qh_completions()
385 qtd->hw_token = cpu_to_hc32(ehci, in qh_completions()
404 && !(qtd->hw_alt_next in qh_completions()
437 qh->qtd_list.next == &qtd->qtd_list && in qh_completions()
459 qtd->length, token); in qh_completions()
461 && (qtd->hw_alt_next in qh_completions()
488 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
489 last = list_entry (qtd->qtd_list.prev, in qh_completions()
491 last->hw_next = qtd->hw_next; in qh_completions()
495 list_del (&qtd->qtd_list); in qh_completions()
496 last = qtd; in qh_completions()
561 struct ehci_qtd *qtd; in qtd_list_free() local
563 qtd = list_entry (entry, struct ehci_qtd, qtd_list); in qtd_list_free()
564 list_del (&qtd->qtd_list); in qtd_list_free()
565 ehci_qtd_free (ehci, qtd); in qtd_list_free()
579 struct ehci_qtd *qtd, *qtd_prev; in qh_urb_transaction() local
590 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
591 if (unlikely (!qtd)) in qh_urb_transaction()
593 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
594 qtd->urb = urb; in qh_urb_transaction()
604 qtd_fill(ehci, qtd, urb->setup_dma, in qh_urb_transaction()
610 qtd_prev = qtd; in qh_urb_transaction()
611 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
612 if (unlikely (!qtd)) in qh_urb_transaction()
614 qtd->urb = urb; in qh_urb_transaction()
615 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
616 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
655 this_qtd_len = qtd_fill(ehci, qtd, buf, this_sg_len, token, in qh_urb_transaction()
667 qtd->hw_alt_next = ehci->async->hw->hw_alt_next; in qh_urb_transaction()
681 qtd_prev = qtd; in qh_urb_transaction()
682 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
683 if (unlikely (!qtd)) in qh_urb_transaction()
685 qtd->urb = urb; in qh_urb_transaction()
686 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
687 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
697 qtd->hw_alt_next = EHCI_LIST_END(ehci); in qh_urb_transaction()
717 qtd_prev = qtd; in qh_urb_transaction()
718 qtd = ehci_qtd_alloc (ehci, flags); in qh_urb_transaction()
719 if (unlikely (!qtd)) in qh_urb_transaction()
721 qtd->urb = urb; in qh_urb_transaction()
722 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_urb_transaction()
723 list_add_tail (&qtd->qtd_list, head); in qh_urb_transaction()
726 qtd_fill(ehci, qtd, 0, 0, token, 0); in qh_urb_transaction()
732 qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC); in qh_urb_transaction()
1033 struct ehci_qtd *qtd; in qh_append_tds() local
1036 qtd = NULL; in qh_append_tds()
1038 qtd = list_entry (qtd_list->next, struct ehci_qtd, in qh_append_tds()
1052 if (likely (qtd != NULL)) { in qh_append_tds()
1062 token = qtd->hw_token; in qh_append_tds()
1063 qtd->hw_token = HALT_BIT(ehci); in qh_append_tds()
1068 *dummy = *qtd; in qh_append_tds()
1071 list_del (&qtd->qtd_list); in qh_append_tds()
1075 ehci_qtd_init(ehci, qtd, qtd->qtd_dma); in qh_append_tds()
1076 qh->dummy = qtd; in qh_append_tds()
1079 dma = qtd->qtd_dma; in qh_append_tds()
1080 qtd = list_entry (qh->qtd_list.prev, in qh_append_tds()
1082 qtd->hw_next = QTD_NEXT(ehci, dma); in qh_append_tds()
1112 struct ehci_qtd *qtd; in submit_async() local
1113 qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list); in submit_async()
1119 qtd, urb->ep->hcpriv); in submit_async()
1172 struct ehci_qtd *qtd, *qtd_prev; in submit_single_step_set_feature() local
1181 qtd = ehci_qtd_alloc(ehci, GFP_KERNEL); in submit_single_step_set_feature()
1182 if (unlikely(!qtd)) in submit_single_step_set_feature()
1184 list_add_tail(&qtd->qtd_list, head); in submit_single_step_set_feature()
1185 qtd->urb = urb; in submit_single_step_set_feature()
1198 qtd_fill(ehci, qtd, urb->setup_dma, in submit_single_step_set_feature()
1217 qtd_fill(ehci, qtd, buf, len, token, maxpacket); in submit_single_step_set_feature()
1223 qtd->hw_alt_next = EHCI_LIST_END(ehci); in submit_single_step_set_feature()
1229 qtd_prev = qtd; in submit_single_step_set_feature()
1230 qtd = ehci_qtd_alloc(ehci, GFP_ATOMIC); in submit_single_step_set_feature()
1231 if (unlikely(!qtd)) in submit_single_step_set_feature()
1233 qtd->urb = urb; in submit_single_step_set_feature()
1234 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); in submit_single_step_set_feature()
1235 list_add_tail(&qtd->qtd_list, head); in submit_single_step_set_feature()
1238 qtd_fill(ehci, qtd, 0, 0, token, 0); in submit_single_step_set_feature()
1242 qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC); in submit_single_step_set_feature()