Lines Matching refs:qh
142 dbg_qh(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in dbg_qh() argument
144 struct fotg210_qh_hw *hw = qh->hw; in dbg_qh()
146 fotg210_dbg(fotg210, "%s qh %p n%08x info %x %x qtd %x\n", label, qh, in dbg_qh()
364 static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, in qh_lines() argument
375 struct fotg210_qh_hw *hw = qh->hw; in qh_lines()
393 qh, scratch & 0x007f, in qh_lines()
405 list_for_each_entry(td, &qh->qtd_list, qtd_list) { in qh_lines()
465 struct fotg210_qh *qh; in fill_async_buffer() local
479 for (qh = fotg210->async->qh_next.qh; size > 0 && qh; in fill_async_buffer()
480 qh = qh->qh_next.qh) in fill_async_buffer()
481 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
487 for (qh = fotg210->async_unlink; size > 0 && qh; in fill_async_buffer()
488 qh = qh->unlink_next) in fill_async_buffer()
489 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
498 struct fotg210_qh_hw *hw, struct fotg210_qh *qh, unsigned size) in output_buf_tds_dir() argument
506 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
520 (scratch >> 8) & 0x000f, type, qh->usecs, in output_buf_tds_dir()
521 qh->c_usecs, temp, (scratch >> 16) & 0x7ff); in output_buf_tds_dir()
571 hw = p.qh->hw; in fill_periodic_buffer()
573 p.qh->period, in fill_periodic_buffer()
578 p.qh); in fill_periodic_buffer()
585 if (p.qh->qh_next.ptr) { in fill_periodic_buffer()
597 p.qh, size); in fill_periodic_buffer()
600 seen[seen_count++].qh = p.qh; in fill_periodic_buffer()
604 p = p.qh->qh_next; in fill_periodic_buffer()
1014 struct fotg210_qh *qh);
1015 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
1231 struct fotg210_qh *qh = fotg210->intr_unlink; in fotg210_handle_intr_unlinks() local
1233 if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) in fotg210_handle_intr_unlinks()
1235 fotg210->intr_unlink = qh->unlink_next; in fotg210_handle_intr_unlinks()
1236 qh->unlink_next = NULL; in fotg210_handle_intr_unlinks()
1237 end_unlink_intr(fotg210, qh); in fotg210_handle_intr_unlinks()
1860 static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_destroy() argument
1863 if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { in qh_destroy()
1867 if (qh->dummy) in qh_destroy()
1868 fotg210_qtd_free(fotg210, qh->dummy); in qh_destroy()
1869 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in qh_destroy()
1870 kfree(qh); in qh_destroy()
1876 struct fotg210_qh *qh; in fotg210_qh_alloc() local
1879 qh = kzalloc(sizeof(*qh), GFP_ATOMIC); in fotg210_qh_alloc()
1880 if (!qh) in fotg210_qh_alloc()
1882 qh->hw = (struct fotg210_qh_hw *) in fotg210_qh_alloc()
1884 if (!qh->hw) in fotg210_qh_alloc()
1886 memset(qh->hw, 0, sizeof(*qh->hw)); in fotg210_qh_alloc()
1887 qh->qh_dma = dma; in fotg210_qh_alloc()
1888 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1891 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1892 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1897 return qh; in fotg210_qh_alloc()
1899 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1901 kfree(qh); in fotg210_qh_alloc()
2057 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2059 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2062 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2075 is_out = qh->is_out; in qh_update()
2077 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2079 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2090 static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2094 if (list_empty(&qh->qtd_list)) in qh_refresh()
2095 qtd = qh->dummy; in qh_refresh()
2097 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2106 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2107 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2113 qh_update(fotg210, qh, qtd); in qh_refresh()
2116 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2122 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2126 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2127 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2129 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2134 struct fotg210_qh *qh, struct urb *urb, u32 token) in fotg210_clear_tt_buffer() argument
2143 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2154 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2224 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2227 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2260 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2267 struct fotg210_qh *qh) in qh_completions() argument
2269 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2275 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2277 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2290 state = qh->qh_state; in qh_completions()
2291 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2297 qh->needs_rescan = 0; in qh_completions()
2304 list_for_each_safe(entry, tmp, &qh->qtd_list) { in qh_completions()
2343 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2355 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2361 qh->xacterrs); in qh_completions()
2424 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2459 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2467 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2478 qh->xacterrs = 0; in qh_completions()
2489 if (unlikely(qh->needs_rescan)) { in qh_completions()
2500 qh->needs_rescan = 0; in qh_completions()
2504 qh->qh_state = state; in qh_completions()
2513 qh_refresh(fotg210, qh); in qh_completions()
2529 qh->needs_rescan = 1; in qh_completions()
2744 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2751 if (!qh) in qh_make()
2752 return qh; in qh_make()
2782 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2785 qh->start = NO_FRAME; in qh_make()
2788 qh->c_usecs = 0; in qh_make()
2789 qh->gap_uf = 0; in qh_make()
2791 qh->period = urb->interval >> 3; in qh_make()
2792 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2798 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2799 qh->period = fotg210->periodic_size; in qh_make()
2800 urb->interval = qh->period << 3; in qh_make()
2806 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2811 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2812 qh->usecs = HS_USECS(1); in qh_make()
2814 qh->usecs += HS_USECS(1); in qh_make()
2815 qh->c_usecs = HS_USECS(0); in qh_make()
2819 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2822 qh->period = urb->interval; in qh_make()
2823 if (qh->period > fotg210->periodic_size) { in qh_make()
2824 qh->period = fotg210->periodic_size; in qh_make()
2825 urb->interval = qh->period; in qh_make()
2831 qh->dev = urb->dev; in qh_make()
2895 qh_destroy(fotg210, qh); in qh_make()
2902 qh->qh_state = QH_STATE_IDLE; in qh_make()
2903 hw = qh->hw; in qh_make()
2906 qh->is_out = !is_input; in qh_make()
2908 qh_refresh(fotg210, qh); in qh_make()
2909 return qh; in qh_make()
2931 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2939 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2941 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2945 if (unlikely(qh->clearing_tt)) in qh_link_async()
2948 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2951 qh_refresh(fotg210, qh); in qh_link_async()
2955 qh->qh_next = head->qh_next; in qh_link_async()
2956 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2959 head->qh_next.qh = qh; in qh_link_async()
2962 qh->xacterrs = 0; in qh_link_async()
2963 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2978 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2981 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2982 if (unlikely(qh == NULL)) { in qh_append_tds()
2984 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2985 *ptr = qh; in qh_append_tds()
2987 if (likely(qh != NULL)) { in qh_append_tds()
3000 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
3019 dummy = qh->dummy; in qh_append_tds()
3027 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
3030 qh->dummy = qtd; in qh_append_tds()
3034 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3042 urb->hcpriv = qh; in qh_append_tds()
3045 return qh; in qh_append_tds()
3053 struct fotg210_qh *qh = NULL; in submit_async() local
3082 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3083 if (unlikely(qh == NULL)) { in submit_async()
3092 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3093 qh_link_async(fotg210, qh); in submit_async()
3096 if (unlikely(qh == NULL)) in submit_async()
3102 struct fotg210_qh *qh) in single_unlink_async() argument
3107 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3109 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3111 fotg210->async_unlink = qh; in single_unlink_async()
3112 fotg210->async_unlink_last = qh; in single_unlink_async()
3116 while (prev->qh_next.qh != qh) in single_unlink_async()
3117 prev = prev->qh_next.qh; in single_unlink_async()
3119 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3120 prev->qh_next = qh->qh_next; in single_unlink_async()
3121 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3122 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3160 struct fotg210_qh *qh; in end_unlink_async() local
3166 qh = fotg210->async_iaa; in end_unlink_async()
3167 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3168 qh->unlink_next = NULL; in end_unlink_async()
3170 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3171 qh->qh_next.qh = NULL; in end_unlink_async()
3173 qh_completions(fotg210, qh); in end_unlink_async()
3174 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3176 qh_link_async(fotg210, qh); in end_unlink_async()
3191 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3196 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3198 qh = next; in unlink_empty_async()
3199 next = qh->qh_next.qh; in unlink_empty_async()
3201 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3202 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3203 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3207 single_unlink_async(fotg210, qh); in unlink_empty_async()
3227 struct fotg210_qh *qh) in start_unlink_async() argument
3234 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3235 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3236 qh->needs_rescan = 1; in start_unlink_async()
3240 single_unlink_async(fotg210, qh); in start_unlink_async()
3246 struct fotg210_qh *qh; in scan_async() local
3249 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3251 qh = fotg210->qh_scan_next; in scan_async()
3252 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3255 if (!list_empty(&qh->qtd_list)) { in scan_async()
3265 temp = qh_completions(fotg210, qh); in scan_async()
3266 if (qh->needs_rescan) { in scan_async()
3267 start_unlink_async(fotg210, qh); in scan_async()
3268 } else if (list_empty(&qh->qtd_list) in scan_async()
3269 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3270 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3313 return &periodic->qh->qh_next; in periodic_next_shadow()
3327 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3376 hw = q->qh->hw; in periodic_usecs()
3379 usecs += q->qh->usecs; in periodic_usecs()
3383 usecs += q->qh->c_usecs; in periodic_usecs()
3385 q = &q->qh->qh_next; in periodic_usecs()
3452 hw = here.qh->hw; in tt_no_collision()
3453 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3464 here = here.qh->qh_next; in tt_no_collision()
3511 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3514 unsigned period = qh->period; in qh_link_periodic()
3516 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3518 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3519 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3520 qh->c_usecs); in qh_link_periodic()
3526 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3545 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3546 if (qh->period > here.qh->period) in qh_link_periodic()
3548 prev = &here.qh->qh_next; in qh_link_periodic()
3549 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3553 if (qh != here.qh) { in qh_link_periodic()
3554 qh->qh_next = here; in qh_link_periodic()
3555 if (here.qh) in qh_link_periodic()
3556 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3558 prev->qh = qh; in qh_link_periodic()
3559 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3562 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3563 qh->xacterrs = 0; in qh_link_periodic()
3566 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3567 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3568 : (qh->usecs * 8); in qh_link_periodic()
3570 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3578 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3599 period = qh->period; in qh_unlink_periodic()
3603 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3604 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3607 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3608 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3609 : (qh->usecs * 8); in qh_unlink_periodic()
3611 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3613 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3614 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3615 qh->c_usecs); in qh_unlink_periodic()
3618 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3619 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3621 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3622 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3624 list_del(&qh->intr_node); in qh_unlink_periodic()
3628 struct fotg210_qh *qh) in start_unlink_intr() argument
3634 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3635 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3636 qh->needs_rescan = 1; in start_unlink_intr()
3640 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3650 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3654 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3656 fotg210->intr_unlink = qh; in start_unlink_intr()
3657 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3663 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3670 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3672 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3675 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3678 qh_completions(fotg210, qh); in end_unlink_intr()
3681 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3683 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3693 qh, rc); in end_unlink_intr()
3742 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3747 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3750 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3752 if (!qh->c_usecs) { in check_intr_schedule()
3765 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3769 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3770 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3771 qh->period, qh->c_usecs)) in check_intr_schedule()
3773 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3774 qh->period, qh->c_usecs)) in check_intr_schedule()
3785 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3791 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3793 qh_refresh(fotg210, qh); in qh_schedule()
3795 frame = qh->start; in qh_schedule()
3798 if (frame < qh->period) { in qh_schedule()
3801 qh, &c_mask); in qh_schedule()
3813 if (qh->period) { in qh_schedule()
3816 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3817 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3820 frame, uframe, qh, in qh_schedule()
3830 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3835 qh->start = frame; in qh_schedule()
3839 hw->hw_info2 |= qh->period in qh_schedule()
3844 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3847 qh_link_periodic(fotg210, qh); in qh_schedule()
3857 struct fotg210_qh *qh; in intr_submit() local
3876 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3877 if (qh == NULL) { in intr_submit()
3881 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3882 status = qh_schedule(fotg210, qh); in intr_submit()
3888 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3889 BUG_ON(qh == NULL); in intr_submit()
3907 struct fotg210_qh *qh; in scan_intr() local
3909 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3913 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3923 temp = qh_completions(fotg210, qh); in scan_intr()
3924 if (unlikely(qh->needs_rescan || in scan_intr()
3925 (list_empty(&qh->qtd_list) && in scan_intr()
3926 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3927 start_unlink_intr(fotg210, qh); in scan_intr()
5002 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5341 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5354 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5355 if (!qh) in fotg210_urb_dequeue()
5357 switch (qh->qh_state) { in fotg210_urb_dequeue()
5360 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5368 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5374 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5375 if (!qh) in fotg210_urb_dequeue()
5377 switch (qh->qh_state) { in fotg210_urb_dequeue()
5380 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5383 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5387 qh, qh->qh_state); in fotg210_urb_dequeue()
5411 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5418 qh = ep->hcpriv; in fotg210_endpoint_disable()
5419 if (!qh) in fotg210_endpoint_disable()
5425 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5437 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5438 switch (qh->qh_state) { in fotg210_endpoint_disable()
5441 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5442 tmp && tmp != qh; in fotg210_endpoint_disable()
5443 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5449 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5458 if (qh->clearing_tt) in fotg210_endpoint_disable()
5460 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5461 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5470 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5471 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5483 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5493 qh = ep->hcpriv; in fotg210_endpoint_reset()
5500 if (qh) { in fotg210_endpoint_reset()
5501 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5502 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5504 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5505 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5512 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5514 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()