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()
2715 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2722 if (!qh) in qh_make()
2723 return qh; in qh_make()
2753 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2756 qh->start = NO_FRAME; in qh_make()
2759 qh->c_usecs = 0; in qh_make()
2760 qh->gap_uf = 0; in qh_make()
2762 qh->period = urb->interval >> 3; in qh_make()
2763 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2769 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2770 qh->period = fotg210->periodic_size; in qh_make()
2771 urb->interval = qh->period << 3; in qh_make()
2777 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2782 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2783 qh->usecs = HS_USECS(1); in qh_make()
2785 qh->usecs += HS_USECS(1); in qh_make()
2786 qh->c_usecs = HS_USECS(0); in qh_make()
2790 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2793 qh->period = urb->interval; in qh_make()
2794 if (qh->period > fotg210->periodic_size) { in qh_make()
2795 qh->period = fotg210->periodic_size; in qh_make()
2796 urb->interval = qh->period; in qh_make()
2802 qh->dev = urb->dev; in qh_make()
2866 qh_destroy(fotg210, qh); in qh_make()
2873 qh->qh_state = QH_STATE_IDLE; in qh_make()
2874 hw = qh->hw; in qh_make()
2877 qh->is_out = !is_input; in qh_make()
2879 qh_refresh(fotg210, qh); in qh_make()
2880 return qh; in qh_make()
2902 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2910 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2912 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2916 if (unlikely(qh->clearing_tt)) in qh_link_async()
2919 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2922 qh_refresh(fotg210, qh); in qh_link_async()
2926 qh->qh_next = head->qh_next; in qh_link_async()
2927 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2930 head->qh_next.qh = qh; in qh_link_async()
2933 qh->xacterrs = 0; in qh_link_async()
2934 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2949 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2952 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2953 if (unlikely(qh == NULL)) { in qh_append_tds()
2955 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2956 *ptr = qh; in qh_append_tds()
2958 if (likely(qh != NULL)) { in qh_append_tds()
2971 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
2990 dummy = qh->dummy; in qh_append_tds()
2998 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
3001 qh->dummy = qtd; in qh_append_tds()
3005 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3013 urb->hcpriv = qh; in qh_append_tds()
3016 return qh; in qh_append_tds()
3024 struct fotg210_qh *qh = NULL; in submit_async() local
3053 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3054 if (unlikely(qh == NULL)) { in submit_async()
3063 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3064 qh_link_async(fotg210, qh); in submit_async()
3067 if (unlikely(qh == NULL)) in submit_async()
3073 struct fotg210_qh *qh) in single_unlink_async() argument
3078 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3080 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3082 fotg210->async_unlink = qh; in single_unlink_async()
3083 fotg210->async_unlink_last = qh; in single_unlink_async()
3087 while (prev->qh_next.qh != qh) in single_unlink_async()
3088 prev = prev->qh_next.qh; in single_unlink_async()
3090 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3091 prev->qh_next = qh->qh_next; in single_unlink_async()
3092 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3093 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3131 struct fotg210_qh *qh; in end_unlink_async() local
3137 qh = fotg210->async_iaa; in end_unlink_async()
3138 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3139 qh->unlink_next = NULL; in end_unlink_async()
3141 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3142 qh->qh_next.qh = NULL; in end_unlink_async()
3144 qh_completions(fotg210, qh); in end_unlink_async()
3145 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3147 qh_link_async(fotg210, qh); in end_unlink_async()
3162 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3167 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3169 qh = next; in unlink_empty_async()
3170 next = qh->qh_next.qh; in unlink_empty_async()
3172 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3173 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3174 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3178 single_unlink_async(fotg210, qh); in unlink_empty_async()
3198 struct fotg210_qh *qh) in start_unlink_async() argument
3205 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3206 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3207 qh->needs_rescan = 1; in start_unlink_async()
3211 single_unlink_async(fotg210, qh); in start_unlink_async()
3217 struct fotg210_qh *qh; in scan_async() local
3220 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3222 qh = fotg210->qh_scan_next; in scan_async()
3223 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3226 if (!list_empty(&qh->qtd_list)) { in scan_async()
3236 temp = qh_completions(fotg210, qh); in scan_async()
3237 if (qh->needs_rescan) { in scan_async()
3238 start_unlink_async(fotg210, qh); in scan_async()
3239 } else if (list_empty(&qh->qtd_list) in scan_async()
3240 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3241 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3284 return &periodic->qh->qh_next; in periodic_next_shadow()
3298 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3347 hw = q->qh->hw; in periodic_usecs()
3350 usecs += q->qh->usecs; in periodic_usecs()
3354 usecs += q->qh->c_usecs; in periodic_usecs()
3356 q = &q->qh->qh_next; in periodic_usecs()
3423 hw = here.qh->hw; in tt_no_collision()
3424 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3435 here = here.qh->qh_next; in tt_no_collision()
3482 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3485 unsigned period = qh->period; in qh_link_periodic()
3487 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3489 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3490 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3491 qh->c_usecs); in qh_link_periodic()
3497 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3516 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3517 if (qh->period > here.qh->period) in qh_link_periodic()
3519 prev = &here.qh->qh_next; in qh_link_periodic()
3520 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3524 if (qh != here.qh) { in qh_link_periodic()
3525 qh->qh_next = here; in qh_link_periodic()
3526 if (here.qh) in qh_link_periodic()
3527 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3529 prev->qh = qh; in qh_link_periodic()
3530 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3533 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3534 qh->xacterrs = 0; in qh_link_periodic()
3537 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3538 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3539 : (qh->usecs * 8); in qh_link_periodic()
3541 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3549 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3570 period = qh->period; in qh_unlink_periodic()
3574 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3575 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3578 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3579 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3580 : (qh->usecs * 8); in qh_unlink_periodic()
3582 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3584 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3585 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3586 qh->c_usecs); in qh_unlink_periodic()
3589 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3590 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3592 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3593 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3595 list_del(&qh->intr_node); in qh_unlink_periodic()
3599 struct fotg210_qh *qh) in start_unlink_intr() argument
3605 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3606 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3607 qh->needs_rescan = 1; in start_unlink_intr()
3611 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3621 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3625 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3627 fotg210->intr_unlink = qh; in start_unlink_intr()
3628 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3634 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3641 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3643 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3646 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3649 qh_completions(fotg210, qh); in end_unlink_intr()
3652 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3654 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3664 qh, rc); in end_unlink_intr()
3713 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3718 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3721 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3723 if (!qh->c_usecs) { in check_intr_schedule()
3736 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3740 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3741 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3742 qh->period, qh->c_usecs)) in check_intr_schedule()
3744 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3745 qh->period, qh->c_usecs)) in check_intr_schedule()
3756 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3762 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3764 qh_refresh(fotg210, qh); in qh_schedule()
3766 frame = qh->start; in qh_schedule()
3769 if (frame < qh->period) { in qh_schedule()
3772 qh, &c_mask); in qh_schedule()
3784 if (qh->period) { in qh_schedule()
3787 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3788 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3791 frame, uframe, qh, in qh_schedule()
3801 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3806 qh->start = frame; in qh_schedule()
3810 hw->hw_info2 |= qh->period in qh_schedule()
3815 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3818 qh_link_periodic(fotg210, qh); in qh_schedule()
3828 struct fotg210_qh *qh; in intr_submit() local
3847 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3848 if (qh == NULL) { in intr_submit()
3852 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3853 status = qh_schedule(fotg210, qh); in intr_submit()
3859 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3860 BUG_ON(qh == NULL); in intr_submit()
3878 struct fotg210_qh *qh; in scan_intr() local
3880 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3884 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3894 temp = qh_completions(fotg210, qh); in scan_intr()
3895 if (unlikely(qh->needs_rescan || in scan_intr()
3896 (list_empty(&qh->qtd_list) && in scan_intr()
3897 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3898 start_unlink_intr(fotg210, qh); in scan_intr()
4965 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5303 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5316 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5317 if (!qh) in fotg210_urb_dequeue()
5319 switch (qh->qh_state) { in fotg210_urb_dequeue()
5322 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5330 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5336 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5337 if (!qh) in fotg210_urb_dequeue()
5339 switch (qh->qh_state) { in fotg210_urb_dequeue()
5342 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5345 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5349 qh, qh->qh_state); in fotg210_urb_dequeue()
5373 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5380 qh = ep->hcpriv; in fotg210_endpoint_disable()
5381 if (!qh) in fotg210_endpoint_disable()
5387 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5399 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5400 switch (qh->qh_state) { in fotg210_endpoint_disable()
5403 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5404 tmp && tmp != qh; in fotg210_endpoint_disable()
5405 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5411 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5420 if (qh->clearing_tt) in fotg210_endpoint_disable()
5422 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5423 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5432 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5433 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5445 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5455 qh = ep->hcpriv; in fotg210_endpoint_reset()
5462 if (qh) { in fotg210_endpoint_reset()
5463 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5464 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5466 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5467 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5474 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5476 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()