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()
990 struct fotg210_qh *qh);
991 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
1206 struct fotg210_qh *qh = fotg210->intr_unlink; in fotg210_handle_intr_unlinks() local
1208 if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) in fotg210_handle_intr_unlinks()
1210 fotg210->intr_unlink = qh->unlink_next; in fotg210_handle_intr_unlinks()
1211 qh->unlink_next = NULL; in fotg210_handle_intr_unlinks()
1212 end_unlink_intr(fotg210, qh); in fotg210_handle_intr_unlinks()
1839 static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_destroy() argument
1842 if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { in qh_destroy()
1846 if (qh->dummy) in qh_destroy()
1847 fotg210_qtd_free(fotg210, qh->dummy); in qh_destroy()
1848 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in qh_destroy()
1849 kfree(qh); in qh_destroy()
1855 struct fotg210_qh *qh; in fotg210_qh_alloc() local
1858 qh = kzalloc(sizeof(*qh), GFP_ATOMIC); in fotg210_qh_alloc()
1859 if (!qh) in fotg210_qh_alloc()
1861 qh->hw = (struct fotg210_qh_hw *) in fotg210_qh_alloc()
1863 if (!qh->hw) in fotg210_qh_alloc()
1865 qh->qh_dma = dma; in fotg210_qh_alloc()
1866 INIT_LIST_HEAD(&qh->qtd_list); in fotg210_qh_alloc()
1869 qh->dummy = fotg210_qtd_alloc(fotg210, flags); in fotg210_qh_alloc()
1870 if (qh->dummy == NULL) { in fotg210_qh_alloc()
1875 return qh; in fotg210_qh_alloc()
1877 dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); in fotg210_qh_alloc()
1879 kfree(qh); in fotg210_qh_alloc()
2035 struct fotg210_qh *qh, struct fotg210_qtd *qtd) in qh_update() argument
2037 struct fotg210_qh_hw *hw = qh->hw; in qh_update()
2040 BUG_ON(qh->qh_state != QH_STATE_IDLE); in qh_update()
2053 is_out = qh->is_out; in qh_update()
2055 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { in qh_update()
2057 usb_settoggle(qh->dev, epnum, is_out, 1); in qh_update()
2068 static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_refresh() argument
2072 if (list_empty(&qh->qtd_list)) in qh_refresh()
2073 qtd = qh->dummy; in qh_refresh()
2075 qtd = list_entry(qh->qtd_list.next, in qh_refresh()
2084 if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { in qh_refresh()
2085 qh->hw->hw_qtd_next = qtd->hw_next; in qh_refresh()
2091 qh_update(fotg210, qh, qtd); in qh_refresh()
2094 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2100 struct fotg210_qh *qh = ep->hcpriv; in fotg210_clear_tt_buffer_complete() local
2104 qh->clearing_tt = 0; in fotg210_clear_tt_buffer_complete()
2105 if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) in fotg210_clear_tt_buffer_complete()
2107 qh_link_async(fotg210, qh); in fotg210_clear_tt_buffer_complete()
2112 struct fotg210_qh *qh, struct urb *urb, u32 token) in fotg210_clear_tt_buffer() argument
2121 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in fotg210_clear_tt_buffer()
2132 qh->clearing_tt = 1; in fotg210_clear_tt_buffer()
2202 struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; in fotg210_urb_done() local
2205 if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { in fotg210_urb_done()
2238 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh);
2245 struct fotg210_qh *qh) in qh_completions() argument
2247 struct fotg210_qtd *last, *end = qh->dummy; in qh_completions()
2253 struct fotg210_qh_hw *hw = qh->hw; in qh_completions()
2255 if (unlikely(list_empty(&qh->qtd_list))) in qh_completions()
2268 state = qh->qh_state; in qh_completions()
2269 qh->qh_state = QH_STATE_COMPLETING; in qh_completions()
2275 qh->needs_rescan = 0; in qh_completions()
2282 list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { in qh_completions()
2319 urb->transfer_buffer_length, qtd, qh); in qh_completions()
2331 ++qh->xacterrs < QH_XACTERR_MAX && in qh_completions()
2337 qh->xacterrs); in qh_completions()
2400 fotg210_clear_tt_buffer(fotg210, qh, urb, in qh_completions()
2435 fotg210_clear_tt_buffer(fotg210, qh, in qh_completions()
2443 if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { in qh_completions()
2454 qh->xacterrs = 0; in qh_completions()
2465 if (unlikely(qh->needs_rescan)) { in qh_completions()
2476 qh->needs_rescan = 0; in qh_completions()
2480 qh->qh_state = state; in qh_completions()
2489 qh_refresh(fotg210, qh); in qh_completions()
2505 qh->needs_rescan = 1; in qh_completions()
2712 struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); in qh_make() local
2721 if (!qh) in qh_make()
2722 return qh; in qh_make()
2753 qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, in qh_make()
2755 qh->start = NO_FRAME; in qh_make()
2758 qh->c_usecs = 0; in qh_make()
2759 qh->gap_uf = 0; in qh_make()
2761 qh->period = urb->interval >> 3; in qh_make()
2762 if (qh->period == 0 && urb->interval != 1) { in qh_make()
2768 } else if (qh->period > fotg210->periodic_size) { in qh_make()
2769 qh->period = fotg210->periodic_size; in qh_make()
2770 urb->interval = qh->period << 3; in qh_make()
2776 qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, in qh_make()
2781 qh->c_usecs = qh->usecs + HS_USECS(0); in qh_make()
2782 qh->usecs = HS_USECS(1); in qh_make()
2784 qh->usecs += HS_USECS(1); in qh_make()
2785 qh->c_usecs = HS_USECS(0); in qh_make()
2789 qh->tt_usecs = NS_TO_US(think_time + in qh_make()
2792 qh->period = urb->interval; in qh_make()
2793 if (qh->period > fotg210->periodic_size) { in qh_make()
2794 qh->period = fotg210->periodic_size; in qh_make()
2795 urb->interval = qh->period; in qh_make()
2801 qh->dev = urb->dev; in qh_make()
2865 qh_destroy(fotg210, qh); in qh_make()
2872 qh->qh_state = QH_STATE_IDLE; in qh_make()
2873 hw = qh->hw; in qh_make()
2876 qh->is_out = !is_input; in qh_make()
2878 qh_refresh(fotg210, qh); in qh_make()
2879 return qh; in qh_make()
2901 WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); in disable_async()
2909 static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_async() argument
2911 __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); in qh_link_async()
2915 if (unlikely(qh->clearing_tt)) in qh_link_async()
2918 WARN_ON(qh->qh_state != QH_STATE_IDLE); in qh_link_async()
2921 qh_refresh(fotg210, qh); in qh_link_async()
2925 qh->qh_next = head->qh_next; in qh_link_async()
2926 qh->hw->hw_next = head->hw->hw_next; in qh_link_async()
2929 head->qh_next.qh = qh; in qh_link_async()
2932 qh->xacterrs = 0; in qh_link_async()
2933 qh->qh_state = QH_STATE_LINKED; in qh_link_async()
2948 struct fotg210_qh *qh = NULL; in qh_append_tds() local
2951 qh = (struct fotg210_qh *) *ptr; in qh_append_tds()
2952 if (unlikely(qh == NULL)) { in qh_append_tds()
2954 qh = qh_make(fotg210, urb, GFP_ATOMIC); in qh_append_tds()
2955 *ptr = qh; in qh_append_tds()
2957 if (likely(qh != NULL)) { in qh_append_tds()
2970 qh->hw->hw_info1 &= ~qh_addr_mask; in qh_append_tds()
2989 dummy = qh->dummy; in qh_append_tds()
2997 list_splice_tail(qtd_list, &qh->qtd_list); in qh_append_tds()
3000 qh->dummy = qtd; in qh_append_tds()
3004 qtd = list_entry(qh->qtd_list.prev, in qh_append_tds()
3012 urb->hcpriv = qh; in qh_append_tds()
3015 return qh; in qh_append_tds()
3023 struct fotg210_qh *qh = NULL; in submit_async() local
3052 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in submit_async()
3053 if (unlikely(qh == NULL)) { in submit_async()
3062 if (likely(qh->qh_state == QH_STATE_IDLE)) in submit_async()
3063 qh_link_async(fotg210, qh); in submit_async()
3066 if (unlikely(qh == NULL)) in submit_async()
3072 struct fotg210_qh *qh) in single_unlink_async() argument
3077 qh->qh_state = QH_STATE_UNLINK; in single_unlink_async()
3079 fotg210->async_unlink_last->unlink_next = qh; in single_unlink_async()
3081 fotg210->async_unlink = qh; in single_unlink_async()
3082 fotg210->async_unlink_last = qh; in single_unlink_async()
3086 while (prev->qh_next.qh != qh) in single_unlink_async()
3087 prev = prev->qh_next.qh; in single_unlink_async()
3089 prev->hw->hw_next = qh->hw->hw_next; in single_unlink_async()
3090 prev->qh_next = qh->qh_next; in single_unlink_async()
3091 if (fotg210->qh_scan_next == qh) in single_unlink_async()
3092 fotg210->qh_scan_next = qh->qh_next.qh; in single_unlink_async()
3130 struct fotg210_qh *qh; in end_unlink_async() local
3136 qh = fotg210->async_iaa; in end_unlink_async()
3137 fotg210->async_iaa = qh->unlink_next; in end_unlink_async()
3138 qh->unlink_next = NULL; in end_unlink_async()
3140 qh->qh_state = QH_STATE_IDLE; in end_unlink_async()
3141 qh->qh_next.qh = NULL; in end_unlink_async()
3143 qh_completions(fotg210, qh); in end_unlink_async()
3144 if (!list_empty(&qh->qtd_list) && in end_unlink_async()
3146 qh_link_async(fotg210, qh); in end_unlink_async()
3161 struct fotg210_qh *qh, *next; in unlink_empty_async() local
3166 next = fotg210->async->qh_next.qh; in unlink_empty_async()
3168 qh = next; in unlink_empty_async()
3169 next = qh->qh_next.qh; in unlink_empty_async()
3171 if (list_empty(&qh->qtd_list) && in unlink_empty_async()
3172 qh->qh_state == QH_STATE_LINKED) { in unlink_empty_async()
3173 if (!stopped && qh->unlink_cycle == in unlink_empty_async()
3177 single_unlink_async(fotg210, qh); in unlink_empty_async()
3197 struct fotg210_qh *qh) in start_unlink_async() argument
3204 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_async()
3205 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_async()
3206 qh->needs_rescan = 1; in start_unlink_async()
3210 single_unlink_async(fotg210, qh); in start_unlink_async()
3216 struct fotg210_qh *qh; in scan_async() local
3219 fotg210->qh_scan_next = fotg210->async->qh_next.qh; in scan_async()
3221 qh = fotg210->qh_scan_next; in scan_async()
3222 fotg210->qh_scan_next = qh->qh_next.qh; in scan_async()
3225 if (!list_empty(&qh->qtd_list)) { in scan_async()
3235 temp = qh_completions(fotg210, qh); in scan_async()
3236 if (qh->needs_rescan) { in scan_async()
3237 start_unlink_async(fotg210, qh); in scan_async()
3238 } else if (list_empty(&qh->qtd_list) in scan_async()
3239 && qh->qh_state == QH_STATE_LINKED) { in scan_async()
3240 qh->unlink_cycle = fotg210->async_unlink_cycle; in scan_async()
3283 return &periodic->qh->qh_next; in periodic_next_shadow()
3297 return &periodic->qh->hw->hw_next; in shadow_next_periodic()
3346 hw = q->qh->hw; in periodic_usecs()
3349 usecs += q->qh->usecs; in periodic_usecs()
3353 usecs += q->qh->c_usecs; in periodic_usecs()
3355 q = &q->qh->qh_next; in periodic_usecs()
3422 hw = here.qh->hw; in tt_no_collision()
3423 if (same_tt(dev, here.qh->dev)) { in tt_no_collision()
3434 here = here.qh->qh_next; in tt_no_collision()
3481 static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_link_periodic() argument
3484 unsigned period = qh->period; in qh_link_periodic()
3486 dev_dbg(&qh->dev->dev, in qh_link_periodic()
3488 hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_link_periodic()
3489 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_link_periodic()
3490 qh->c_usecs); in qh_link_periodic()
3496 for (i = qh->start; i < fotg210->periodic_size; i += period) { in qh_link_periodic()
3515 while (here.ptr && qh != here.qh) { in qh_link_periodic()
3516 if (qh->period > here.qh->period) in qh_link_periodic()
3518 prev = &here.qh->qh_next; in qh_link_periodic()
3519 hw_p = &here.qh->hw->hw_next; in qh_link_periodic()
3523 if (qh != here.qh) { in qh_link_periodic()
3524 qh->qh_next = here; in qh_link_periodic()
3525 if (here.qh) in qh_link_periodic()
3526 qh->hw->hw_next = *hw_p; in qh_link_periodic()
3528 prev->qh = qh; in qh_link_periodic()
3529 *hw_p = QH_NEXT(fotg210, qh->qh_dma); in qh_link_periodic()
3532 qh->qh_state = QH_STATE_LINKED; in qh_link_periodic()
3533 qh->xacterrs = 0; in qh_link_periodic()
3536 fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period in qh_link_periodic()
3537 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_link_periodic()
3538 : (qh->usecs * 8); in qh_link_periodic()
3540 list_add(&qh->intr_node, &fotg210->intr_qh_list); in qh_link_periodic()
3548 struct fotg210_qh *qh) in qh_unlink_periodic() argument
3569 period = qh->period; in qh_unlink_periodic()
3573 for (i = qh->start; i < fotg210->periodic_size; i += period) in qh_unlink_periodic()
3574 periodic_unlink(fotg210, i, qh); in qh_unlink_periodic()
3577 fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period in qh_unlink_periodic()
3578 ? ((qh->usecs + qh->c_usecs) / qh->period) in qh_unlink_periodic()
3579 : (qh->usecs * 8); in qh_unlink_periodic()
3581 dev_dbg(&qh->dev->dev, in qh_unlink_periodic()
3583 qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & in qh_unlink_periodic()
3584 (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, in qh_unlink_periodic()
3585 qh->c_usecs); in qh_unlink_periodic()
3588 qh->qh_state = QH_STATE_UNLINK; in qh_unlink_periodic()
3589 qh->qh_next.ptr = NULL; in qh_unlink_periodic()
3591 if (fotg210->qh_scan_next == qh) in qh_unlink_periodic()
3592 fotg210->qh_scan_next = list_entry(qh->intr_node.next, in qh_unlink_periodic()
3594 list_del(&qh->intr_node); in qh_unlink_periodic()
3598 struct fotg210_qh *qh) in start_unlink_intr() argument
3604 if (qh->qh_state != QH_STATE_LINKED) { in start_unlink_intr()
3605 if (qh->qh_state == QH_STATE_COMPLETING) in start_unlink_intr()
3606 qh->needs_rescan = 1; in start_unlink_intr()
3610 qh_unlink_periodic(fotg210, qh); in start_unlink_intr()
3620 qh->unlink_cycle = fotg210->intr_unlink_cycle; in start_unlink_intr()
3624 fotg210->intr_unlink_last->unlink_next = qh; in start_unlink_intr()
3626 fotg210->intr_unlink = qh; in start_unlink_intr()
3627 fotg210->intr_unlink_last = qh; in start_unlink_intr()
3633 else if (fotg210->intr_unlink == qh) { in start_unlink_intr()
3640 static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in end_unlink_intr() argument
3642 struct fotg210_qh_hw *hw = qh->hw; in end_unlink_intr()
3645 qh->qh_state = QH_STATE_IDLE; in end_unlink_intr()
3648 qh_completions(fotg210, qh); in end_unlink_intr()
3651 if (!list_empty(&qh->qtd_list) && in end_unlink_intr()
3653 rc = qh_schedule(fotg210, qh); in end_unlink_intr()
3663 qh, rc); in end_unlink_intr()
3712 unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) in check_intr_schedule() argument
3717 if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ in check_intr_schedule()
3720 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) in check_intr_schedule()
3722 if (!qh->c_usecs) { in check_intr_schedule()
3735 mask = 0x03 << (uframe + qh->gap_uf); in check_intr_schedule()
3739 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { in check_intr_schedule()
3740 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, in check_intr_schedule()
3741 qh->period, qh->c_usecs)) in check_intr_schedule()
3743 if (!check_period(fotg210, frame, uframe + qh->gap_uf, in check_intr_schedule()
3744 qh->period, qh->c_usecs)) in check_intr_schedule()
3755 static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) in qh_schedule() argument
3761 struct fotg210_qh_hw *hw = qh->hw; in qh_schedule()
3763 qh_refresh(fotg210, qh); in qh_schedule()
3765 frame = qh->start; in qh_schedule()
3768 if (frame < qh->period) { in qh_schedule()
3771 qh, &c_mask); in qh_schedule()
3783 if (qh->period) { in qh_schedule()
3786 for (i = qh->period; status && i > 0; --i) { in qh_schedule()
3787 frame = ++fotg210->random_frame % qh->period; in qh_schedule()
3790 frame, uframe, qh, in qh_schedule()
3800 status = check_intr_schedule(fotg210, 0, 0, qh, in qh_schedule()
3805 qh->start = frame; in qh_schedule()
3809 hw->hw_info2 |= qh->period in qh_schedule()
3814 fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); in qh_schedule()
3817 qh_link_periodic(fotg210, qh); in qh_schedule()
3827 struct fotg210_qh *qh; in intr_submit() local
3846 qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); in intr_submit()
3847 if (qh == NULL) { in intr_submit()
3851 if (qh->qh_state == QH_STATE_IDLE) { in intr_submit()
3852 status = qh_schedule(fotg210, qh); in intr_submit()
3858 qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); in intr_submit()
3859 BUG_ON(qh == NULL); in intr_submit()
3877 struct fotg210_qh *qh; in scan_intr() local
3879 list_for_each_entry_safe(qh, fotg210->qh_scan_next, in scan_intr()
3883 if (!list_empty(&qh->qtd_list)) { in scan_intr()
3893 temp = qh_completions(fotg210, qh); in scan_intr()
3894 if (unlikely(qh->needs_rescan || in scan_intr()
3895 (list_empty(&qh->qtd_list) && in scan_intr()
3896 qh->qh_state == QH_STATE_LINKED))) in scan_intr()
3897 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()