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()
447 struct fotg210_qh *qh; in fill_async_buffer() local
461 for (qh = fotg210->async->qh_next.qh; size > 0 && qh; in fill_async_buffer()
462 qh = qh->qh_next.qh) in fill_async_buffer()
463 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
469 for (qh = fotg210->async_unlink; size > 0 && qh; in fill_async_buffer()
470 qh = qh->unlink_next) in fill_async_buffer()
471 qh_lines(fotg210, qh, &next, &size); in fill_async_buffer()
480 struct fotg210_qh_hw *hw, struct fotg210_qh *qh, unsigned size) in output_buf_tds_dir() argument
488 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { in output_buf_tds_dir()
502 (scratch >> 8) & 0x000f, type, qh->usecs, in output_buf_tds_dir()
503 qh->c_usecs, temp, (scratch >> 16) & 0x7ff); in output_buf_tds_dir()
553 hw = p.qh->hw; in fill_periodic_buffer()
555 p.qh->period, in fill_periodic_buffer()
560 p.qh); in fill_periodic_buffer()
567 if (p.qh->qh_next.ptr) { in fill_periodic_buffer()
579 p.qh, size); in fill_periodic_buffer()
582 seen[seen_count++].qh = p.qh; in fill_periodic_buffer()
586 p = p.qh->qh_next; in fill_periodic_buffer()
982 struct fotg210_qh *qh);
983 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
1198 struct fotg210_qh *qh = fotg210->intr_unlink; in fotg210_handle_intr_unlinks() local
1200 if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) in fotg210_handle_intr_unlinks()
1202 fotg210->intr_unlink = qh->unlink_next; in fotg210_handle_intr_unlinks()
1203 qh->unlink_next = NULL; in fotg210_handle_intr_unlinks()
1204 end_unlink_intr(fotg210, qh); in fotg210_handle_intr_unlinks()
1831 static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_destroy() argument
1834 if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { in qh_destroy()
1838 if (qh->dummy) in qh_destroy()
1839 fotg210_qtd_free(fotg210, qh->dummy); in qh_destroy()
1840 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in qh_destroy()
1841 kfree(qh); in qh_destroy()
1847 struct fotg210_qh *qh; in fotg210_qh_alloc() local
1850 qh = kzalloc(sizeof(*qh), GFP_ATOMIC); in fotg210_qh_alloc()
1851 if (!qh) in fotg210_qh_alloc()
1853 qh->hw = (struct fotg210_qh_hw *) in fotg210_qh_alloc()
1855 if (!qh->hw) in fotg210_qh_alloc()
1857 qh->qh_dma = dma; in fotg210_qh_alloc()
1858 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1861 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1862 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1867 return qh; in fotg210_qh_alloc()
1869 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1871 kfree(qh); in fotg210_qh_alloc()
2027 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2029 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2032 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2045 is_out = qh->is_out; in qh_update()
2047 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2049 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2060 static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2064 if (list_empty(&qh->qtd_list)) in qh_refresh()
2065 qtd = qh->dummy; in qh_refresh()
2067 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2076 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2077 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2083 qh_update(fotg210, qh, qtd); in qh_refresh()
2086 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2092 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2096 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2097 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2099 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2104 struct fotg210_qh *qh, struct urb *urb, u32 token) in fotg210_clear_tt_buffer() argument
2113 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2124 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2194 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2197 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2230 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2237 struct fotg210_qh *qh) in qh_completions() argument
2239 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2245 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2247 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2260 state = qh->qh_state; in qh_completions()
2261 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2267 qh->needs_rescan = 0; in qh_completions()
2274 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2311 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2323 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2329 qh->xacterrs); in qh_completions()
2392 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2427 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2435 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2446 qh->xacterrs = 0; in qh_completions()
2457 if (unlikely(qh->needs_rescan)) { in qh_completions()
2468 qh->needs_rescan = 0; in qh_completions()
2472 qh->qh_state = state; in qh_completions()
2481 qh_refresh(fotg210, qh); in qh_completions()
2497 qh->needs_rescan = 1; in qh_completions()
2704 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2713 if (!qh) in qh_make()
2714 return qh; in qh_make()
2745 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2747 qh->start = NO_FRAME; in qh_make()
2750 qh->c_usecs = 0; in qh_make()
2751 qh->gap_uf = 0; in qh_make()
2753 qh->period = urb->interval >> 3; in qh_make()
2754 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2760 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2761 qh->period = fotg210->periodic_size; in qh_make()
2762 urb->interval = qh->period << 3; in qh_make()
2768 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2773 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2774 qh->usecs = HS_USECS(1); in qh_make()
2776 qh->usecs += HS_USECS(1); in qh_make()
2777 qh->c_usecs = HS_USECS(0); in qh_make()
2781 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2784 qh->period = urb->interval; in qh_make()
2785 if (qh->period > fotg210->periodic_size) { in qh_make()
2786 qh->period = fotg210->periodic_size; in qh_make()
2787 urb->interval = qh->period; in qh_make()
2793 qh->dev = urb->dev; in qh_make()
2857 qh_destroy(fotg210, qh); in qh_make()
2864 qh->qh_state = QH_STATE_IDLE; in qh_make()
2865 hw = qh->hw; in qh_make()
2868 qh->is_out = !is_input; in qh_make()
2870 qh_refresh(fotg210, qh); in qh_make()
2871 return qh; in qh_make()
2893 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2901 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2903 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2907 if (unlikely(qh->clearing_tt)) in qh_link_async()
2910 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2913 qh_refresh(fotg210, qh); in qh_link_async()
2917 qh->qh_next = head->qh_next; in qh_link_async()
2918 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2921 head->qh_next.qh = qh; in qh_link_async()
2924 qh->xacterrs = 0; in qh_link_async()
2925 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2940 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2943 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2944 if (unlikely(qh == NULL)) { in qh_append_tds()
2946 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2947 *ptr = qh; in qh_append_tds()
2949 if (likely(qh != NULL)) { in qh_append_tds()
2962 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
2981 dummy = qh->dummy; in qh_append_tds()
2989 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
2992 qh->dummy = qtd; in qh_append_tds()
2996 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3004 urb->hcpriv = qh; in qh_append_tds()
3007 return qh; in qh_append_tds()
3015 struct fotg210_qh *qh = NULL; in submit_async() local
3044 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3045 if (unlikely(qh == NULL)) { in submit_async()
3054 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3055 qh_link_async(fotg210, qh); in submit_async()
3058 if (unlikely(qh == NULL)) in submit_async()
3064 struct fotg210_qh *qh) in single_unlink_async() argument
3069 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3071 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3073 fotg210->async_unlink = qh; in single_unlink_async()
3074 fotg210->async_unlink_last = qh; in single_unlink_async()
3078 while (prev->qh_next.qh != qh) in single_unlink_async()
3079 prev = prev->qh_next.qh; in single_unlink_async()
3081 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3082 prev->qh_next = qh->qh_next; in single_unlink_async()
3083 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3084 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3122 struct fotg210_qh *qh; in end_unlink_async() local
3128 qh = fotg210->async_iaa; in end_unlink_async()
3129 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3130 qh->unlink_next = NULL; in end_unlink_async()
3132 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3133 qh->qh_next.qh = NULL; in end_unlink_async()
3135 qh_completions(fotg210, qh); in end_unlink_async()
3136 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3138 qh_link_async(fotg210, qh); in end_unlink_async()
3153 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3158 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3160 qh = next; in unlink_empty_async()
3161 next = qh->qh_next.qh; in unlink_empty_async()
3163 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3164 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3165 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3169 single_unlink_async(fotg210, qh); in unlink_empty_async()
3189 struct fotg210_qh *qh) in start_unlink_async() argument
3196 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3197 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3198 qh->needs_rescan = 1; in start_unlink_async()
3202 single_unlink_async(fotg210, qh); in start_unlink_async()
3208 struct fotg210_qh *qh; in scan_async() local
3211 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3213 qh = fotg210->qh_scan_next; in scan_async()
3214 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3217 if (!list_empty(&qh->qtd_list)) { in scan_async()
3227 temp = qh_completions(fotg210, qh); in scan_async()
3228 if (qh->needs_rescan) { in scan_async()
3229 start_unlink_async(fotg210, qh); in scan_async()
3230 } else if (list_empty(&qh->qtd_list) in scan_async()
3231 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3232 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3275 return &periodic->qh->qh_next; in periodic_next_shadow()
3289 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3338 hw = q->qh->hw; in periodic_usecs()
3341 usecs += q->qh->usecs; in periodic_usecs()
3345 usecs += q->qh->c_usecs; in periodic_usecs()
3347 q = &q->qh->qh_next; in periodic_usecs()
3414 hw = here.qh->hw; in tt_no_collision()
3415 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3426 here = here.qh->qh_next; in tt_no_collision()
3473 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3476 unsigned period = qh->period; in qh_link_periodic()
3478 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3480 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3481 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3482 qh->c_usecs); in qh_link_periodic()
3488 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3507 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3508 if (qh->period > here.qh->period) in qh_link_periodic()
3510 prev = &here.qh->qh_next; in qh_link_periodic()
3511 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3515 if (qh != here.qh) { in qh_link_periodic()
3516 qh->qh_next = here; in qh_link_periodic()
3517 if (here.qh) in qh_link_periodic()
3518 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3520 prev->qh = qh; in qh_link_periodic()
3521 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3524 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3525 qh->xacterrs = 0; in qh_link_periodic()
3528 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3529 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3530 : (qh->usecs * 8); in qh_link_periodic()
3532 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3540 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3561 period = qh->period; in qh_unlink_periodic()
3565 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3566 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3569 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3570 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3571 : (qh->usecs * 8); in qh_unlink_periodic()
3573 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3575 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3576 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3577 qh->c_usecs); in qh_unlink_periodic()
3580 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3581 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3583 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3584 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3586 list_del(&qh->intr_node); in qh_unlink_periodic()
3590 struct fotg210_qh *qh) in start_unlink_intr() argument
3596 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3597 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3598 qh->needs_rescan = 1; in start_unlink_intr()
3602 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3612 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3616 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3618 fotg210->intr_unlink = qh; in start_unlink_intr()
3619 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3625 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3632 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3634 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3637 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3640 qh_completions(fotg210, qh); in end_unlink_intr()
3643 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3645 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3655 qh, rc); in end_unlink_intr()
3704 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3709 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3712 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3714 if (!qh->c_usecs) { in check_intr_schedule()
3727 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3731 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3732 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3733 qh->period, qh->c_usecs)) in check_intr_schedule()
3735 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3736 qh->period, qh->c_usecs)) in check_intr_schedule()
3747 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3753 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3755 qh_refresh(fotg210, qh); in qh_schedule()
3757 frame = qh->start; in qh_schedule()
3760 if (frame < qh->period) { in qh_schedule()
3763 qh, &c_mask); in qh_schedule()
3775 if (qh->period) { in qh_schedule()
3778 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3779 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3782 frame, uframe, qh, in qh_schedule()
3792 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3797 qh->start = frame; in qh_schedule()
3801 hw->hw_info2 |= qh->period in qh_schedule()
3806 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3809 qh_link_periodic(fotg210, qh); in qh_schedule()
3819 struct fotg210_qh *qh; in intr_submit() local
3838 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3839 if (qh == NULL) { in intr_submit()
3843 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3844 status = qh_schedule(fotg210, qh); in intr_submit()
3850 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3851 BUG_ON(qh == NULL); in intr_submit()
3869 struct fotg210_qh *qh; in scan_intr() local
3871 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3875 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3885 temp = qh_completions(fotg210, qh); in scan_intr()
3886 if (unlikely(qh->needs_rescan || in scan_intr()
3887 (list_empty(&qh->qtd_list) && in scan_intr()
3888 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3889 start_unlink_intr(fotg210, qh); in scan_intr()
4954 fotg210->async->qh_next.qh = NULL; in hcd_fotg210_init()
5292 struct fotg210_qh *qh; in fotg210_urb_dequeue() local
5305 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5306 if (!qh) in fotg210_urb_dequeue()
5308 switch (qh->qh_state) { in fotg210_urb_dequeue()
5311 start_unlink_async(fotg210, qh); in fotg210_urb_dequeue()
5319 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5325 qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_dequeue()
5326 if (!qh) in fotg210_urb_dequeue()
5328 switch (qh->qh_state) { in fotg210_urb_dequeue()
5331 start_unlink_intr(fotg210, qh); in fotg210_urb_dequeue()
5334 qh_completions(fotg210, qh); in fotg210_urb_dequeue()
5338 qh, qh->qh_state); in fotg210_urb_dequeue()
5362 struct fotg210_qh *qh, *tmp; in fotg210_endpoint_disable() local
5369 qh = ep->hcpriv; in fotg210_endpoint_disable()
5370 if (!qh) in fotg210_endpoint_disable()
5376 if (qh->hw == NULL) { in fotg210_endpoint_disable()
5388 qh->qh_state = QH_STATE_IDLE; in fotg210_endpoint_disable()
5389 switch (qh->qh_state) { in fotg210_endpoint_disable()
5392 for (tmp = fotg210->async->qh_next.qh; in fotg210_endpoint_disable()
5393 tmp && tmp != qh; in fotg210_endpoint_disable()
5394 tmp = tmp->qh_next.qh) in fotg210_endpoint_disable()
5400 start_unlink_async(fotg210, qh); in fotg210_endpoint_disable()
5409 if (qh->clearing_tt) in fotg210_endpoint_disable()
5411 if (list_empty(&qh->qtd_list)) { in fotg210_endpoint_disable()
5412 qh_destroy(fotg210, qh); in fotg210_endpoint_disable()
5421 qh, ep->desc.bEndpointAddress, qh->qh_state, in fotg210_endpoint_disable()
5422 list_empty(&qh->qtd_list) ? "" : "(has tds)"); in fotg210_endpoint_disable()
5434 struct fotg210_qh *qh; in fotg210_endpoint_reset() local
5444 qh = ep->hcpriv; in fotg210_endpoint_reset()
5451 if (qh) { in fotg210_endpoint_reset()
5452 usb_settoggle(qh->dev, epnum, is_out, 0); in fotg210_endpoint_reset()
5453 if (!list_empty(&qh->qtd_list)) { in fotg210_endpoint_reset()
5455 } else if (qh->qh_state == QH_STATE_LINKED || in fotg210_endpoint_reset()
5456 qh->qh_state == QH_STATE_COMPLETING) { in fotg210_endpoint_reset()
5463 start_unlink_async(fotg210, qh); in fotg210_endpoint_reset()
5465 start_unlink_intr(fotg210, qh); in fotg210_endpoint_reset()