Lines Matching refs:qtd

115 dbg_qtd(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd)  in dbg_qtd()  argument
117 fotg210_dbg(fotg210, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, in dbg_qtd()
118 hc32_to_cpup(fotg210, &qtd->hw_next), in dbg_qtd()
119 hc32_to_cpup(fotg210, &qtd->hw_alt_next), in dbg_qtd()
120 hc32_to_cpup(fotg210, &qtd->hw_token), in dbg_qtd()
121 hc32_to_cpup(fotg210, &qtd->hw_buf[0])); in dbg_qtd()
122 if (qtd->hw_buf[1]) in dbg_qtd()
124 hc32_to_cpup(fotg210, &qtd->hw_buf[1]), in dbg_qtd()
125 hc32_to_cpup(fotg210, &qtd->hw_buf[2]), in dbg_qtd()
126 hc32_to_cpup(fotg210, &qtd->hw_buf[3]), in dbg_qtd()
127 hc32_to_cpup(fotg210, &qtd->hw_buf[4])); in dbg_qtd()
483 struct fotg210_qtd *qtd; in output_buf_tds_dir() local
488 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
490 switch ((hc32_to_cpu(fotg210, qtd->hw_token) >> 8) & 0x03) { in output_buf_tds_dir()
1801 struct fotg210_qtd *qtd, dma_addr_t dma) in fotg210_qtd_init() argument
1803 memset(qtd, 0, sizeof(*qtd)); in fotg210_qtd_init()
1804 qtd->qtd_dma = dma; in fotg210_qtd_init()
1805 qtd->hw_token = cpu_to_hc32(fotg210, QTD_STS_HALT); in fotg210_qtd_init()
1806 qtd->hw_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1807 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1808 INIT_LIST_HEAD(&qtd->qtd_list); in fotg210_qtd_init()
1814 struct fotg210_qtd *qtd; in fotg210_qtd_alloc() local
1817 qtd = dma_pool_alloc(fotg210->qtd_pool, flags, &dma); in fotg210_qtd_alloc()
1818 if (qtd != NULL) in fotg210_qtd_alloc()
1819 fotg210_qtd_init(fotg210, qtd, dma); in fotg210_qtd_alloc()
1821 return qtd; in fotg210_qtd_alloc()
1825 struct fotg210_qtd *qtd) in fotg210_qtd_free() argument
1827 dma_pool_free(fotg210->qtd_pool, qtd, qtd->qtd_dma); in fotg210_qtd_free()
1987 static int qtd_fill(struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd, in qtd_fill() argument
1994 qtd->hw_buf[0] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
1995 qtd->hw_buf_hi[0] = cpu_to_hc32(fotg210, (u32)(addr >> 32)); in qtd_fill()
2006 qtd->hw_buf[i] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
2007 qtd->hw_buf_hi[i] = cpu_to_hc32(fotg210, in qtd_fill()
2020 qtd->hw_token = cpu_to_hc32(fotg210, (count << 16) | token); in qtd_fill()
2021 qtd->length = count; in qtd_fill()
2027 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2034 hw->hw_qtd_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_update()
2062 struct fotg210_qtd *qtd; in qh_refresh() local
2065 qtd = qh->dummy; in qh_refresh()
2067 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2076 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2077 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2078 qtd = NULL; in qh_refresh()
2082 if (qtd) in qh_refresh()
2083 qh_update(fotg210, qh, qtd); in qh_refresh()
2240 struct fotg210_qtd *qtd, *tmp; in qh_completions() local
2274 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2278 urb = qtd->urb; in qh_completions()
2293 if (qtd == end) in qh_completions()
2298 token = hc32_to_cpu(fotg210, qtd->hw_token); in qh_completions()
2311 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2327 qtd->length - QTD_LENGTH(token), in qh_completions()
2328 qtd->length, in qh_completions()
2339 qtd->hw_token = cpu_to_hc32(fotg210, in qh_completions()
2358 !(qtd->hw_alt_next & in qh_completions()
2384 cpu_to_hc32(fotg210, qtd->qtd_dma) in qh_completions()
2406 qtd->length, token); in qh_completions()
2408 (qtd->hw_alt_next & in qh_completions()
2435 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2436 last = list_entry(qtd->qtd_list.prev, in qh_completions()
2438 last->hw_next = qtd->hw_next; in qh_completions()
2442 list_del(&qtd->qtd_list); in qh_completions()
2443 last = qtd; in qh_completions()
2512 struct fotg210_qtd *qtd, *temp; in qtd_list_free() local
2514 list_for_each_entry_safe(qtd, temp, head, qtd_list) { in qtd_list_free()
2515 list_del(&qtd->qtd_list); in qtd_list_free()
2516 fotg210_qtd_free(fotg210, qtd); in qtd_list_free()
2525 struct fotg210_qtd *qtd, *qtd_prev; in qh_urb_transaction() local
2536 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2537 if (unlikely(!qtd)) in qh_urb_transaction()
2539 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2540 qtd->urb = urb; in qh_urb_transaction()
2550 qtd_fill(fotg210, qtd, urb->setup_dma, in qh_urb_transaction()
2556 qtd_prev = qtd; in qh_urb_transaction()
2557 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2558 if (unlikely(!qtd)) in qh_urb_transaction()
2560 qtd->urb = urb; in qh_urb_transaction()
2561 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2562 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2601 this_qtd_len = qtd_fill(fotg210, qtd, buf, this_sg_len, token, in qh_urb_transaction()
2613 qtd->hw_alt_next = fotg210->async->hw->hw_alt_next; in qh_urb_transaction()
2627 qtd_prev = qtd; in qh_urb_transaction()
2628 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2629 if (unlikely(!qtd)) in qh_urb_transaction()
2631 qtd->urb = urb; in qh_urb_transaction()
2632 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2633 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2643 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in qh_urb_transaction()
2663 qtd_prev = qtd; in qh_urb_transaction()
2664 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2665 if (unlikely(!qtd)) in qh_urb_transaction()
2667 qtd->urb = urb; in qh_urb_transaction()
2668 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2669 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2672 qtd_fill(fotg210, qtd, 0, 0, token, 0); in qh_urb_transaction()
2678 qtd->hw_token |= cpu_to_hc32(fotg210, QTD_IOC); in qh_urb_transaction()
2950 struct fotg210_qtd *qtd; in qh_append_tds() local
2953 qtd = NULL; in qh_append_tds()
2955 qtd = list_entry(qtd_list->next, struct fotg210_qtd, in qh_append_tds()
2968 if (likely(qtd != NULL)) { in qh_append_tds()
2978 token = qtd->hw_token; in qh_append_tds()
2979 qtd->hw_token = HALT_BIT(fotg210); in qh_append_tds()
2984 *dummy = *qtd; in qh_append_tds()
2987 list_del(&qtd->qtd_list); in qh_append_tds()
2991 fotg210_qtd_init(fotg210, qtd, qtd->qtd_dma); in qh_append_tds()
2992 qh->dummy = qtd; in qh_append_tds()
2995 dma = qtd->qtd_dma; in qh_append_tds()
2996 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
2998 qtd->hw_next = QTD_NEXT(fotg210, dma); in qh_append_tds()
3022 struct fotg210_qtd *qtd; in submit_async() local
3024 qtd = list_entry(qtd_list->next, struct fotg210_qtd, qtd_list); in submit_async()
3031 qtd, urb->ep->hcpriv); in submit_async()