Lines Matching refs:qh
131 dbg_qh(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in dbg_qh() argument
133 struct fotg210_qh_hw *hw = qh->hw; in dbg_qh()
135 fotg210_dbg(fotg210, "%s qh %p n%08x info %x %x qtd %x\n", label, qh, in dbg_qh()
353 static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, in qh_lines() argument
364 struct fotg210_qh_hw *hw = qh->hw; in qh_lines()
382 qh, scratch & 0x007f, in qh_lines()
394 list_for_each_entry(td, &qh->qtd_list, qtd_list) { in qh_lines()
454 struct fotg210_qh *qh; in fill_async_buffer() local
468 for (qh = fotg210->async->qh_next.qh; size > 0 && qh; in fill_async_buffer()
469 qh = qh->qh_next.qh) in fill_async_buffer()
470 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
476 for (qh = fotg210->async_unlink; size > 0 && qh; in fill_async_buffer()
477 qh = qh->unlink_next) in fill_async_buffer()
478 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
487 struct fotg210_qh_hw *hw, struct fotg210_qh *qh, unsigned size) in output_buf_tds_dir() argument
495 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
509 (scratch >> 8) & 0x000f, type, qh->usecs, in output_buf_tds_dir()
510 qh->c_usecs, temp, (scratch >> 16) & 0x7ff); in output_buf_tds_dir()
560 hw = p.qh->hw; in fill_periodic_buffer()
562 p.qh->period, in fill_periodic_buffer()
567 p.qh); in fill_periodic_buffer()
574 if (p.qh->qh_next.ptr) { in fill_periodic_buffer()
586 p.qh, size); in fill_periodic_buffer()
589 seen[seen_count++].qh = p.qh; in fill_periodic_buffer()
593 p = p.qh->qh_next; in fill_periodic_buffer()
989 struct fotg210_qh *qh);
990 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
1205 struct fotg210_qh *qh = fotg210->intr_unlink; in fotg210_handle_intr_unlinks() local
1207 if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) in fotg210_handle_intr_unlinks()
1209 fotg210->intr_unlink = qh->unlink_next; in fotg210_handle_intr_unlinks()
1210 qh->unlink_next = NULL; in fotg210_handle_intr_unlinks()
1211 end_unlink_intr(fotg210, qh); in fotg210_handle_intr_unlinks()
1838 static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_destroy() argument
1841 if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { in qh_destroy()
1845 if (qh->dummy) in qh_destroy()
1846 fotg210_qtd_free(fotg210, qh->dummy); in qh_destroy()
1847 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in qh_destroy()
1848 kfree(qh); in qh_destroy()
1854 struct fotg210_qh *qh; in fotg210_qh_alloc() local
1857 qh = kzalloc(sizeof(*qh), GFP_ATOMIC); in fotg210_qh_alloc()
1858 if (!qh) in fotg210_qh_alloc()
1860 qh->hw = (struct fotg210_qh_hw *) in fotg210_qh_alloc()
1862 if (!qh->hw) in fotg210_qh_alloc()
1864 qh->qh_dma = dma; in fotg210_qh_alloc()
1865 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1868 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1869 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1874 return qh; in fotg210_qh_alloc()
1876 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1878 kfree(qh); in fotg210_qh_alloc()
2034 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2036 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2039 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2052 is_out = qh->is_out; in qh_update()
2054 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2056 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2067 static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2071 if (list_empty(&qh->qtd_list)) in qh_refresh()
2072 qtd = qh->dummy; in qh_refresh()
2074 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2083 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2084 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2090 qh_update(fotg210, qh, qtd); in qh_refresh()
2093 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2099 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2103 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2104 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2106 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2111 struct fotg210_qh *qh, struct urb *urb, u32 token) in fotg210_clear_tt_buffer() argument
2120 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2131 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2201 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2204 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2237 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2244 struct fotg210_qh *qh) in qh_completions() argument
2246 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2252 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2254 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2267 state = qh->qh_state; in qh_completions()
2268 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2274 qh->needs_rescan = 0; in qh_completions()
2281 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2318 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2330 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2336 qh->xacterrs); in qh_completions()
2399 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2434 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2442 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2453 qh->xacterrs = 0; in qh_completions()
2464 if (unlikely(qh->needs_rescan)) { in qh_completions()
2475 qh->needs_rescan = 0; in qh_completions()
2479 qh->qh_state = state; in qh_completions()
2488 qh_refresh(fotg210, qh); in qh_completions()
2504 qh->needs_rescan = 1; in qh_completions()
2711 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2720 if (!qh) in qh_make()
2721 return qh; in qh_make()
2752 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2754 qh->start = NO_FRAME; in qh_make()
2757 qh->c_usecs = 0; in qh_make()
2758 qh->gap_uf = 0; in qh_make()
2760 qh->period = urb->interval >> 3; in qh_make()
2761 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2767 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2768 qh->period = fotg210->periodic_size; in qh_make()
2769 urb->interval = qh->period << 3; in qh_make()
2775 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2780 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2781 qh->usecs = HS_USECS(1); in qh_make()
2783 qh->usecs += HS_USECS(1); in qh_make()
2784 qh->c_usecs = HS_USECS(0); in qh_make()
2788 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2791 qh->period = urb->interval; in qh_make()
2792 if (qh->period > fotg210->periodic_size) { in qh_make()
2793 qh->period = fotg210->periodic_size; in qh_make()
2794 urb->interval = qh->period; in qh_make()
2800 qh->dev = urb->dev; in qh_make()
2864 qh_destroy(fotg210, qh); in qh_make()
2871 qh->qh_state = QH_STATE_IDLE; in qh_make()
2872 hw = qh->hw; in qh_make()
2875 qh->is_out = !is_input; in qh_make()
2877 qh_refresh(fotg210, qh); in qh_make()
2878 return qh; in qh_make()
2900 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2908 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2910 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2914 if (unlikely(qh->clearing_tt)) in qh_link_async()
2917 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2920 qh_refresh(fotg210, qh); in qh_link_async()
2924 qh->qh_next = head->qh_next; in qh_link_async()
2925 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2928 head->qh_next.qh = qh; in qh_link_async()
2931 qh->xacterrs = 0; in qh_link_async()
2932 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2947 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2950 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2951 if (unlikely(qh == NULL)) { in qh_append_tds()
2953 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2954 *ptr = qh; in qh_append_tds()
2956 if (likely(qh != NULL)) { in qh_append_tds()
2969 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
2988 dummy = qh->dummy; in qh_append_tds()
2996 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
2999 qh->dummy = qtd; in qh_append_tds()
3003 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3011 urb->hcpriv = qh; in qh_append_tds()
3014 return qh; in qh_append_tds()
3022 struct fotg210_qh *qh = NULL; in submit_async() local
3051 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3052 if (unlikely(qh == NULL)) { in submit_async()
3061 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3062 qh_link_async(fotg210, qh); in submit_async()
3065 if (unlikely(qh == NULL)) in submit_async()
3071 struct fotg210_qh *qh) in single_unlink_async() argument
3076 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3078 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3080 fotg210->async_unlink = qh; in single_unlink_async()
3081 fotg210->async_unlink_last = qh; in single_unlink_async()
3085 while (prev->qh_next.qh != qh) in single_unlink_async()
3086 prev = prev->qh_next.qh; in single_unlink_async()
3088 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3089 prev->qh_next = qh->qh_next; in single_unlink_async()
3090 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3091 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3129 struct fotg210_qh *qh; in end_unlink_async() local
3135 qh = fotg210->async_iaa; in end_unlink_async()
3136 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3137 qh->unlink_next = NULL; in end_unlink_async()
3139 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3140 qh->qh_next.qh = NULL; in end_unlink_async()
3142 qh_completions(fotg210, qh); in end_unlink_async()
3143 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3145 qh_link_async(fotg210, qh); in end_unlink_async()
3160 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3165 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3167 qh = next; in unlink_empty_async()
3168 next = qh->qh_next.qh; in unlink_empty_async()
3170 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3171 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3172 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3176 single_unlink_async(fotg210, qh); in unlink_empty_async()
3196 struct fotg210_qh *qh) in start_unlink_async() argument
3203 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3204 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3205 qh->needs_rescan = 1; in start_unlink_async()
3209 single_unlink_async(fotg210, qh); in start_unlink_async()
3215 struct fotg210_qh *qh; in scan_async() local
3218 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3220 qh = fotg210->qh_scan_next; in scan_async()
3221 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3224 if (!list_empty(&qh->qtd_list)) { in scan_async()
3234 temp = qh_completions(fotg210, qh); in scan_async()
3235 if (qh->needs_rescan) { in scan_async()
3236 start_unlink_async(fotg210, qh); in scan_async()
3237 } else if (list_empty(&qh->qtd_list) in scan_async()
3238 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3239 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3282 return &periodic->qh->qh_next; in periodic_next_shadow()
3296 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3345 hw = q->qh->hw; in periodic_usecs()
3348 usecs += q->qh->usecs; in periodic_usecs()
3352 usecs += q->qh->c_usecs; in periodic_usecs()
3354 q = &q->qh->qh_next; in periodic_usecs()
3421 hw = here.qh->hw; in tt_no_collision()
3422 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3433 here = here.qh->qh_next; in tt_no_collision()
3480 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3483 unsigned period = qh->period; in qh_link_periodic()
3485 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3487 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3488 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3489 qh->c_usecs); in qh_link_periodic()
3495 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3514 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3515 if (qh->period > here.qh->period) in qh_link_periodic()
3517 prev = &here.qh->qh_next; in qh_link_periodic()
3518 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3522 if (qh != here.qh) { in qh_link_periodic()
3523 qh->qh_next = here; in qh_link_periodic()
3524 if (here.qh) in qh_link_periodic()
3525 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3527 prev->qh = qh; in qh_link_periodic()
3528 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3531 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3532 qh->xacterrs = 0; in qh_link_periodic()
3535 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3536 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3537 : (qh->usecs * 8); in qh_link_periodic()
3539 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3547 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3568 period = qh->period; in qh_unlink_periodic()
3572 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3573 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3576 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3577 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3578 : (qh->usecs * 8); in qh_unlink_periodic()
3580 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3582 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3583 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3584 qh->c_usecs); in qh_unlink_periodic()
3587 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3588 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3590 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3591 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3593 list_del(&qh->intr_node); in qh_unlink_periodic()
3597 struct fotg210_qh *qh) in start_unlink_intr() argument
3603 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3604 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3605 qh->needs_rescan = 1; in start_unlink_intr()
3609 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3619 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3623 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3625 fotg210->intr_unlink = qh; in start_unlink_intr()
3626 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3632 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3639 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3641 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3644 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3647 qh_completions(fotg210, qh); in end_unlink_intr()
3650 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3652 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3662 qh, rc); in end_unlink_intr()
3711 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3716 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3719 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3721 if (!qh->c_usecs) { in check_intr_schedule()
3734 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3738 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3739 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3740 qh->period, qh->c_usecs)) in check_intr_schedule()
3742 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3743 qh->period, qh->c_usecs)) in check_intr_schedule()
3754 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3760 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3762 qh_refresh(fotg210, qh); in qh_schedule()
3764 frame = qh->start; in qh_schedule()
3767 if (frame < qh->period) { in qh_schedule()
3770 qh, &c_mask); in qh_schedule()
3782 if (qh->period) { in qh_schedule()
3785 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3786 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3789 frame, uframe, qh, in qh_schedule()
3799 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3804 qh->start = frame; in qh_schedule()
3808 hw->hw_info2 |= qh->period in qh_schedule()
3813 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3816 qh_link_periodic(fotg210, qh); in qh_schedule()
3826 struct fotg210_qh *qh; in intr_submit() local
3845 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3846 if (qh == NULL) { in intr_submit()
3850 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3851 status = qh_schedule(fotg210, qh); in intr_submit()
3857 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3858 BUG_ON(qh == NULL); in intr_submit()
3876 struct fotg210_qh *qh; in scan_intr() local
3878 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3882 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3892 temp = qh_completions(fotg210, qh); in scan_intr()
3893 if (unlikely(qh->needs_rescan || in scan_intr()
3894 (list_empty(&qh->qtd_list) && in scan_intr()
3895 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3896 start_unlink_intr(fotg210, qh); in scan_intr()
4961 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5299 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5312 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5313 if (!qh) in fotg210_urb_dequeue()
5315 switch (qh->qh_state) { in fotg210_urb_dequeue()
5318 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5326 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5332 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5333 if (!qh) in fotg210_urb_dequeue()
5335 switch (qh->qh_state) { in fotg210_urb_dequeue()
5338 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5341 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5345 qh, qh->qh_state); in fotg210_urb_dequeue()
5369 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5376 qh = ep->hcpriv; in fotg210_endpoint_disable()
5377 if (!qh) in fotg210_endpoint_disable()
5383 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5395 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5396 switch (qh->qh_state) { in fotg210_endpoint_disable()
5399 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5400 tmp && tmp != qh; in fotg210_endpoint_disable()
5401 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5407 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5416 if (qh->clearing_tt) in fotg210_endpoint_disable()
5418 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5419 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5428 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5429 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5441 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5451 qh = ep->hcpriv; in fotg210_endpoint_reset()
5458 if (qh) { in fotg210_endpoint_reset()
5459 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5460 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5462 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5463 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5470 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5472 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()