Lines Matching refs:qh
249 struct uhci_qh *qh; in uhci_alloc_qh() local
251 qh = dma_pool_zalloc(uhci->qh_pool, GFP_ATOMIC, &dma_handle); in uhci_alloc_qh()
252 if (!qh) in uhci_alloc_qh()
255 qh->dma_handle = 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()
260 INIT_LIST_HEAD(&qh->queue); in uhci_alloc_qh()
261 INIT_LIST_HEAD(&qh->node); in uhci_alloc_qh()
264 qh->type = usb_endpoint_type(&hep->desc); in uhci_alloc_qh()
265 if (qh->type != USB_ENDPOINT_XFER_ISOC) { in uhci_alloc_qh()
266 qh->dummy_td = uhci_alloc_td(uhci); in uhci_alloc_qh()
267 if (!qh->dummy_td) { in uhci_alloc_qh()
268 dma_pool_free(uhci->qh_pool, qh, dma_handle); in uhci_alloc_qh()
272 qh->state = QH_STATE_IDLE; in uhci_alloc_qh()
273 qh->hep = hep; in uhci_alloc_qh()
274 qh->udev = udev; in uhci_alloc_qh()
275 hep->hcpriv = qh; in uhci_alloc_qh()
277 if (qh->type == USB_ENDPOINT_XFER_INT || in uhci_alloc_qh()
278 qh->type == USB_ENDPOINT_XFER_ISOC) in uhci_alloc_qh()
279 qh->load = usb_calc_bus_time(udev->speed, in uhci_alloc_qh()
281 qh->type == USB_ENDPOINT_XFER_ISOC, in uhci_alloc_qh()
286 qh->state = QH_STATE_ACTIVE; in uhci_alloc_qh()
287 qh->type = -1; in uhci_alloc_qh()
289 return qh; in uhci_alloc_qh()
292 static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_free_qh() argument
294 WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); in uhci_free_qh()
295 if (!list_empty(&qh->queue)) in uhci_free_qh()
296 dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh); in uhci_free_qh()
298 list_del(&qh->node); in uhci_free_qh()
299 if (qh->udev) { in uhci_free_qh()
300 qh->hep->hcpriv = NULL; in uhci_free_qh()
301 if (qh->dummy_td) 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
325 if (qh->type == USB_ENDPOINT_XFER_ISOC) { in uhci_cleanup_queue()
327 qh->unlink_frame); in uhci_cleanup_queue()
334 if (qh->queue.next != &urbp->node) { 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()
355 if (qh->type == USB_ENDPOINT_XFER_CONTROL) in uhci_cleanup_queue()
361 qh->needs_fixup = 1; 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
377 unsigned int toggle = qh->initial_toggle; in uhci_fixup_toggles()
383 urbp = list_entry(qh->queue.next, struct urb_priv, node); in uhci_fixup_toggles()
387 else if (qh_element(qh) != UHCI_PTR_TERM(uhci)) in uhci_fixup_toggles()
393 urbp = list_prepare_entry(urbp, &qh->queue, node); in uhci_fixup_toggles()
394 list_for_each_entry_continue(urbp, &qh->queue, node) { in uhci_fixup_toggles()
415 pipe = list_entry(qh->queue.next, struct urb_priv, node)->urb->pipe; in uhci_fixup_toggles()
416 usb_settoggle(qh->udev, usb_pipeendpoint(pipe), in uhci_fixup_toggles()
418 qh->needs_fixup = 0; 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()
441 pqh = list_entry(qh->node.prev, struct uhci_qh, node); in link_interrupt()
442 qh->link = pqh->link; 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
460 if (pqh->skel <= qh->skel) in link_async()
463 list_add(&qh->node, &pqh->node); in link_async()
466 qh->link = pqh->link; in link_async()
468 link_to_new_qh = LINK_TO_QH(uhci, qh); in link_async()
473 if (pqh->skel < SKEL_FSBR && qh->skel >= SKEL_FSBR) in link_async()
480 static void uhci_activate_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_activate_qh() argument
482 WARN_ON(list_empty(&qh->queue)); in uhci_activate_qh()
486 if (qh_element(qh) == UHCI_PTR_TERM(uhci)) { in uhci_activate_qh()
487 struct urb_priv *urbp = list_entry(qh->queue.next, in uhci_activate_qh()
492 qh->element = LINK_TO_TD(uhci, td); in uhci_activate_qh()
496 qh->wait_expired = 0; in uhci_activate_qh()
497 qh->advance_jiffies = jiffies; in uhci_activate_qh()
499 if (qh->state == QH_STATE_ACTIVE) in uhci_activate_qh()
501 qh->state = QH_STATE_ACTIVE; 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()
508 list_del(&qh->node); in uhci_activate_qh()
510 if (qh->skel == SKEL_ISO) in uhci_activate_qh()
511 link_iso(uhci, qh); in uhci_activate_qh()
512 else if (qh->skel < SKEL_ASYNC) 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
525 pqh = list_entry(qh->node.prev, struct uhci_qh, node); in unlink_interrupt()
526 pqh->link = qh->link; in unlink_interrupt()
533 static void unlink_async(struct uhci_hcd *uhci, struct uhci_qh *qh) in unlink_async() argument
536 __hc32 link_to_next_qh = qh->link; in unlink_async()
538 pqh = list_entry(qh->node.prev, struct uhci_qh, node); in unlink_async()
543 if (pqh->skel < SKEL_FSBR && qh->skel >= SKEL_FSBR) in unlink_async()
551 static void uhci_unlink_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_unlink_qh() argument
553 if (qh->state == QH_STATE_UNLINKING) in uhci_unlink_qh()
555 WARN_ON(qh->state != QH_STATE_ACTIVE || !qh->udev); in uhci_unlink_qh()
556 qh->state = QH_STATE_UNLINKING; in uhci_unlink_qh()
559 if (qh->skel == SKEL_ISO) in uhci_unlink_qh()
561 else if (qh->skel < SKEL_ASYNC) in uhci_unlink_qh()
562 unlink_interrupt(uhci, qh); in uhci_unlink_qh()
564 unlink_async(uhci, qh); in uhci_unlink_qh()
567 qh->unlink_frame = uhci->frame_number; 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
588 WARN_ON(qh->state == QH_STATE_ACTIVE); in uhci_make_qh_idle()
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()
594 qh->state = QH_STATE_IDLE; in uhci_make_qh_idle()
597 if (qh->post_td) { in uhci_make_qh_idle()
598 uhci_free_td(uhci, qh->post_td); in uhci_make_qh_idle()
599 qh->post_td = NULL; in uhci_make_qh_idle()
623 static int uhci_check_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_check_bandwidth() argument
629 if (qh->phase >= 0) in uhci_check_bandwidth()
630 minimax_load = uhci_highest_load(uhci, qh->phase, qh->period); in uhci_check_bandwidth()
633 int max_phase = min_t(int, MAX_PHASE, qh->period); in uhci_check_bandwidth()
635 qh->phase = 0; 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()
641 qh->phase = phase; in uhci_check_bandwidth()
647 if (minimax_load + qh->load > 900) { in uhci_check_bandwidth()
650 qh->period, qh->phase, minimax_load, qh->load); in uhci_check_bandwidth()
659 static void uhci_reserve_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_reserve_bandwidth() argument
662 int load = qh->load; in uhci_reserve_bandwidth()
665 for (i = qh->phase; i < MAX_PHASE; i += qh->period) { in uhci_reserve_bandwidth()
671 switch (qh->type) { in uhci_reserve_bandwidth()
681 qh->bandwidth_reserved = 1; in uhci_reserve_bandwidth()
684 "reserve", qh->udev->devnum, in uhci_reserve_bandwidth()
685 qh->hep->desc.bEndpointAddress, p, in uhci_reserve_bandwidth()
686 qh->period, qh->phase, load); in uhci_reserve_bandwidth()
692 static void uhci_release_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) in uhci_release_bandwidth() argument
695 int load = qh->load; in uhci_release_bandwidth()
698 for (i = qh->phase; i < MAX_PHASE; i += qh->period) { in uhci_release_bandwidth()
704 switch (qh->type) { in uhci_release_bandwidth()
714 qh->bandwidth_reserved = 0; in uhci_release_bandwidth()
717 "release", qh->udev->devnum, in uhci_release_bandwidth()
718 qh->hep->desc.bEndpointAddress, p, in uhci_release_bandwidth()
719 qh->period, qh->phase, load); in uhci_release_bandwidth()
790 struct uhci_qh *qh) in uhci_submit_control() argument
794 int maxsze = usb_endpoint_maxp(&qh->hep->desc); in uhci_submit_control()
812 td = qh->dummy_td; in uhci_submit_control()
888 qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); in uhci_submit_control()
889 qh->dummy_td = td; in uhci_submit_control()
902 if (qh->state != QH_STATE_ACTIVE) in uhci_submit_control()
903 qh->skel = skel; in uhci_submit_control()
908 uhci_remove_td_from_urbp(qh->dummy_td); in uhci_submit_control()
916 struct uhci_qh *qh) in uhci_submit_common() argument
920 int maxsze = usb_endpoint_maxp(&qh->hep->desc); in uhci_submit_common()
963 td = qh->dummy_td; in uhci_submit_common()
1043 qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); in uhci_submit_common()
1044 qh->dummy_td = td; in uhci_submit_common()
1052 uhci_remove_td_from_urbp(qh->dummy_td); in uhci_submit_common()
1057 struct uhci_qh *qh) in uhci_submit_bulk() argument
1065 if (qh->state != QH_STATE_ACTIVE) in uhci_submit_bulk()
1066 qh->skel = SKEL_BULK; in uhci_submit_bulk()
1067 ret = uhci_submit_common(uhci, urb, qh); in uhci_submit_bulk()
1074 struct uhci_qh *qh) in uhci_submit_interrupt() argument
1083 if (!qh->bandwidth_reserved) { in uhci_submit_interrupt()
1096 qh->period = 1 << exponent; in uhci_submit_interrupt()
1097 qh->skel = SKEL_INDEX(exponent); in uhci_submit_interrupt()
1102 qh->phase = (qh->period / 2) & (MAX_PHASE - 1); in uhci_submit_interrupt()
1103 ret = uhci_check_bandwidth(uhci, qh); in uhci_submit_interrupt()
1107 } else if (qh->period > urb->interval) in uhci_submit_interrupt()
1110 ret = uhci_submit_common(uhci, urb, qh); in uhci_submit_interrupt()
1112 urb->interval = qh->period; in uhci_submit_interrupt()
1113 if (!qh->bandwidth_reserved) in uhci_submit_interrupt()
1114 uhci_reserve_bandwidth(uhci, qh); in uhci_submit_interrupt()
1123 struct uhci_qh *qh, struct urb_priv *urbp) in uhci_fixup_short_transfer() argument
1130 if (qh->type == USB_ENDPOINT_XFER_CONTROL) { in uhci_fixup_short_transfer()
1136 qh->element = LINK_TO_TD(uhci, td); in uhci_fixup_short_transfer()
1145 qh->initial_toggle = 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()
1150 td = qh->post_td; in uhci_fixup_short_transfer()
1151 qh->element = td->link; in uhci_fixup_short_transfer()
1173 struct uhci_qh *qh = urbp->qh; in uhci_result_common() local
1201 uhci_show_qh(uhci, urbp->qh, errbuf, in uhci_result_common()
1212 if (qh->type == USB_ENDPOINT_XFER_CONTROL) { in uhci_result_common()
1227 if (qh->post_td) in uhci_result_common()
1228 uhci_free_td(uhci, qh->post_td); in uhci_result_common()
1229 qh->post_td = td; in uhci_result_common()
1240 qh->element = UHCI_PTR_TERM(uhci); in uhci_result_common()
1241 qh->is_stopped = 1; in uhci_result_common()
1242 qh->needs_fixup = (qh->type != USB_ENDPOINT_XFER_CONTROL); 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()
1255 struct uhci_qh *qh) in uhci_submit_isochronous() argument
1271 if (!qh->bandwidth_reserved) { in uhci_submit_isochronous()
1272 qh->period = urb->interval; in uhci_submit_isochronous()
1273 qh->phase = -1; /* Find the best phase */ in uhci_submit_isochronous()
1274 i = uhci_check_bandwidth(uhci, qh); in uhci_submit_isochronous()
1280 frame = qh->phase; in uhci_submit_isochronous()
1283 frame += (next - frame + qh->period - 1) & -qh->period; in uhci_submit_isochronous()
1285 } else if (qh->period != urb->interval) { in uhci_submit_isochronous()
1292 if (list_empty(&qh->queue)) { in uhci_submit_isochronous()
1293 frame = qh->iso_frame; in uhci_submit_isochronous()
1297 lurb = list_entry(qh->queue.prev, in uhci_submit_isochronous()
1309 frame += (next - frame + qh->period - 1) & in uhci_submit_isochronous()
1310 -qh->period; in uhci_submit_isochronous()
1318 qh->period)) in uhci_submit_isochronous()
1322 qh->period, in uhci_submit_isochronous()
1355 frame += qh->period; in uhci_submit_isochronous()
1358 if (list_empty(&qh->queue)) { in uhci_submit_isochronous()
1359 qh->iso_packet_desc = &urb->iso_frame_desc[0]; in uhci_submit_isochronous()
1360 qh->iso_frame = urb->start_frame; in uhci_submit_isochronous()
1363 qh->skel = SKEL_ISO; in uhci_submit_isochronous()
1364 if (!qh->bandwidth_reserved) in uhci_submit_isochronous()
1365 uhci_reserve_bandwidth(uhci, qh); in uhci_submit_isochronous()
1373 struct uhci_qh *qh = urbp->qh; in uhci_result_isochronous() local
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()
1394 qh->iso_packet_desc->actual_length = actlength; in uhci_result_isochronous()
1395 qh->iso_packet_desc->status = status; in uhci_result_isochronous()
1402 qh->iso_frame += qh->period; in uhci_result_isochronous()
1403 ++qh->iso_packet_desc; in uhci_result_isochronous()
1415 struct uhci_qh *qh; in uhci_urb_enqueue() local
1429 qh = urb->ep->hcpriv; in uhci_urb_enqueue()
1431 qh = uhci_alloc_qh(uhci, urb->dev, urb->ep); in uhci_urb_enqueue()
1432 if (!qh) in uhci_urb_enqueue()
1435 urbp->qh = qh; in uhci_urb_enqueue()
1437 switch (qh->type) { 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()
1456 list_add_tail(&urbp->node, &qh->queue); in uhci_urb_enqueue()
1462 if (qh->queue.next == &urbp->node && !qh->is_stopped) { in uhci_urb_enqueue()
1463 uhci_activate_qh(uhci, qh); in uhci_urb_enqueue()
1469 if (qh->state == QH_STATE_IDLE) in uhci_urb_enqueue()
1470 uhci_make_qh_idle(uhci, qh); /* Reclaim unused QH */ in uhci_urb_enqueue()
1485 struct uhci_qh *qh; in uhci_urb_dequeue() local
1493 qh = ((struct urb_priv *) urb->hcpriv)->qh; in uhci_urb_dequeue()
1496 if (qh->type == USB_ENDPOINT_XFER_ISOC) { 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()
1516 static void uhci_giveback_urb(struct uhci_hcd *uhci, struct uhci_qh *qh, in uhci_giveback_urb() argument
1523 if (qh->type == USB_ENDPOINT_XFER_CONTROL) { in uhci_giveback_urb()
1533 else if (qh->type == USB_ENDPOINT_XFER_ISOC && in uhci_giveback_urb()
1534 urbp->node.prev == &qh->queue && in uhci_giveback_urb()
1535 urbp->node.next != &qh->queue) { in uhci_giveback_urb()
1539 qh->iso_packet_desc = &nurb->iso_frame_desc[0]; in uhci_giveback_urb()
1540 qh->iso_frame = nurb->start_frame; in uhci_giveback_urb()
1546 if (list_empty(&qh->queue) && qh->needs_fixup) { in uhci_giveback_urb()
1548 usb_pipeout(urb->pipe), qh->initial_toggle); in uhci_giveback_urb()
1549 qh->needs_fixup = 0; in uhci_giveback_urb()
1561 if (list_empty(&qh->queue)) { in uhci_giveback_urb()
1562 uhci_unlink_qh(uhci, qh); in uhci_giveback_urb()
1563 if (qh->bandwidth_reserved) in uhci_giveback_urb()
1564 uhci_release_bandwidth(uhci, qh); in uhci_giveback_urb()
1571 #define QH_FINISHED_UNLINKING(qh) \ argument
1572 (qh->state == QH_STATE_UNLINKING && \
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
1581 while (!list_empty(&qh->queue)) { in uhci_scan_qh()
1582 urbp = list_entry(qh->queue.next, struct urb_priv, node); in uhci_scan_qh()
1585 if (qh->type == USB_ENDPOINT_XFER_ISOC) in uhci_scan_qh()
1595 if (QH_FINISHED_UNLINKING(qh)) in uhci_scan_qh()
1596 qh->is_stopped = 1; in uhci_scan_qh()
1597 else if (!qh->is_stopped) in uhci_scan_qh()
1601 uhci_giveback_urb(uhci, qh, urb, status); in uhci_scan_qh()
1608 if (QH_FINISHED_UNLINKING(qh)) in uhci_scan_qh()
1609 qh->is_stopped = 1; in uhci_scan_qh()
1610 else if (!qh->is_stopped) in uhci_scan_qh()
1615 list_for_each_entry(urbp, &qh->queue, node) { in uhci_scan_qh()
1622 if (!uhci_cleanup_queue(uhci, qh, urb)) { in uhci_scan_qh()
1623 qh->is_stopped = 0; in uhci_scan_qh()
1626 uhci_giveback_urb(uhci, qh, urb, 0); in uhci_scan_qh()
1630 qh->is_stopped = 0; in uhci_scan_qh()
1634 if (!list_empty(&qh->queue)) { in uhci_scan_qh()
1635 if (qh->needs_fixup) in uhci_scan_qh()
1636 uhci_fixup_toggles(uhci, qh, 0); in uhci_scan_qh()
1641 urbp = list_entry(qh->queue.next, struct urb_priv, node); in uhci_scan_qh()
1642 if (urbp->fsbr && qh->wait_expired) { in uhci_scan_qh()
1649 uhci_activate_qh(uhci, qh); in uhci_scan_qh()
1654 else if (QH_FINISHED_UNLINKING(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
1675 if (qh->type == USB_ENDPOINT_XFER_ISOC) in uhci_advance_check()
1686 if (qh->state != QH_STATE_ACTIVE) { in uhci_advance_check()
1691 urbp = list_entry(qh->queue.next, struct urb_priv, node); in uhci_advance_check()
1697 qh->wait_expired = 0; in uhci_advance_check()
1698 qh->advance_jiffies = jiffies; in uhci_advance_check()
1705 if (qh->wait_expired) in uhci_advance_check()
1708 if (time_after(jiffies, qh->advance_jiffies + QH_WAIT_TIMEOUT)) { in uhci_advance_check()
1711 if (qh->post_td && qh_element(qh) == in uhci_advance_check()
1712 LINK_TO_TD(uhci, qh->post_td)) { in uhci_advance_check()
1713 qh->element = qh->post_td->link; in uhci_advance_check()
1714 qh->advance_jiffies = jiffies; in uhci_advance_check()
1719 qh->wait_expired = 1; in uhci_advance_check()
1726 uhci_unlink_qh(uhci, qh); in uhci_advance_check()
1744 struct uhci_qh *qh; in uhci_scan_schedule() local
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()
1770 if (qh->state == QH_STATE_ACTIVE) { in uhci_scan_schedule()
1772 list_entry(qh->queue.next, struct urb_priv, node)); in uhci_scan_schedule()