Lines Matching refs:qtd

116 dbg_qtd(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd)  in dbg_qtd()  argument
118 fotg210_dbg(fotg210, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, in dbg_qtd()
119 hc32_to_cpup(fotg210, &qtd->hw_next), in dbg_qtd()
120 hc32_to_cpup(fotg210, &qtd->hw_alt_next), in dbg_qtd()
121 hc32_to_cpup(fotg210, &qtd->hw_token), in dbg_qtd()
122 hc32_to_cpup(fotg210, &qtd->hw_buf[0])); in dbg_qtd()
123 if (qtd->hw_buf[1]) in dbg_qtd()
125 hc32_to_cpup(fotg210, &qtd->hw_buf[1]), in dbg_qtd()
126 hc32_to_cpup(fotg210, &qtd->hw_buf[2]), in dbg_qtd()
127 hc32_to_cpup(fotg210, &qtd->hw_buf[3]), in dbg_qtd()
128 hc32_to_cpup(fotg210, &qtd->hw_buf[4])); in dbg_qtd()
491 struct fotg210_qtd *qtd; in output_buf_tds_dir() local
496 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
498 switch ((hc32_to_cpu(fotg210, qtd->hw_token) >> 8) & 0x03) { in output_buf_tds_dir()
1809 struct fotg210_qtd *qtd, dma_addr_t dma) in fotg210_qtd_init() argument
1811 memset(qtd, 0, sizeof(*qtd)); in fotg210_qtd_init()
1812 qtd->qtd_dma = dma; in fotg210_qtd_init()
1813 qtd->hw_token = cpu_to_hc32(fotg210, QTD_STS_HALT); in fotg210_qtd_init()
1814 qtd->hw_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1815 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1816 INIT_LIST_HEAD(&qtd->qtd_list); in fotg210_qtd_init()
1822 struct fotg210_qtd *qtd; in fotg210_qtd_alloc() local
1825 qtd = dma_pool_alloc(fotg210->qtd_pool, flags, &dma); in fotg210_qtd_alloc()
1826 if (qtd != NULL) in fotg210_qtd_alloc()
1827 fotg210_qtd_init(fotg210, qtd, dma); in fotg210_qtd_alloc()
1829 return qtd; in fotg210_qtd_alloc()
1833 struct fotg210_qtd *qtd) in fotg210_qtd_free() argument
1835 dma_pool_free(fotg210->qtd_pool, qtd, qtd->qtd_dma); in fotg210_qtd_free()
1995 static int qtd_fill(struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd, in qtd_fill() argument
2002 qtd->hw_buf[0] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
2003 qtd->hw_buf_hi[0] = cpu_to_hc32(fotg210, (u32)(addr >> 32)); in qtd_fill()
2014 qtd->hw_buf[i] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
2015 qtd->hw_buf_hi[i] = cpu_to_hc32(fotg210, in qtd_fill()
2028 qtd->hw_token = cpu_to_hc32(fotg210, (count << 16) | token); in qtd_fill()
2029 qtd->length = count; in qtd_fill()
2035 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2042 hw->hw_qtd_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_update()
2070 struct fotg210_qtd *qtd; in qh_refresh() local
2073 qtd = qh->dummy; in qh_refresh()
2075 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2084 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2085 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2086 qtd = NULL; in qh_refresh()
2090 if (qtd) in qh_refresh()
2091 qh_update(fotg210, qh, qtd); in qh_refresh()
2248 struct fotg210_qtd *qtd, *tmp; in qh_completions() local
2282 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2286 urb = qtd->urb; in qh_completions()
2301 if (qtd == end) in qh_completions()
2306 token = hc32_to_cpu(fotg210, qtd->hw_token); in qh_completions()
2319 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2335 qtd->length - QTD_LENGTH(token), in qh_completions()
2336 qtd->length, in qh_completions()
2347 qtd->hw_token = cpu_to_hc32(fotg210, in qh_completions()
2366 !(qtd->hw_alt_next & in qh_completions()
2392 cpu_to_hc32(fotg210, qtd->qtd_dma) in qh_completions()
2414 qtd->length, token); in qh_completions()
2416 (qtd->hw_alt_next & in qh_completions()
2443 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2444 last = list_entry(qtd->qtd_list.prev, in qh_completions()
2446 last->hw_next = qtd->hw_next; in qh_completions()
2450 list_del(&qtd->qtd_list); in qh_completions()
2451 last = qtd; in qh_completions()
2520 struct fotg210_qtd *qtd, *temp; in qtd_list_free() local
2522 list_for_each_entry_safe(qtd, temp, head, qtd_list) { in qtd_list_free()
2523 list_del(&qtd->qtd_list); in qtd_list_free()
2524 fotg210_qtd_free(fotg210, qtd); in qtd_list_free()
2533 struct fotg210_qtd *qtd, *qtd_prev; in qh_urb_transaction() local
2544 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2545 if (unlikely(!qtd)) in qh_urb_transaction()
2547 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2548 qtd->urb = urb; in qh_urb_transaction()
2558 qtd_fill(fotg210, qtd, urb->setup_dma, in qh_urb_transaction()
2564 qtd_prev = qtd; in qh_urb_transaction()
2565 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2566 if (unlikely(!qtd)) in qh_urb_transaction()
2568 qtd->urb = urb; in qh_urb_transaction()
2569 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2570 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2609 this_qtd_len = qtd_fill(fotg210, qtd, buf, this_sg_len, token, in qh_urb_transaction()
2621 qtd->hw_alt_next = fotg210->async->hw->hw_alt_next; in qh_urb_transaction()
2635 qtd_prev = qtd; in qh_urb_transaction()
2636 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2637 if (unlikely(!qtd)) in qh_urb_transaction()
2639 qtd->urb = urb; in qh_urb_transaction()
2640 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2641 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2651 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in qh_urb_transaction()
2671 qtd_prev = qtd; in qh_urb_transaction()
2672 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2673 if (unlikely(!qtd)) in qh_urb_transaction()
2675 qtd->urb = urb; in qh_urb_transaction()
2676 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2677 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2680 qtd_fill(fotg210, qtd, 0, 0, token, 0); in qh_urb_transaction()
2686 qtd->hw_token |= cpu_to_hc32(fotg210, QTD_IOC); in qh_urb_transaction()
2958 struct fotg210_qtd *qtd; in qh_append_tds() local
2961 qtd = NULL; in qh_append_tds()
2963 qtd = list_entry(qtd_list->next, struct fotg210_qtd, in qh_append_tds()
2976 if (likely(qtd != NULL)) { in qh_append_tds()
2986 token = qtd->hw_token; in qh_append_tds()
2987 qtd->hw_token = HALT_BIT(fotg210); in qh_append_tds()
2992 *dummy = *qtd; in qh_append_tds()
2995 list_del(&qtd->qtd_list); in qh_append_tds()
2999 fotg210_qtd_init(fotg210, qtd, qtd->qtd_dma); in qh_append_tds()
3000 qh->dummy = qtd; in qh_append_tds()
3003 dma = qtd->qtd_dma; in qh_append_tds()
3004 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3006 qtd->hw_next = QTD_NEXT(fotg210, dma); in qh_append_tds()
3030 struct fotg210_qtd *qtd; in submit_async() local
3032 qtd = list_entry(qtd_list->next, struct fotg210_qtd, qtd_list); in submit_async()
3039 qtd, urb->ep->hcpriv); in submit_async()