Lines Matching refs:qh
155 dbg_qh(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in dbg_qh() argument
157 struct fotg210_qh_hw *hw = qh->hw; in dbg_qh()
160 qh, hw->hw_next, hw->hw_info1, hw->hw_info2, hw->hw_current); in dbg_qh()
378 struct fotg210_qh *qh, in qh_lines() argument
391 struct fotg210_qh_hw *hw = qh->hw; in qh_lines()
409 qh, scratch & 0x007f, in qh_lines()
421 list_for_each_entry(td, &qh->qtd_list, qtd_list) { in qh_lines()
480 struct fotg210_qh *qh; in fill_async_buffer() local
494 for (qh = fotg210->async->qh_next.qh; size > 0 && qh; in fill_async_buffer()
495 qh = qh->qh_next.qh) in fill_async_buffer()
496 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
502 for (qh = fotg210->async_unlink; size > 0 && qh; in fill_async_buffer()
503 qh = qh->unlink_next) in fill_async_buffer()
504 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
556 hw = p.qh->hw; in fill_periodic_buffer()
558 p.qh->period, in fill_periodic_buffer()
563 p.qh); in fill_periodic_buffer()
570 if (p.qh->qh_next.ptr) { in fill_periodic_buffer()
588 &p.qh->qtd_list, in fill_periodic_buffer()
609 p.qh->usecs, p.qh->c_usecs, in fill_periodic_buffer()
614 seen[seen_count++].qh = p.qh; in fill_periodic_buffer()
618 p = p.qh->qh_next; in fill_periodic_buffer()
1034 struct fotg210_qh *qh);
1035 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
1257 struct fotg210_qh *qh = fotg210->intr_unlink; in fotg210_handle_intr_unlinks() local
1259 if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) in fotg210_handle_intr_unlinks()
1261 fotg210->intr_unlink = qh->unlink_next; in fotg210_handle_intr_unlinks()
1262 qh->unlink_next = NULL; in fotg210_handle_intr_unlinks()
1263 end_unlink_intr(fotg210, qh); in fotg210_handle_intr_unlinks()
1916 static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_destroy() argument
1919 if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { in qh_destroy()
1923 if (qh->dummy) in qh_destroy()
1924 fotg210_qtd_free(fotg210, qh->dummy); in qh_destroy()
1925 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in qh_destroy()
1926 kfree(qh); in qh_destroy()
1932 struct fotg210_qh *qh; in fotg210_qh_alloc() local
1935 qh = kzalloc(sizeof(*qh), GFP_ATOMIC); in fotg210_qh_alloc()
1936 if (!qh) in fotg210_qh_alloc()
1938 qh->hw = (struct fotg210_qh_hw *) in fotg210_qh_alloc()
1940 if (!qh->hw) in fotg210_qh_alloc()
1942 memset(qh->hw, 0, sizeof(*qh->hw)); in fotg210_qh_alloc()
1943 qh->qh_dma = dma; in fotg210_qh_alloc()
1944 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1947 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1948 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1953 return qh; in fotg210_qh_alloc()
1955 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1957 kfree(qh); in fotg210_qh_alloc()
2127 qh_update(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, in qh_update() argument
2130 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2133 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2146 is_out = qh->is_out; in qh_update()
2148 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2150 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2162 qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2166 if (list_empty(&qh->qtd_list)) in qh_refresh()
2167 qtd = qh->dummy; in qh_refresh()
2169 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2178 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2179 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2185 qh_update(fotg210, qh, qtd); in qh_refresh()
2190 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2196 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2200 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2201 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2203 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2208 struct fotg210_qh *qh, in fotg210_clear_tt_buffer() argument
2218 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2228 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2302 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2305 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2338 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2346 qh_completions(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_completions() argument
2348 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2354 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2356 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2369 state = qh->qh_state; in qh_completions()
2370 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2376 qh->needs_rescan = 0; in qh_completions()
2383 list_for_each_safe(entry, tmp, &qh->qtd_list) { in qh_completions()
2425 qh); in qh_completions()
2437 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2441 qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); in qh_completions()
2504 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2539 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2547 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2558 qh->xacterrs = 0; in qh_completions()
2569 if (unlikely(qh->needs_rescan)) { in qh_completions()
2580 qh->needs_rescan = 0; in qh_completions()
2584 qh->qh_state = state; in qh_completions()
2593 qh_refresh(fotg210, qh); in qh_completions()
2609 qh->needs_rescan = 1; in qh_completions()
2840 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2847 if (!qh) in qh_make()
2848 return qh; in qh_make()
2878 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2881 qh->start = NO_FRAME; in qh_make()
2884 qh->c_usecs = 0; in qh_make()
2885 qh->gap_uf = 0; in qh_make()
2887 qh->period = urb->interval >> 3; in qh_make()
2888 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2894 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2895 qh->period = fotg210->periodic_size; in qh_make()
2896 urb->interval = qh->period << 3; in qh_make()
2902 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2907 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2908 qh->usecs = HS_USECS(1); in qh_make()
2910 qh->usecs += HS_USECS(1); in qh_make()
2911 qh->c_usecs = HS_USECS(0); in qh_make()
2915 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2918 qh->period = urb->interval; in qh_make()
2919 if (qh->period > fotg210->periodic_size) { in qh_make()
2920 qh->period = fotg210->periodic_size; in qh_make()
2921 urb->interval = qh->period; in qh_make()
2927 qh->dev = urb->dev; in qh_make()
2991 qh_destroy(fotg210, qh); in qh_make()
2998 qh->qh_state = QH_STATE_IDLE; in qh_make()
2999 hw = qh->hw; in qh_make()
3002 qh->is_out = !is_input; in qh_make()
3004 qh_refresh(fotg210, qh); in qh_make()
3005 return qh; in qh_make()
3029 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
3037 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
3039 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
3043 if (unlikely(qh->clearing_tt)) in qh_link_async()
3046 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
3049 qh_refresh(fotg210, qh); in qh_link_async()
3053 qh->qh_next = head->qh_next; in qh_link_async()
3054 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
3057 head->qh_next.qh = qh; in qh_link_async()
3060 qh->xacterrs = 0; in qh_link_async()
3061 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
3083 struct fotg210_qh *qh = NULL; in qh_append_tds() local
3086 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
3087 if (unlikely(qh == NULL)) { in qh_append_tds()
3089 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
3090 *ptr = qh; in qh_append_tds()
3092 if (likely(qh != NULL)) { in qh_append_tds()
3105 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
3124 dummy = qh->dummy; in qh_append_tds()
3132 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
3135 qh->dummy = qtd; in qh_append_tds()
3139 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3147 urb->hcpriv = qh; in qh_append_tds()
3150 return qh; in qh_append_tds()
3164 struct fotg210_qh *qh = NULL; in submit_async() local
3191 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3192 if (unlikely(qh == NULL)) { in submit_async()
3201 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3202 qh_link_async(fotg210, qh); in submit_async()
3205 if (unlikely(qh == NULL)) in submit_async()
3213 struct fotg210_qh *qh) in single_unlink_async() argument
3218 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3220 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3222 fotg210->async_unlink = qh; in single_unlink_async()
3223 fotg210->async_unlink_last = qh; in single_unlink_async()
3227 while (prev->qh_next.qh != qh) in single_unlink_async()
3228 prev = prev->qh_next.qh; in single_unlink_async()
3230 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3231 prev->qh_next = qh->qh_next; in single_unlink_async()
3232 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3233 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3271 struct fotg210_qh *qh; in end_unlink_async() local
3277 qh = fotg210->async_iaa; in end_unlink_async()
3278 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3279 qh->unlink_next = NULL; in end_unlink_async()
3281 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3282 qh->qh_next.qh = NULL; in end_unlink_async()
3284 qh_completions(fotg210, qh); in end_unlink_async()
3285 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3287 qh_link_async(fotg210, qh); in end_unlink_async()
3302 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3307 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3309 qh = next; in unlink_empty_async()
3310 next = qh->qh_next.qh; in unlink_empty_async()
3312 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3313 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3314 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3318 single_unlink_async(fotg210, qh); in unlink_empty_async()
3338 struct fotg210_qh *qh) in start_unlink_async() argument
3345 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3346 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3347 qh->needs_rescan = 1; in start_unlink_async()
3351 single_unlink_async(fotg210, qh); in start_unlink_async()
3359 struct fotg210_qh *qh; in scan_async() local
3362 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3364 qh = fotg210->qh_scan_next; in scan_async()
3365 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3368 if (!list_empty(&qh->qtd_list)) { in scan_async()
3378 temp = qh_completions(fotg210, qh); in scan_async()
3379 if (qh->needs_rescan) { in scan_async()
3380 start_unlink_async(fotg210, qh); in scan_async()
3381 } else if (list_empty(&qh->qtd_list) in scan_async()
3382 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3383 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3433 return &periodic->qh->qh_next; in periodic_next_shadow()
3448 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3497 hw = q->qh->hw; in periodic_usecs()
3500 usecs += q->qh->usecs; in periodic_usecs()
3504 usecs += q->qh->c_usecs; in periodic_usecs()
3506 q = &q->qh->qh_next; in periodic_usecs()
3580 hw = here.qh->hw; in tt_no_collision()
3581 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3592 here = here.qh->qh_next; in tt_no_collision()
3643 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3646 unsigned period = qh->period; in qh_link_periodic()
3648 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3650 period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) in qh_link_periodic()
3652 qh, qh->start, qh->usecs, qh->c_usecs); in qh_link_periodic()
3658 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3677 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3678 if (qh->period > here.qh->period) in qh_link_periodic()
3680 prev = &here.qh->qh_next; in qh_link_periodic()
3681 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3685 if (qh != here.qh) { in qh_link_periodic()
3686 qh->qh_next = here; in qh_link_periodic()
3687 if (here.qh) in qh_link_periodic()
3688 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3690 prev->qh = qh; in qh_link_periodic()
3691 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3694 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3695 qh->xacterrs = 0; in qh_link_periodic()
3698 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3699 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3700 : (qh->usecs * 8); in qh_link_periodic()
3702 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3710 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3731 period = qh->period; in qh_unlink_periodic()
3735 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3736 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3739 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3740 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3741 : (qh->usecs * 8); in qh_unlink_periodic()
3743 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3745 qh->period, in qh_unlink_periodic()
3746 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3747 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, qh->c_usecs); in qh_unlink_periodic()
3750 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3751 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3753 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3754 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3756 list_del(&qh->intr_node); in qh_unlink_periodic()
3760 struct fotg210_qh *qh) in start_unlink_intr() argument
3766 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3767 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3768 qh->needs_rescan = 1; in start_unlink_intr()
3772 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3782 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3786 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3788 fotg210->intr_unlink = qh; in start_unlink_intr()
3789 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3795 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3802 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3804 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3807 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3810 qh_completions(fotg210, qh); in end_unlink_intr()
3813 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3815 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3825 qh, rc); in end_unlink_intr()
3883 const struct fotg210_qh *qh, in check_intr_schedule() argument
3890 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3893 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3895 if (!qh->c_usecs) { in check_intr_schedule()
3908 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3912 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3913 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3914 qh->period, qh->c_usecs)) in check_intr_schedule()
3916 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3917 qh->period, qh->c_usecs)) in check_intr_schedule()
3928 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3934 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3936 qh_refresh(fotg210, qh); in qh_schedule()
3938 frame = qh->start; in qh_schedule()
3941 if (frame < qh->period) { in qh_schedule()
3944 qh, &c_mask); in qh_schedule()
3956 if (qh->period) { in qh_schedule()
3959 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3960 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3963 frame, uframe, qh, in qh_schedule()
3973 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3978 qh->start = frame; in qh_schedule()
3982 hw->hw_info2 |= qh->period in qh_schedule()
3987 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3990 qh_link_periodic(fotg210, qh); in qh_schedule()
4003 struct fotg210_qh *qh; in intr_submit() local
4022 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
4023 if (qh == NULL) { in intr_submit()
4027 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
4028 status = qh_schedule(fotg210, qh); in intr_submit()
4034 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
4035 BUG_ON(qh == NULL); in intr_submit()
4053 struct fotg210_qh *qh; in scan_intr() local
4055 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
4059 if (!list_empty(&qh->qtd_list)) { in scan_intr()
4069 temp = qh_completions(fotg210, qh); in scan_intr()
4070 if (unlikely(qh->needs_rescan || in scan_intr()
4071 (list_empty(&qh->qtd_list) && in scan_intr()
4072 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
4073 start_unlink_intr(fotg210, qh); in scan_intr()
5197 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5543 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5556 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5557 if (!qh) in fotg210_urb_dequeue()
5559 switch (qh->qh_state) { in fotg210_urb_dequeue()
5562 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5570 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5576 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5577 if (!qh) in fotg210_urb_dequeue()
5579 switch (qh->qh_state) { in fotg210_urb_dequeue()
5582 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5585 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5589 qh, qh->qh_state); in fotg210_urb_dequeue()
5615 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5622 qh = ep->hcpriv; in fotg210_endpoint_disable()
5623 if (!qh) in fotg210_endpoint_disable()
5629 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5641 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5642 switch (qh->qh_state) { in fotg210_endpoint_disable()
5645 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5646 tmp && tmp != qh; in fotg210_endpoint_disable()
5647 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5653 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5662 if (qh->clearing_tt) in fotg210_endpoint_disable()
5664 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5665 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5674 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5675 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5687 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5697 qh = ep->hcpriv; in fotg210_endpoint_reset()
5704 if (qh) { in fotg210_endpoint_reset()
5705 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5706 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5708 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5709 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5716 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5718 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()