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()
1808 struct fotg210_qtd *qtd, dma_addr_t dma) in fotg210_qtd_init() argument
1810 memset(qtd, 0, sizeof(*qtd)); in fotg210_qtd_init()
1811 qtd->qtd_dma = dma; in fotg210_qtd_init()
1812 qtd->hw_token = cpu_to_hc32(fotg210, QTD_STS_HALT); in fotg210_qtd_init()
1813 qtd->hw_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1814 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in fotg210_qtd_init()
1815 INIT_LIST_HEAD(&qtd->qtd_list); in fotg210_qtd_init()
1821 struct fotg210_qtd *qtd; in fotg210_qtd_alloc() local
1824 qtd = dma_pool_alloc(fotg210->qtd_pool, flags, &dma); in fotg210_qtd_alloc()
1825 if (qtd != NULL) in fotg210_qtd_alloc()
1826 fotg210_qtd_init(fotg210, qtd, dma); in fotg210_qtd_alloc()
1828 return qtd; in fotg210_qtd_alloc()
1832 struct fotg210_qtd *qtd) in fotg210_qtd_free() argument
1834 dma_pool_free(fotg210->qtd_pool, qtd, qtd->qtd_dma); in fotg210_qtd_free()
1993 static int qtd_fill(struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd, in qtd_fill() argument
2000 qtd->hw_buf[0] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
2001 qtd->hw_buf_hi[0] = cpu_to_hc32(fotg210, (u32)(addr >> 32)); in qtd_fill()
2012 qtd->hw_buf[i] = cpu_to_hc32(fotg210, (u32)addr); in qtd_fill()
2013 qtd->hw_buf_hi[i] = cpu_to_hc32(fotg210, in qtd_fill()
2026 qtd->hw_token = cpu_to_hc32(fotg210, (count << 16) | token); in qtd_fill()
2027 qtd->length = count; in qtd_fill()
2033 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2040 hw->hw_qtd_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_update()
2068 struct fotg210_qtd *qtd; in qh_refresh() local
2071 qtd = qh->dummy; in qh_refresh()
2073 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2082 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2083 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2084 qtd = NULL; in qh_refresh()
2088 if (qtd) in qh_refresh()
2089 qh_update(fotg210, qh, qtd); in qh_refresh()
2246 struct fotg210_qtd *qtd, *tmp; in qh_completions() local
2280 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2284 urb = qtd->urb; in qh_completions()
2299 if (qtd == end) in qh_completions()
2304 token = hc32_to_cpu(fotg210, qtd->hw_token); in qh_completions()
2317 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2333 qtd->length - QTD_LENGTH(token), in qh_completions()
2334 qtd->length, in qh_completions()
2345 qtd->hw_token = cpu_to_hc32(fotg210, in qh_completions()
2364 !(qtd->hw_alt_next & in qh_completions()
2390 cpu_to_hc32(fotg210, qtd->qtd_dma) in qh_completions()
2412 qtd->length, token); in qh_completions()
2414 (qtd->hw_alt_next & in qh_completions()
2441 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2442 last = list_entry(qtd->qtd_list.prev, in qh_completions()
2444 last->hw_next = qtd->hw_next; in qh_completions()
2448 list_del(&qtd->qtd_list); in qh_completions()
2449 last = qtd; in qh_completions()
2523 struct fotg210_qtd *qtd, *temp; in qtd_list_free() local
2525 list_for_each_entry_safe(qtd, temp, head, qtd_list) { in qtd_list_free()
2526 list_del(&qtd->qtd_list); in qtd_list_free()
2527 fotg210_qtd_free(fotg210, qtd); in qtd_list_free()
2536 struct fotg210_qtd *qtd, *qtd_prev; in qh_urb_transaction() local
2547 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2548 if (unlikely(!qtd)) in qh_urb_transaction()
2550 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2551 qtd->urb = urb; in qh_urb_transaction()
2561 qtd_fill(fotg210, qtd, urb->setup_dma, in qh_urb_transaction()
2567 qtd_prev = qtd; in qh_urb_transaction()
2568 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2569 if (unlikely(!qtd)) in qh_urb_transaction()
2571 qtd->urb = urb; in qh_urb_transaction()
2572 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2573 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2612 this_qtd_len = qtd_fill(fotg210, qtd, buf, this_sg_len, token, in qh_urb_transaction()
2624 qtd->hw_alt_next = fotg210->async->hw->hw_alt_next; in qh_urb_transaction()
2638 qtd_prev = qtd; in qh_urb_transaction()
2639 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2640 if (unlikely(!qtd)) in qh_urb_transaction()
2642 qtd->urb = urb; in qh_urb_transaction()
2643 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2644 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2654 qtd->hw_alt_next = FOTG210_LIST_END(fotg210); in qh_urb_transaction()
2674 qtd_prev = qtd; in qh_urb_transaction()
2675 qtd = fotg210_qtd_alloc(fotg210, flags); in qh_urb_transaction()
2676 if (unlikely(!qtd)) in qh_urb_transaction()
2678 qtd->urb = urb; in qh_urb_transaction()
2679 qtd_prev->hw_next = QTD_NEXT(fotg210, qtd->qtd_dma); in qh_urb_transaction()
2680 list_add_tail(&qtd->qtd_list, head); in qh_urb_transaction()
2683 qtd_fill(fotg210, qtd, 0, 0, token, 0); in qh_urb_transaction()
2689 qtd->hw_token |= cpu_to_hc32(fotg210, QTD_IOC); in qh_urb_transaction()
2959 struct fotg210_qtd *qtd; in qh_append_tds() local
2962 qtd = NULL; in qh_append_tds()
2964 qtd = list_entry(qtd_list->next, struct fotg210_qtd, in qh_append_tds()
2977 if (likely(qtd != NULL)) { in qh_append_tds()
2987 token = qtd->hw_token; in qh_append_tds()
2988 qtd->hw_token = HALT_BIT(fotg210); in qh_append_tds()
2993 *dummy = *qtd; in qh_append_tds()
2996 list_del(&qtd->qtd_list); in qh_append_tds()
3000 fotg210_qtd_init(fotg210, qtd, qtd->qtd_dma); in qh_append_tds()
3001 qh->dummy = qtd; in qh_append_tds()
3004 dma = qtd->qtd_dma; in qh_append_tds()
3005 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3007 qtd->hw_next = QTD_NEXT(fotg210, dma); in qh_append_tds()
3031 struct fotg210_qtd *qtd; in submit_async() local
3033 qtd = list_entry(qtd_list->next, struct fotg210_qtd, qtd_list); in submit_async()
3040 qtd, urb->ep->hcpriv); in submit_async()