Lines Matching refs:uhci

29 static void uhci_set_next_interrupt(struct uhci_hcd *uhci)  in uhci_set_next_interrupt()  argument
31 if (uhci->is_stopped) in uhci_set_next_interrupt()
32 mod_timer(&uhci_to_hcd(uhci)->rh_timer, jiffies); in uhci_set_next_interrupt()
33 uhci->term_td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC); in uhci_set_next_interrupt()
36 static inline void uhci_clear_next_interrupt(struct uhci_hcd *uhci) in uhci_clear_next_interrupt() argument
38 uhci->term_td->status &= ~cpu_to_hc32(uhci, TD_CTRL_IOC); in uhci_clear_next_interrupt()
47 static void uhci_fsbr_on(struct uhci_hcd *uhci) in uhci_fsbr_on() argument
54 uhci->fsbr_is_on = 1; in uhci_fsbr_on()
55 lqh = list_entry(uhci->skel_async_qh->node.prev, in uhci_fsbr_on()
57 lqh->link = LINK_TO_QH(uhci, uhci->skel_term_qh); in uhci_fsbr_on()
60 static void uhci_fsbr_off(struct uhci_hcd *uhci) in uhci_fsbr_off() argument
66 uhci->fsbr_is_on = 0; in uhci_fsbr_off()
67 lqh = list_entry(uhci->skel_async_qh->node.prev, in uhci_fsbr_off()
69 lqh->link = UHCI_PTR_TERM(uhci); in uhci_fsbr_off()
72 static void uhci_add_fsbr(struct uhci_hcd *uhci, struct urb *urb) in uhci_add_fsbr() argument
79 static void uhci_urbp_wants_fsbr(struct uhci_hcd *uhci, struct urb_priv *urbp) in uhci_urbp_wants_fsbr() argument
82 uhci->fsbr_is_wanted = 1; in uhci_urbp_wants_fsbr()
83 if (!uhci->fsbr_is_on) in uhci_urbp_wants_fsbr()
84 uhci_fsbr_on(uhci); in uhci_urbp_wants_fsbr()
85 else if (uhci->fsbr_expiring) { in uhci_urbp_wants_fsbr()
86 uhci->fsbr_expiring = 0; in uhci_urbp_wants_fsbr()
87 del_timer(&uhci->fsbr_timer); in uhci_urbp_wants_fsbr()
94 struct uhci_hcd *uhci = from_timer(uhci, t, fsbr_timer); in uhci_fsbr_timeout() local
97 spin_lock_irqsave(&uhci->lock, flags); in uhci_fsbr_timeout()
98 if (uhci->fsbr_expiring) { in uhci_fsbr_timeout()
99 uhci->fsbr_expiring = 0; in uhci_fsbr_timeout()
100 uhci_fsbr_off(uhci); in uhci_fsbr_timeout()
102 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_fsbr_timeout()
106 static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci) in uhci_alloc_td() argument
111 td = dma_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle); in uhci_alloc_td()
124 static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) in uhci_free_td() argument
127 dev_WARN(uhci_dev(uhci), "td %p still in list!\n", td); in uhci_free_td()
129 dev_WARN(uhci_dev(uhci), "td %p still in fl_list!\n", td); in uhci_free_td()
131 dma_pool_free(uhci->td_pool, td, td->dma_handle); in uhci_free_td()
134 static inline void uhci_fill_td(struct uhci_hcd *uhci, struct uhci_td *td, in uhci_fill_td() argument
137 td->status = cpu_to_hc32(uhci, status); in uhci_fill_td()
138 td->token = cpu_to_hc32(uhci, token); in uhci_fill_td()
139 td->buffer = cpu_to_hc32(uhci, buffer); in uhci_fill_td()
155 static inline void uhci_insert_td_in_frame_list(struct uhci_hcd *uhci, in uhci_insert_td_in_frame_list() argument
163 if (uhci->frame_cpu[framenum]) { in uhci_insert_td_in_frame_list()
166 ftd = uhci->frame_cpu[framenum]; in uhci_insert_td_in_frame_list()
173 ltd->link = LINK_TO_TD(uhci, td); in uhci_insert_td_in_frame_list()
175 td->link = uhci->frame[framenum]; in uhci_insert_td_in_frame_list()
177 uhci->frame[framenum] = LINK_TO_TD(uhci, td); in uhci_insert_td_in_frame_list()
178 uhci->frame_cpu[framenum] = td; in uhci_insert_td_in_frame_list()
182 static inline void uhci_remove_td_from_frame_list(struct uhci_hcd *uhci, in uhci_remove_td_from_frame_list() argument
191 if (uhci->frame_cpu[td->frame] == td) { in uhci_remove_td_from_frame_list()
193 uhci->frame[td->frame] = td->link; in uhci_remove_td_from_frame_list()
194 uhci->frame_cpu[td->frame] = NULL; in uhci_remove_td_from_frame_list()
201 uhci->frame[td->frame] = LINK_TO_TD(uhci, ntd); in uhci_remove_td_from_frame_list()
202 uhci->frame_cpu[td->frame] = ntd; in uhci_remove_td_from_frame_list()
215 static inline void uhci_remove_tds_from_frame(struct uhci_hcd *uhci, in uhci_remove_tds_from_frame() argument
222 ftd = uhci->frame_cpu[framenum]; in uhci_remove_tds_from_frame()
225 uhci->frame[framenum] = ltd->link; in uhci_remove_tds_from_frame()
226 uhci->frame_cpu[framenum] = NULL; in uhci_remove_tds_from_frame()
236 static void uhci_unlink_isochronous_tds(struct uhci_hcd *uhci, struct urb *urb) in uhci_unlink_isochronous_tds() argument
242 uhci_remove_td_from_frame_list(uhci, td); in uhci_unlink_isochronous_tds()
245 static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, in uhci_alloc_qh() argument
251 qh = dma_pool_zalloc(uhci->qh_pool, GFP_ATOMIC, &dma_handle); in uhci_alloc_qh()
257 qh->element = UHCI_PTR_TERM(uhci); in uhci_alloc_qh()
258 qh->link = UHCI_PTR_TERM(uhci); in uhci_alloc_qh()
266 qh->dummy_td = uhci_alloc_td(uhci); in uhci_alloc_qh()
268 dma_pool_free(uhci->qh_pool, qh, dma_handle); in uhci_alloc_qh()
292 static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_free_qh() argument
296 dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh); in uhci_free_qh()
302 uhci_free_td(uhci, qh->dummy_td); in uhci_free_qh()
304 dma_pool_free(uhci->qh_pool, qh, qh->dma_handle); in uhci_free_qh()
314 static int uhci_cleanup_queue(struct uhci_hcd *uhci, struct uhci_qh *qh, in uhci_cleanup_queue() argument
326 ret = (uhci->frame_number + uhci->is_stopped != in uhci_cleanup_queue()
350 if (qh_element(qh) == UHCI_PTR_TERM(uhci)) in uhci_cleanup_queue()
352 qh->element = UHCI_PTR_TERM(uhci); in uhci_cleanup_queue()
362 qh->initial_toggle = uhci_toggle(td_token(uhci, td)); in uhci_cleanup_queue()
372 static void uhci_fixup_toggles(struct uhci_hcd *uhci, struct uhci_qh *qh, in uhci_fixup_toggles() argument
387 else if (qh_element(qh) != UHCI_PTR_TERM(uhci)) in uhci_fixup_toggles()
399 if (toggle > 1 || uhci_toggle(td_token(uhci, td)) == toggle) { in uhci_fixup_toggles()
402 toggle = uhci_toggle(td_token(uhci, td)) ^ 1; in uhci_fixup_toggles()
407 td->token ^= cpu_to_hc32(uhci, in uhci_fixup_toggles()
424 static inline void link_iso(struct uhci_hcd *uhci, struct uhci_qh *qh) in link_iso() argument
426 list_add_tail(&qh->node, &uhci->skel_iso_qh->node); in link_iso()
435 static void link_interrupt(struct uhci_hcd *uhci, struct uhci_qh *qh) in link_interrupt() argument
439 list_add_tail(&qh->node, &uhci->skelqh[qh->skel]->node); in link_interrupt()
444 pqh->link = LINK_TO_QH(uhci, qh); in link_interrupt()
451 static void link_async(struct uhci_hcd *uhci, struct uhci_qh *qh) in link_async() argument
459 list_for_each_entry_reverse(pqh, &uhci->skel_async_qh->node, node) { in link_async()
468 link_to_new_qh = LINK_TO_QH(uhci, qh); in link_async()
474 uhci->skel_term_qh->link = link_to_new_qh; in link_async()
480 static void uhci_activate_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_activate_qh() argument
486 if (qh_element(qh) == UHCI_PTR_TERM(uhci)) { in uhci_activate_qh()
492 qh->element = LINK_TO_TD(uhci, td); in uhci_activate_qh()
505 if (qh == uhci->next_qh) in uhci_activate_qh()
506 uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, in uhci_activate_qh()
511 link_iso(uhci, qh); in uhci_activate_qh()
513 link_interrupt(uhci, qh); in uhci_activate_qh()
515 link_async(uhci, qh); in uhci_activate_qh()
521 static void unlink_interrupt(struct uhci_hcd *uhci, struct uhci_qh *qh) in unlink_interrupt() argument
533 static void unlink_async(struct uhci_hcd *uhci, struct uhci_qh *qh) in unlink_async() argument
544 uhci->skel_term_qh->link = link_to_next_qh; in unlink_async()
551 static void uhci_unlink_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_unlink_qh() argument
562 unlink_interrupt(uhci, qh); in uhci_unlink_qh()
564 unlink_async(uhci, qh); in uhci_unlink_qh()
566 uhci_get_current_frame_number(uhci); in uhci_unlink_qh()
567 qh->unlink_frame = uhci->frame_number; in uhci_unlink_qh()
570 if (list_empty(&uhci->skel_unlink_qh->node) || uhci->is_stopped) in uhci_unlink_qh()
571 uhci_set_next_interrupt(uhci); in uhci_unlink_qh()
574 if (qh == uhci->next_qh) in uhci_unlink_qh()
575 uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, in uhci_unlink_qh()
577 list_move_tail(&qh->node, &uhci->skel_unlink_qh->node); in uhci_unlink_qh()
586 static void uhci_make_qh_idle(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_make_qh_idle() argument
590 if (qh == uhci->next_qh) in uhci_make_qh_idle()
591 uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, in uhci_make_qh_idle()
593 list_move(&qh->node, &uhci->idle_qh_list); in uhci_make_qh_idle()
598 uhci_free_td(uhci, qh->post_td); in uhci_make_qh_idle()
603 if (uhci->num_waiting) in uhci_make_qh_idle()
604 wake_up_all(&uhci->waitqh); in uhci_make_qh_idle()
610 static int uhci_highest_load(struct uhci_hcd *uhci, int phase, int period) in uhci_highest_load() argument
612 int highest_load = uhci->load[phase]; in uhci_highest_load()
615 highest_load = max_t(int, highest_load, uhci->load[phase]); in uhci_highest_load()
623 static int uhci_check_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_check_bandwidth() argument
630 minimax_load = uhci_highest_load(uhci, qh->phase, qh->period); in uhci_check_bandwidth()
636 minimax_load = uhci_highest_load(uhci, qh->phase, qh->period); in uhci_check_bandwidth()
638 load = uhci_highest_load(uhci, phase, qh->period); in uhci_check_bandwidth()
648 dev_dbg(uhci_dev(uhci), "bandwidth allocation failed: " in uhci_check_bandwidth()
659 static void uhci_reserve_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_reserve_bandwidth() argument
666 uhci->load[i] += load; in uhci_reserve_bandwidth()
667 uhci->total_load += load; in uhci_reserve_bandwidth()
669 uhci_to_hcd(uhci)->self.bandwidth_allocated = in uhci_reserve_bandwidth()
670 uhci->total_load / MAX_PHASE; in uhci_reserve_bandwidth()
673 ++uhci_to_hcd(uhci)->self.bandwidth_int_reqs; in uhci_reserve_bandwidth()
677 ++uhci_to_hcd(uhci)->self.bandwidth_isoc_reqs; in uhci_reserve_bandwidth()
682 dev_dbg(uhci_dev(uhci), in uhci_reserve_bandwidth()
692 static void uhci_release_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_release_bandwidth() argument
699 uhci->load[i] -= load; in uhci_release_bandwidth()
700 uhci->total_load -= load; in uhci_release_bandwidth()
702 uhci_to_hcd(uhci)->self.bandwidth_allocated = in uhci_release_bandwidth()
703 uhci->total_load / MAX_PHASE; in uhci_release_bandwidth()
706 --uhci_to_hcd(uhci)->self.bandwidth_int_reqs; in uhci_release_bandwidth()
710 --uhci_to_hcd(uhci)->self.bandwidth_isoc_reqs; in uhci_release_bandwidth()
715 dev_dbg(uhci_dev(uhci), in uhci_release_bandwidth()
722 static inline struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci, in uhci_alloc_urb_priv() argument
740 static void uhci_free_urb_priv(struct uhci_hcd *uhci, in uhci_free_urb_priv() argument
746 dev_WARN(uhci_dev(uhci), "urb %p still on QH's list!\n", in uhci_free_urb_priv()
751 uhci_free_td(uhci, td); in uhci_free_urb_priv()
789 static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, in uhci_submit_control() argument
814 uhci_fill_td(uhci, td, status, destination | uhci_explen(8), in uhci_submit_control()
844 td = uhci_alloc_td(uhci); in uhci_submit_control()
847 *plink = LINK_TO_TD(uhci, td); in uhci_submit_control()
853 uhci_fill_td(uhci, td, status, in uhci_submit_control()
864 td = uhci_alloc_td(uhci); in uhci_submit_control()
867 *plink = LINK_TO_TD(uhci, td); in uhci_submit_control()
874 uhci_fill_td(uhci, td, status | TD_CTRL_IOC, in uhci_submit_control()
881 td = uhci_alloc_td(uhci); in uhci_submit_control()
884 *plink = LINK_TO_TD(uhci, td); in uhci_submit_control()
886 uhci_fill_td(uhci, td, 0, USB_PID_OUT | uhci_explen(0), 0); in uhci_submit_control()
888 qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); in uhci_submit_control()
900 uhci_add_fsbr(uhci, urb); in uhci_submit_control()
915 static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, in uhci_submit_common() argument
974 td = uhci_alloc_td(uhci); in uhci_submit_common()
977 *plink = LINK_TO_TD(uhci, td); in uhci_submit_common()
980 uhci_fill_td(uhci, td, status, in uhci_submit_common()
1010 td = uhci_alloc_td(uhci); in uhci_submit_common()
1013 *plink = LINK_TO_TD(uhci, td); in uhci_submit_common()
1016 uhci_fill_td(uhci, td, status, in uhci_submit_common()
1031 td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC); in uhci_submit_common()
1036 td = uhci_alloc_td(uhci); in uhci_submit_common()
1039 *plink = LINK_TO_TD(uhci, td); in uhci_submit_common()
1041 uhci_fill_td(uhci, td, 0, USB_PID_OUT | uhci_explen(0), 0); in uhci_submit_common()
1043 qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); in uhci_submit_common()
1056 static int uhci_submit_bulk(struct uhci_hcd *uhci, struct urb *urb, in uhci_submit_bulk() argument
1067 ret = uhci_submit_common(uhci, urb, qh); in uhci_submit_bulk()
1069 uhci_add_fsbr(uhci, urb); in uhci_submit_bulk()
1073 static int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb, in uhci_submit_interrupt() argument
1103 ret = uhci_check_bandwidth(uhci, qh); in uhci_submit_interrupt()
1110 ret = uhci_submit_common(uhci, urb, qh); in uhci_submit_interrupt()
1114 uhci_reserve_bandwidth(uhci, qh); in uhci_submit_interrupt()
1122 static int uhci_fixup_short_transfer(struct uhci_hcd *uhci, in uhci_fixup_short_transfer() argument
1136 qh->element = LINK_TO_TD(uhci, td); in uhci_fixup_short_transfer()
1146 uhci_toggle(td_token(uhci, qh->post_td)) ^ 1; in uhci_fixup_short_transfer()
1147 uhci_fixup_toggles(uhci, qh, 1); in uhci_fixup_short_transfer()
1162 uhci_free_td(uhci, td); in uhci_fixup_short_transfer()
1170 static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb) in uhci_result_common() argument
1182 ctrlstat = td_status(uhci, td); in uhci_result_common()
1192 uhci_packetout(td_token(uhci, td))); in uhci_result_common()
1201 uhci_show_qh(uhci, urbp->qh, errbuf, in uhci_result_common()
1208 } else if (len < uhci_expected_length(td_token(uhci, td))) { in uhci_result_common()
1228 uhci_free_td(uhci, qh->post_td); in uhci_result_common()
1240 qh->element = UHCI_PTR_TERM(uhci); in uhci_result_common()
1243 qh->initial_toggle = uhci_toggle(td_token(uhci, td)) ^ in uhci_result_common()
1247 ret = uhci_fixup_short_transfer(uhci, qh, urbp); in uhci_result_common()
1254 static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, in uhci_submit_isochronous() argument
1268 uhci_get_current_frame_number(uhci); in uhci_submit_isochronous()
1274 i = uhci_check_bandwidth(uhci, qh); in uhci_submit_isochronous()
1279 next = uhci->frame_number + 10; in uhci_submit_isochronous()
1289 next = uhci->frame_number + 1; in uhci_submit_isochronous()
1319 dev_dbg(uhci_dev(uhci), "iso underrun %p (%u+%u < %u)\n", in uhci_submit_isochronous()
1328 if (uhci_frame_before_eq(uhci->last_iso_frame + UHCI_NUMFRAMES, in uhci_submit_isochronous()
1337 td = uhci_alloc_td(uhci); in uhci_submit_isochronous()
1342 uhci_fill_td(uhci, td, status, destination | in uhci_submit_isochronous()
1349 td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC); in uhci_submit_isochronous()
1354 uhci_insert_td_in_frame_list(uhci, td, frame); in uhci_submit_isochronous()
1365 uhci_reserve_bandwidth(uhci, qh); in uhci_submit_isochronous()
1369 static int uhci_result_isochronous(struct uhci_hcd *uhci, struct urb *urb) in uhci_result_isochronous() argument
1380 if (uhci_frame_before_eq(uhci->cur_iso_frame, qh->iso_frame)) in uhci_result_isochronous()
1383 uhci_remove_tds_from_frame(uhci, qh->iso_frame); in uhci_result_isochronous()
1385 ctrlstat = td_status(uhci, td); in uhci_result_isochronous()
1401 uhci_free_td(uhci, td); in uhci_result_isochronous()
1412 struct uhci_hcd *uhci = hcd_to_uhci(hcd); in uhci_urb_enqueue() local
1417 spin_lock_irqsave(&uhci->lock, flags); in uhci_urb_enqueue()
1424 urbp = uhci_alloc_urb_priv(uhci, urb); in uhci_urb_enqueue()
1431 qh = uhci_alloc_qh(uhci, urb->dev, urb->ep); in uhci_urb_enqueue()
1439 ret = uhci_submit_control(uhci, urb, qh); in uhci_urb_enqueue()
1442 ret = uhci_submit_bulk(uhci, urb, qh); in uhci_urb_enqueue()
1445 ret = uhci_submit_interrupt(uhci, urb, qh); in uhci_urb_enqueue()
1449 ret = uhci_submit_isochronous(uhci, urb, qh); in uhci_urb_enqueue()
1463 uhci_activate_qh(uhci, qh); in uhci_urb_enqueue()
1464 uhci_urbp_wants_fsbr(uhci, urbp); in uhci_urb_enqueue()
1470 uhci_make_qh_idle(uhci, qh); /* Reclaim unused QH */ in uhci_urb_enqueue()
1472 uhci_free_urb_priv(uhci, urbp); in uhci_urb_enqueue()
1477 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_urb_enqueue()
1483 struct uhci_hcd *uhci = hcd_to_uhci(hcd); in uhci_urb_dequeue() local
1488 spin_lock_irqsave(&uhci->lock, flags); in uhci_urb_dequeue()
1497 uhci_unlink_isochronous_tds(uhci, urb); in uhci_urb_dequeue()
1501 uhci_get_current_frame_number(uhci); in uhci_urb_dequeue()
1502 if (uhci_frame_before_eq(urb->start_frame, uhci->frame_number)) in uhci_urb_dequeue()
1503 qh->unlink_frame = uhci->frame_number; in uhci_urb_dequeue()
1506 uhci_unlink_qh(uhci, qh); in uhci_urb_dequeue()
1509 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_urb_dequeue()
1516 static void uhci_giveback_urb(struct uhci_hcd *uhci, struct uhci_qh *qh, in uhci_giveback_urb() argument
1518 __releases(uhci->lock) in uhci_giveback_urb()
1519 __acquires(uhci->lock) in uhci_giveback_urb()
1552 uhci_free_urb_priv(uhci, urbp); in uhci_giveback_urb()
1553 usb_hcd_unlink_urb_from_ep(uhci_to_hcd(uhci), urb); in uhci_giveback_urb()
1555 spin_unlock(&uhci->lock); in uhci_giveback_urb()
1556 usb_hcd_giveback_urb(uhci_to_hcd(uhci), urb, status); in uhci_giveback_urb()
1557 spin_lock(&uhci->lock); in uhci_giveback_urb()
1562 uhci_unlink_qh(uhci, qh); in uhci_giveback_urb()
1564 uhci_release_bandwidth(uhci, qh); in uhci_giveback_urb()
1573 uhci->frame_number + uhci->is_stopped != qh->unlink_frame)
1575 static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_scan_qh() argument
1586 status = uhci_result_isochronous(uhci, urb); in uhci_scan_qh()
1588 status = uhci_result_common(uhci, urb); in uhci_scan_qh()
1601 uhci_giveback_urb(uhci, qh, urb, status); in uhci_scan_qh()
1622 if (!uhci_cleanup_queue(uhci, qh, urb)) { in uhci_scan_qh()
1626 uhci_giveback_urb(uhci, qh, urb, 0); in uhci_scan_qh()
1636 uhci_fixup_toggles(uhci, qh, 0); in uhci_scan_qh()
1646 td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC); in uhci_scan_qh()
1649 uhci_activate_qh(uhci, qh); in uhci_scan_qh()
1655 uhci_make_qh_idle(uhci, qh); in uhci_scan_qh()
1668 static int uhci_advance_check(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_advance_check() argument
1693 status = td_status(uhci, td); in uhci_advance_check()
1701 ret = uhci->is_stopped; in uhci_advance_check()
1712 LINK_TO_TD(uhci, qh->post_td)) { in uhci_advance_check()
1726 uhci_unlink_qh(uhci, qh); in uhci_advance_check()
1731 uhci_urbp_wants_fsbr(uhci, urbp); in uhci_advance_check()
1741 static void uhci_scan_schedule(struct uhci_hcd *uhci) in uhci_scan_schedule() argument
1747 if (uhci->scan_in_progress) { in uhci_scan_schedule()
1748 uhci->need_rescan = 1; in uhci_scan_schedule()
1751 uhci->scan_in_progress = 1; in uhci_scan_schedule()
1753 uhci->need_rescan = 0; in uhci_scan_schedule()
1754 uhci->fsbr_is_wanted = 0; in uhci_scan_schedule()
1756 uhci_clear_next_interrupt(uhci); in uhci_scan_schedule()
1757 uhci_get_current_frame_number(uhci); in uhci_scan_schedule()
1758 uhci->cur_iso_frame = uhci->frame_number; in uhci_scan_schedule()
1762 uhci->next_qh = list_entry(uhci->skelqh[i]->node.next, in uhci_scan_schedule()
1764 while ((qh = uhci->next_qh) != uhci->skelqh[i]) { in uhci_scan_schedule()
1765 uhci->next_qh = list_entry(qh->node.next, in uhci_scan_schedule()
1768 if (uhci_advance_check(uhci, qh)) { in uhci_scan_schedule()
1769 uhci_scan_qh(uhci, qh); in uhci_scan_schedule()
1771 uhci_urbp_wants_fsbr(uhci, in uhci_scan_schedule()
1778 uhci->last_iso_frame = uhci->cur_iso_frame; in uhci_scan_schedule()
1779 if (uhci->need_rescan) in uhci_scan_schedule()
1781 uhci->scan_in_progress = 0; in uhci_scan_schedule()
1783 if (uhci->fsbr_is_on && !uhci->fsbr_is_wanted && in uhci_scan_schedule()
1784 !uhci->fsbr_expiring) { in uhci_scan_schedule()
1785 uhci->fsbr_expiring = 1; in uhci_scan_schedule()
1786 mod_timer(&uhci->fsbr_timer, jiffies + FSBR_OFF_DELAY); in uhci_scan_schedule()
1789 if (list_empty(&uhci->skel_unlink_qh->node)) in uhci_scan_schedule()
1790 uhci_clear_next_interrupt(uhci); in uhci_scan_schedule()
1792 uhci_set_next_interrupt(uhci); in uhci_scan_schedule()