Lines Matching refs:qh

132 dbg_qh(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh)  in dbg_qh()  argument
134 struct fotg210_qh_hw *hw = qh->hw; in dbg_qh()
136 fotg210_dbg(fotg210, "%s qh %p n%08x info %x %x qtd %x\n", label, qh, in dbg_qh()
354 static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, in qh_lines() argument
365 struct fotg210_qh_hw *hw = qh->hw; in qh_lines()
383 qh, scratch & 0x007f, in qh_lines()
395 list_for_each_entry(td, &qh->qtd_list, qtd_list) { in qh_lines()
455 struct fotg210_qh *qh; in fill_async_buffer() local
469 for (qh = fotg210->async->qh_next.qh; size > 0 && qh; in fill_async_buffer()
470 qh = qh->qh_next.qh) in fill_async_buffer()
471 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
477 for (qh = fotg210->async_unlink; size > 0 && qh; in fill_async_buffer()
478 qh = qh->unlink_next) in fill_async_buffer()
479 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
488 struct fotg210_qh_hw *hw, struct fotg210_qh *qh, unsigned size) in output_buf_tds_dir() argument
496 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
510 (scratch >> 8) & 0x000f, type, qh->usecs, in output_buf_tds_dir()
511 qh->c_usecs, temp, (scratch >> 16) & 0x7ff); in output_buf_tds_dir()
561 hw = p.qh->hw; in fill_periodic_buffer()
563 p.qh->period, in fill_periodic_buffer()
568 p.qh); in fill_periodic_buffer()
575 if (p.qh->qh_next.ptr) { in fill_periodic_buffer()
587 p.qh, size); in fill_periodic_buffer()
590 seen[seen_count++].qh = p.qh; in fill_periodic_buffer()
594 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 = dma_pool_zalloc(fotg210->qh_pool, flags, &dma); in fotg210_qh_alloc()
1861 if (!qh->hw) in fotg210_qh_alloc()
1863 qh->qh_dma = dma; in fotg210_qh_alloc()
1864 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1867 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1868 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1873 return qh; in fotg210_qh_alloc()
1875 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1877 kfree(qh); in fotg210_qh_alloc()
2033 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2035 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2038 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2051 is_out = qh->is_out; in qh_update()
2053 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2055 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2066 static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2070 if (list_empty(&qh->qtd_list)) in qh_refresh()
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()
2089 qh_update(fotg210, qh, qtd); in qh_refresh()
2092 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2098 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2102 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2103 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2105 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2110 struct fotg210_qh *qh, struct urb *urb, u32 token) in fotg210_clear_tt_buffer() argument
2119 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2130 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2200 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2203 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2236 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2243 struct fotg210_qh *qh) in qh_completions() argument
2245 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2251 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2253 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2266 state = qh->qh_state; in qh_completions()
2267 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2273 qh->needs_rescan = 0; in qh_completions()
2280 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2317 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2329 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2335 qh->xacterrs); in qh_completions()
2398 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2433 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2441 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2452 qh->xacterrs = 0; in qh_completions()
2463 if (unlikely(qh->needs_rescan)) { in qh_completions()
2474 qh->needs_rescan = 0; in qh_completions()
2478 qh->qh_state = state; in qh_completions()
2487 qh_refresh(fotg210, qh); in qh_completions()
2503 qh->needs_rescan = 1; in qh_completions()
2710 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2719 if (!qh) in qh_make()
2720 return qh; in qh_make()
2751 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2753 qh->start = NO_FRAME; in qh_make()
2756 qh->c_usecs = 0; in qh_make()
2757 qh->gap_uf = 0; in qh_make()
2759 qh->period = urb->interval >> 3; in qh_make()
2760 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2766 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2767 qh->period = fotg210->periodic_size; in qh_make()
2768 urb->interval = qh->period << 3; in qh_make()
2774 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2779 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2780 qh->usecs = HS_USECS(1); in qh_make()
2782 qh->usecs += HS_USECS(1); in qh_make()
2783 qh->c_usecs = HS_USECS(0); in qh_make()
2787 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2790 qh->period = urb->interval; in qh_make()
2791 if (qh->period > fotg210->periodic_size) { in qh_make()
2792 qh->period = fotg210->periodic_size; in qh_make()
2793 urb->interval = qh->period; in qh_make()
2799 qh->dev = urb->dev; in qh_make()
2863 qh_destroy(fotg210, qh); in qh_make()
2870 qh->qh_state = QH_STATE_IDLE; in qh_make()
2871 hw = qh->hw; in qh_make()
2874 qh->is_out = !is_input; in qh_make()
2876 qh_refresh(fotg210, qh); in qh_make()
2877 return qh; in qh_make()
2899 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2907 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2909 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2913 if (unlikely(qh->clearing_tt)) in qh_link_async()
2916 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2919 qh_refresh(fotg210, qh); in qh_link_async()
2923 qh->qh_next = head->qh_next; in qh_link_async()
2924 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2927 head->qh_next.qh = qh; in qh_link_async()
2930 qh->xacterrs = 0; in qh_link_async()
2931 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2946 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2949 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2950 if (unlikely(qh == NULL)) { in qh_append_tds()
2952 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2953 *ptr = qh; in qh_append_tds()
2955 if (likely(qh != NULL)) { in qh_append_tds()
2968 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
2987 dummy = qh->dummy; in qh_append_tds()
2995 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
2998 qh->dummy = qtd; in qh_append_tds()
3002 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3010 urb->hcpriv = qh; in qh_append_tds()
3013 return qh; in qh_append_tds()
3021 struct fotg210_qh *qh = NULL; in submit_async() local
3050 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3051 if (unlikely(qh == NULL)) { in submit_async()
3060 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3061 qh_link_async(fotg210, qh); in submit_async()
3064 if (unlikely(qh == NULL)) in submit_async()
3070 struct fotg210_qh *qh) in single_unlink_async() argument
3075 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3077 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3079 fotg210->async_unlink = qh; in single_unlink_async()
3080 fotg210->async_unlink_last = qh; in single_unlink_async()
3084 while (prev->qh_next.qh != qh) in single_unlink_async()
3085 prev = prev->qh_next.qh; in single_unlink_async()
3087 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3088 prev->qh_next = qh->qh_next; in single_unlink_async()
3089 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3090 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3128 struct fotg210_qh *qh; in end_unlink_async() local
3134 qh = fotg210->async_iaa; in end_unlink_async()
3135 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3136 qh->unlink_next = NULL; in end_unlink_async()
3138 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3139 qh->qh_next.qh = NULL; in end_unlink_async()
3141 qh_completions(fotg210, qh); in end_unlink_async()
3142 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3144 qh_link_async(fotg210, qh); in end_unlink_async()
3159 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3164 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3166 qh = next; in unlink_empty_async()
3167 next = qh->qh_next.qh; in unlink_empty_async()
3169 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3170 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3171 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3175 single_unlink_async(fotg210, qh); in unlink_empty_async()
3195 struct fotg210_qh *qh) in start_unlink_async() argument
3202 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3203 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3204 qh->needs_rescan = 1; in start_unlink_async()
3208 single_unlink_async(fotg210, qh); in start_unlink_async()
3214 struct fotg210_qh *qh; in scan_async() local
3217 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3219 qh = fotg210->qh_scan_next; in scan_async()
3220 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3223 if (!list_empty(&qh->qtd_list)) { in scan_async()
3233 temp = qh_completions(fotg210, qh); in scan_async()
3234 if (qh->needs_rescan) { in scan_async()
3235 start_unlink_async(fotg210, qh); in scan_async()
3236 } else if (list_empty(&qh->qtd_list) in scan_async()
3237 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3238 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3281 return &periodic->qh->qh_next; in periodic_next_shadow()
3295 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3344 hw = q->qh->hw; in periodic_usecs()
3347 usecs += q->qh->usecs; in periodic_usecs()
3351 usecs += q->qh->c_usecs; in periodic_usecs()
3353 q = &q->qh->qh_next; in periodic_usecs()
3420 hw = here.qh->hw; in tt_no_collision()
3421 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3432 here = here.qh->qh_next; in tt_no_collision()
3479 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3482 unsigned period = qh->period; in qh_link_periodic()
3484 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3486 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3487 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3488 qh->c_usecs); in qh_link_periodic()
3494 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3513 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3514 if (qh->period > here.qh->period) in qh_link_periodic()
3516 prev = &here.qh->qh_next; in qh_link_periodic()
3517 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3521 if (qh != here.qh) { in qh_link_periodic()
3522 qh->qh_next = here; in qh_link_periodic()
3523 if (here.qh) in qh_link_periodic()
3524 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3526 prev->qh = qh; in qh_link_periodic()
3527 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3530 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3531 qh->xacterrs = 0; in qh_link_periodic()
3534 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3535 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3536 : (qh->usecs * 8); in qh_link_periodic()
3538 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3546 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3567 period = qh->period; in qh_unlink_periodic()
3571 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3572 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3575 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3576 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3577 : (qh->usecs * 8); in qh_unlink_periodic()
3579 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3581 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3582 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3583 qh->c_usecs); in qh_unlink_periodic()
3586 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3587 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3589 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3590 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3592 list_del(&qh->intr_node); in qh_unlink_periodic()
3596 struct fotg210_qh *qh) in start_unlink_intr() argument
3602 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3603 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3604 qh->needs_rescan = 1; in start_unlink_intr()
3608 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3618 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3622 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3624 fotg210->intr_unlink = qh; in start_unlink_intr()
3625 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3631 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3638 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3640 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3643 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3646 qh_completions(fotg210, qh); in end_unlink_intr()
3649 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3651 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3661 qh, rc); in end_unlink_intr()
3710 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3715 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3718 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3720 if (!qh->c_usecs) { in check_intr_schedule()
3733 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3737 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3738 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3739 qh->period, qh->c_usecs)) in check_intr_schedule()
3741 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3742 qh->period, qh->c_usecs)) in check_intr_schedule()
3753 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3759 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3761 qh_refresh(fotg210, qh); in qh_schedule()
3763 frame = qh->start; in qh_schedule()
3766 if (frame < qh->period) { in qh_schedule()
3769 qh, &c_mask); in qh_schedule()
3781 if (qh->period) { in qh_schedule()
3784 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3785 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3788 frame, uframe, qh, in qh_schedule()
3798 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3803 qh->start = frame; in qh_schedule()
3807 hw->hw_info2 |= qh->period in qh_schedule()
3812 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3815 qh_link_periodic(fotg210, qh); in qh_schedule()
3825 struct fotg210_qh *qh; in intr_submit() local
3844 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3845 if (qh == NULL) { in intr_submit()
3849 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3850 status = qh_schedule(fotg210, qh); in intr_submit()
3856 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3857 BUG_ON(qh == NULL); in intr_submit()
3875 struct fotg210_qh *qh; in scan_intr() local
3877 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3881 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3891 temp = qh_completions(fotg210, qh); in scan_intr()
3892 if (unlikely(qh->needs_rescan || in scan_intr()
3893 (list_empty(&qh->qtd_list) && in scan_intr()
3894 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3895 start_unlink_intr(fotg210, qh); in scan_intr()
4962 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5300 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5313 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5314 if (!qh) in fotg210_urb_dequeue()
5316 switch (qh->qh_state) { in fotg210_urb_dequeue()
5319 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5327 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5333 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5334 if (!qh) in fotg210_urb_dequeue()
5336 switch (qh->qh_state) { in fotg210_urb_dequeue()
5339 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5342 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5346 qh, qh->qh_state); in fotg210_urb_dequeue()
5370 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5377 qh = ep->hcpriv; in fotg210_endpoint_disable()
5378 if (!qh) in fotg210_endpoint_disable()
5384 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5396 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5397 switch (qh->qh_state) { in fotg210_endpoint_disable()
5400 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5401 tmp && tmp != qh; in fotg210_endpoint_disable()
5402 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5408 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5417 if (qh->clearing_tt) in fotg210_endpoint_disable()
5419 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5420 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5429 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5430 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5442 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5452 qh = ep->hcpriv; in fotg210_endpoint_reset()
5459 if (qh) { in fotg210_endpoint_reset()
5460 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5461 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5463 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5464 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5471 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5473 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()