qh 141 drivers/net/ethernet/marvell/mvpp2/mvpp2.h #define MVPP22_CLS_C2_ATTR0_QHIGH(qh) (((qh) & 0x1f) << 24) qh 864 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c u8 qh, ql, pmap; qh 890 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c qh = (port->first_rxq >> 3) & MVPP22_CLS_C2_ATTR0_QHIGH_MASK; qh 893 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) | qh 987 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c u8 qh, ql; qh 994 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c qh = (ctx >> 3) & MVPP22_CLS_C2_ATTR0_QHIGH_MASK; qh 997 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) | qh 1008 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c u8 qh, ql; qh 1013 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c qh = (port->first_rxq >> 3) & MVPP22_CLS_C2_ATTR0_QHIGH_MASK; qh 1016 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) | qh 1082 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c u8 qh, ql, pmap; qh 1145 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c qh = (ctx >> 3) & MVPP22_CLS_C2_ATTR0_QHIGH_MASK; qh 1148 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c qh = ((act->queue.index + port->first_rxq) >> 3) & qh 1154 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) | qh 209 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c u8 qh, ql; qh 213 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c qh = (c2.attr[0] >> MVPP22_CLS_C2_ATTR0_QHIGH_OFFS) & qh 219 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c seq_printf(s, "%d\n", (qh << 3 | ql)); qh 5715 drivers/scsi/bfa/bfa_fcs_lport.c struct list_head *qh, *qe; qh 5727 drivers/scsi/bfa/bfa_fcs_lport.c qh = &port->rport_q; qh 5728 drivers/scsi/bfa/bfa_fcs_lport.c qe = bfa_q_first(qh); qh 5730 drivers/scsi/bfa/bfa_fcs_lport.c while ((qe != qh) && (i < nrports)) { qh 5763 drivers/scsi/bfa/bfa_fcs_lport.c struct list_head *qh, *qe; qh 5775 drivers/scsi/bfa/bfa_fcs_lport.c qh = &port->rport_q; qh 5776 drivers/scsi/bfa/bfa_fcs_lport.c qe = bfa_q_first(qh); qh 5778 drivers/scsi/bfa/bfa_fcs_lport.c while ((qe != qh) && (i < *nrports)) { qh 5813 drivers/scsi/bfa/bfa_fcs_lport.c struct list_head *qh, *qe; qh 5832 drivers/scsi/bfa/bfa_fcs_lport.c qh = &port->rport_q; qh 5833 drivers/scsi/bfa/bfa_fcs_lport.c qe = bfa_q_first(qh); qh 5835 drivers/scsi/bfa/bfa_fcs_lport.c while (qe != qh) { qh 3194 drivers/scsi/bfa/bfa_ioc.c struct list_head *qh = &mod->timer_q; qh 3201 drivers/scsi/bfa/bfa_ioc.c qe = bfa_q_next(qh); qh 3203 drivers/scsi/bfa/bfa_ioc.c while (qe != qh) { qh 548 drivers/scsi/qla2xxx/qla_dbg.c struct qla2xxx_mqueue_header *qh; qh 576 drivers/scsi/qla2xxx/qla_dbg.c qh = ptr; qh 577 drivers/scsi/qla2xxx/qla_dbg.c qh->queue = htonl(TYPE_ATIO_QUEUE); qh 578 drivers/scsi/qla2xxx/qla_dbg.c qh->number = htonl(que); qh 579 drivers/scsi/qla2xxx/qla_dbg.c qh->size = htonl(aqp->length * sizeof(request_t)); qh 595 drivers/scsi/qla2xxx/qla_dbg.c struct qla2xxx_mqueue_header *qh; qh 620 drivers/scsi/qla2xxx/qla_dbg.c qh = ptr; qh 621 drivers/scsi/qla2xxx/qla_dbg.c qh->queue = htonl(TYPE_REQUEST_QUEUE); qh 622 drivers/scsi/qla2xxx/qla_dbg.c qh->number = htonl(que); qh 623 drivers/scsi/qla2xxx/qla_dbg.c qh->size = htonl(req->length * sizeof(request_t)); qh 648 drivers/scsi/qla2xxx/qla_dbg.c qh = ptr; qh 649 drivers/scsi/qla2xxx/qla_dbg.c qh->queue = htonl(TYPE_RESPONSE_QUEUE); qh 650 drivers/scsi/qla2xxx/qla_dbg.c qh->number = htonl(que); qh 651 drivers/scsi/qla2xxx/qla_dbg.c qh->size = htonl(rsp->length * sizeof(response_t)); qh 55 drivers/soc/ti/knav_qmss_queue.c #define for_each_handle_rcu(qh, inst) \ qh 56 drivers/soc/ti/knav_qmss_queue.c list_for_each_entry_rcu(qh, &inst->handles, list) qh 83 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh; qh 89 drivers/soc/ti/knav_qmss_queue.c for_each_handle_rcu(qh, inst) { qh 90 drivers/soc/ti/knav_qmss_queue.c if (atomic_read(&qh->notifier_enabled) <= 0) qh 92 drivers/soc/ti/knav_qmss_queue.c if (WARN_ON(!qh->notifier_fn)) qh 94 drivers/soc/ti/knav_qmss_queue.c this_cpu_inc(qh->stats->notifies); qh 95 drivers/soc/ti/knav_qmss_queue.c qh->notifier_fn(qh->notifier_fn_arg); qh 215 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh; qh 219 drivers/soc/ti/knav_qmss_queue.c qh = devm_kzalloc(inst->kdev->dev, sizeof(*qh), GFP_KERNEL); qh 220 drivers/soc/ti/knav_qmss_queue.c if (!qh) qh 223 drivers/soc/ti/knav_qmss_queue.c qh->stats = alloc_percpu(struct knav_queue_stats); qh 224 drivers/soc/ti/knav_qmss_queue.c if (!qh->stats) { qh 229 drivers/soc/ti/knav_qmss_queue.c qh->flags = flags; qh 230 drivers/soc/ti/knav_qmss_queue.c qh->inst = inst; qh 232 drivers/soc/ti/knav_qmss_queue.c qh->reg_push = &inst->qmgr->reg_push[id]; qh 233 drivers/soc/ti/knav_qmss_queue.c qh->reg_pop = &inst->qmgr->reg_pop[id]; qh 234 drivers/soc/ti/knav_qmss_queue.c qh->reg_peek = &inst->qmgr->reg_peek[id]; qh 247 drivers/soc/ti/knav_qmss_queue.c list_add_tail_rcu(&qh->list, &inst->handles); qh 248 drivers/soc/ti/knav_qmss_queue.c return qh; qh 251 drivers/soc/ti/knav_qmss_queue.c if (qh->stats) qh 252 drivers/soc/ti/knav_qmss_queue.c free_percpu(qh->stats); qh 253 drivers/soc/ti/knav_qmss_queue.c devm_kfree(inst->kdev->dev, qh); qh 261 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh; qh 265 drivers/soc/ti/knav_qmss_queue.c qh = ERR_PTR(-ENODEV); qh 270 drivers/soc/ti/knav_qmss_queue.c qh = ERR_PTR(-EEXIST); qh 274 drivers/soc/ti/knav_qmss_queue.c qh = ERR_PTR(-EBUSY); qh 279 drivers/soc/ti/knav_qmss_queue.c qh = __knav_queue_open(inst, name, flags); qh 284 drivers/soc/ti/knav_qmss_queue.c return qh; qh 291 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = ERR_PTR(-EINVAL); qh 303 drivers/soc/ti/knav_qmss_queue.c qh = __knav_queue_open(inst, name, flags); qh 309 drivers/soc/ti/knav_qmss_queue.c return qh; qh 320 drivers/soc/ti/knav_qmss_queue.c static int knav_queue_enable_notifier(struct knav_queue *qh) qh 322 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 325 drivers/soc/ti/knav_qmss_queue.c if (WARN_ON(!qh->notifier_fn)) qh 329 drivers/soc/ti/knav_qmss_queue.c first = (atomic_inc_return(&qh->notifier_enabled) == 1); qh 341 drivers/soc/ti/knav_qmss_queue.c static int knav_queue_disable_notifier(struct knav_queue *qh) qh 343 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 346 drivers/soc/ti/knav_qmss_queue.c last = (atomic_dec_return(&qh->notifier_enabled) == 0); qh 357 drivers/soc/ti/knav_qmss_queue.c static int knav_queue_set_notifier(struct knav_queue *qh, qh 360 drivers/soc/ti/knav_qmss_queue.c knav_queue_notify_fn old_fn = qh->notifier_fn; qh 365 drivers/soc/ti/knav_qmss_queue.c if (!(qh->inst->range->flags & (RANGE_HAS_ACCUMULATOR | RANGE_HAS_IRQ))) qh 369 drivers/soc/ti/knav_qmss_queue.c knav_queue_disable_notifier(qh); qh 371 drivers/soc/ti/knav_qmss_queue.c qh->notifier_fn = cfg->fn; qh 372 drivers/soc/ti/knav_qmss_queue.c qh->notifier_fn_arg = cfg->fn_arg; qh 375 drivers/soc/ti/knav_qmss_queue.c knav_queue_enable_notifier(qh); qh 418 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = qhandle; qh 419 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 421 drivers/soc/ti/knav_qmss_queue.c return readl_relaxed(&qh->reg_peek[0].entry_count) + qh 429 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh; qh 442 drivers/soc/ti/knav_qmss_queue.c for_each_handle_rcu(qh, inst) { qh 444 drivers/soc/ti/knav_qmss_queue.c pushes += per_cpu_ptr(qh->stats, cpu)->pushes; qh 445 drivers/soc/ti/knav_qmss_queue.c pops += per_cpu_ptr(qh->stats, cpu)->pops; qh 446 drivers/soc/ti/knav_qmss_queue.c push_errors += per_cpu_ptr(qh->stats, cpu)->push_errors; qh 447 drivers/soc/ti/knav_qmss_queue.c pop_errors += per_cpu_ptr(qh->stats, cpu)->pop_errors; qh 448 drivers/soc/ti/knav_qmss_queue.c notifies += per_cpu_ptr(qh->stats, cpu)->notifies; qh 452 drivers/soc/ti/knav_qmss_queue.c qh, qh 455 drivers/soc/ti/knav_qmss_queue.c knav_queue_get_count(qh), qh 509 drivers/soc/ti/knav_qmss_queue.c static int knav_queue_flush(struct knav_queue *qh) qh 511 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 536 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = ERR_PTR(-EINVAL); qh 542 drivers/soc/ti/knav_qmss_queue.c qh = knav_queue_open_by_type(name, id, flags); qh 546 drivers/soc/ti/knav_qmss_queue.c qh = knav_queue_open_by_id(name, id, flags); qh 549 drivers/soc/ti/knav_qmss_queue.c return qh; qh 559 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = qhandle; qh 560 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 562 drivers/soc/ti/knav_qmss_queue.c while (atomic_read(&qh->notifier_enabled) > 0) qh 563 drivers/soc/ti/knav_qmss_queue.c knav_queue_disable_notifier(qh); qh 566 drivers/soc/ti/knav_qmss_queue.c list_del_rcu(&qh->list); qh 575 drivers/soc/ti/knav_qmss_queue.c free_percpu(qh->stats); qh 576 drivers/soc/ti/knav_qmss_queue.c devm_kfree(inst->kdev->dev, qh); qh 591 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = qhandle; qh 597 drivers/soc/ti/knav_qmss_queue.c ret = qh->inst->kdev->base_id + qh->inst->id; qh 601 drivers/soc/ti/knav_qmss_queue.c ret = knav_queue_flush(qh); qh 606 drivers/soc/ti/knav_qmss_queue.c ret = knav_queue_set_notifier(qh, cfg); qh 610 drivers/soc/ti/knav_qmss_queue.c ret = knav_queue_enable_notifier(qh); qh 614 drivers/soc/ti/knav_qmss_queue.c ret = knav_queue_disable_notifier(qh); qh 618 drivers/soc/ti/knav_qmss_queue.c ret = knav_queue_get_count(qh); qh 643 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = qhandle; qh 647 drivers/soc/ti/knav_qmss_queue.c writel_relaxed(val, &qh->reg_push[0].ptr_size_thresh); qh 649 drivers/soc/ti/knav_qmss_queue.c this_cpu_inc(qh->stats->pushes); qh 663 drivers/soc/ti/knav_qmss_queue.c struct knav_queue *qh = qhandle; qh 664 drivers/soc/ti/knav_qmss_queue.c struct knav_queue_inst *inst = qh->inst; qh 678 drivers/soc/ti/knav_qmss_queue.c val = readl_relaxed(&qh->reg_pop[0].ptr_size_thresh); qh 687 drivers/soc/ti/knav_qmss_queue.c this_cpu_inc(qh->stats->pops); qh 50 drivers/staging/wusbcore/host/whci/asl.c whc_qset_set_link_ptr(&qset->qh.link, next->qset_dma); qh 51 drivers/staging/wusbcore/host/whci/asl.c whc_qset_set_link_ptr(&prev->qh.link, qset->qset_dma); qh 72 drivers/staging/wusbcore/host/whci/asl.c whc_qset_set_link_ptr(&prev->qh.link, next->qset_dma); qh 36 drivers/staging/wusbcore/host/whci/debug.c qset->qh.info1 & 0x0f, qh 37 drivers/staging/wusbcore/host/whci/debug.c (qset->qh.info1 >> 4) & 0x1 ? "in" : "out", qh 38 drivers/staging/wusbcore/host/whci/debug.c qh_type[(qset->qh.info1 >> 5) & 0x7], qh 39 drivers/staging/wusbcore/host/whci/debug.c (qset->qh.info1 >> 16) & 0xffff); qh 41 drivers/staging/wusbcore/host/whci/debug.c seq_printf(s, " -> %08x\n", (u32)qset->qh.link); qh 43 drivers/staging/wusbcore/host/whci/debug.c qset->qh.info1, qset->qh.info2, qset->qh.info3); qh 45 drivers/staging/wusbcore/host/whci/debug.c qset->qh.status, qset->qh.err_count, qset->qh.cur_window); qh 47 drivers/staging/wusbcore/host/whci/debug.c qset->qh.overlay.qtd.status, qset->qh.overlay.qtd.options); qh 202 drivers/staging/wusbcore/host/whci/pzl.c whc_qset_set_link_ptr(&qset->qh.link, tmp_qh); qh 78 drivers/staging/wusbcore/host/whci/qset.c qset->qh.info1 = cpu_to_le32( qh 85 drivers/staging/wusbcore/host/whci/qset.c qset->qh.info2 = cpu_to_le32( qh 96 drivers/staging/wusbcore/host/whci/qset.c qset->qh.info3 = cpu_to_le32( qh 101 drivers/staging/wusbcore/host/whci/qset.c qset->qh.cur_window = cpu_to_le32((1 << qset->max_burst) - 1); qh 115 drivers/staging/wusbcore/host/whci/qset.c qset->qh.link = cpu_to_le64(QH_LINK_NTDS(8) | QH_LINK_T); qh 116 drivers/staging/wusbcore/host/whci/qset.c qset->qh.status = qset->qh.status & QH_STATUS_SEQ_MASK; qh 117 drivers/staging/wusbcore/host/whci/qset.c qset->qh.err_count = 0; qh 118 drivers/staging/wusbcore/host/whci/qset.c qset->qh.scratch[0] = 0; qh 119 drivers/staging/wusbcore/host/whci/qset.c qset->qh.scratch[1] = 0; qh 120 drivers/staging/wusbcore/host/whci/qset.c qset->qh.scratch[2] = 0; qh 122 drivers/staging/wusbcore/host/whci/qset.c memset(&qset->qh.overlay, 0, sizeof(qset->qh.overlay)); qh 137 drivers/staging/wusbcore/host/whci/qset.c qset->qh.status &= ~QH_STATUS_SEQ_MASK; qh 138 drivers/staging/wusbcore/host/whci/qset.c qset->qh.cur_window = cpu_to_le32((1 << qset->max_burst) - 1); qh 226 drivers/staging/wusbcore/host/whci/qset.c if (QH_STATUS_TO_ICUR(qset->qh.status) == qset->td_end) qh 780 drivers/staging/wusbcore/host/whci/qset.c = QH_STATUS_TO_ICUR(le16_to_cpu(qset->qh.status)); qh 229 drivers/staging/wusbcore/host/whci/whci-hc.h struct whc_qhead qh; qh 96 drivers/usb/chipidea/ci.h } qh; qh 138 drivers/usb/chipidea/debug.c i, (u32)hweprx->qh.dma, (u32)hweptx->qh.dma); qh 141 drivers/usb/chipidea/debug.c *((u32 *)hweprx->qh.ptr + j), qh 142 drivers/usb/chipidea/debug.c *((u32 *)hweptx->qh.ptr + j)); qh 168 drivers/usb/chipidea/debug.c list_for_each_entry(req, &ci->ci_hw_ep[i].qh.queue, queue) { qh 470 drivers/usb/chipidea/udc.c if (!list_empty(&hwep->qh.queue)) { qh 477 drivers/usb/chipidea/udc.c hwreqprev = list_entry(hwep->qh.queue.prev, qh 496 drivers/usb/chipidea/udc.c hwep->qh.ptr->td.next = cpu_to_le32(firstnode->dma); qh 497 drivers/usb/chipidea/udc.c hwep->qh.ptr->td.token &= qh 506 drivers/usb/chipidea/udc.c hwep->qh.ptr->cap |= cpu_to_le32(mul << __ffs(QH_MULT)); qh 531 drivers/usb/chipidea/udc.c hwep->qh.ptr->td.next = cpu_to_le32(node->dma); qh 532 drivers/usb/chipidea/udc.c hwep->qh.ptr->td.token &= qh 633 drivers/usb/chipidea/udc.c while (!list_empty(&hwep->qh.queue)) { qh 636 drivers/usb/chipidea/udc.c struct ci_hw_req *hwreq = list_entry(hwep->qh.queue.next, qh 677 drivers/usb/chipidea/udc.c !list_empty(&hwep->qh.queue) && qh 816 drivers/usb/chipidea/udc.c if (!list_empty(&hwep->qh.queue)) { qh 844 drivers/usb/chipidea/udc.c list_add_tail(&hwreq->queue, &hwep->qh.queue); qh 978 drivers/usb/chipidea/udc.c list_for_each_entry_safe(hwreq, hwreqtemp, &hwep->qh.queue, qh 1032 drivers/usb/chipidea/udc.c memcpy(&req, &hwep->qh.ptr->setup, sizeof(req)); qh 1241 drivers/usb/chipidea/udc.c if (!list_empty(&hwep->qh.queue)) { qh 1268 drivers/usb/chipidea/udc.c hwep->qh.ptr->cap = cpu_to_le32(cap); qh 1270 drivers/usb/chipidea/udc.c hwep->qh.ptr->td.next |= cpu_to_le32(TD_TERMINATE); /* needed? */ qh 1422 drivers/usb/chipidea/udc.c list_empty(&hwep->qh.queue)) qh 1547 drivers/usb/chipidea/udc.c hw_device_state(ci, ci->ep0out->qh.dma); qh 1715 drivers/usb/chipidea/udc.c INIT_LIST_HEAD(&hwep->qh.queue); qh 1716 drivers/usb/chipidea/udc.c hwep->qh.ptr = dma_pool_zalloc(ci->qh_pool, GFP_KERNEL, qh 1717 drivers/usb/chipidea/udc.c &hwep->qh.dma); qh 1718 drivers/usb/chipidea/udc.c if (hwep->qh.ptr == NULL) qh 1750 drivers/usb/chipidea/udc.c dma_pool_free(ci->qh_pool, hwep->qh.ptr, hwep->qh.dma); qh 1797 drivers/usb/chipidea/udc.c retval = hw_device_state(ci, ci->ep0out->qh.dma); qh 442 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 473 drivers/usb/dwc2/hcd.c dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); qh 475 drivers/usb/dwc2/hcd.c list_for_each_entry(qh, &hsotg->non_periodic_sched_inactive, qh 477 drivers/usb/dwc2/hcd.c dev_dbg(hsotg->dev, " %p\n", qh); qh 479 drivers/usb/dwc2/hcd.c list_for_each_entry(qh, &hsotg->non_periodic_sched_waiting, qh 481 drivers/usb/dwc2/hcd.c dev_dbg(hsotg->dev, " %p\n", qh); qh 483 drivers/usb/dwc2/hcd.c list_for_each_entry(qh, &hsotg->non_periodic_sched_active, qh 485 drivers/usb/dwc2/hcd.c dev_dbg(hsotg->dev, " %p\n", qh); qh 1056 drivers/usb/dwc2/hcd.c wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1); qh 1068 drivers/usb/dwc2/hcd.c chan->qh, wire_frame, frame_number, qh 1081 drivers/usb/dwc2/hcd.c chan->qh->next_active_frame = qh 1607 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh, *qh_tmp; qh 1610 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { qh 1611 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qh 1614 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 1623 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh, *qh_tmp; qh 1635 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { qh 1636 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_unlink(hsotg, qh); qh 1639 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qh 1641 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 1643 drivers/usb/dwc2/hcd.c if (qh->channel && qh->channel->qh == qh) qh 1644 drivers/usb/dwc2/hcd.c qh->channel->qh = NULL; qh 1647 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_free(hsotg, qh); qh 1738 drivers/usb/dwc2/hcd.c channel->qh = NULL; qh 1879 drivers/usb/dwc2/hcd.c struct dwc2_hcd_urb *urb, struct dwc2_qh *qh, qh 1909 drivers/usb/dwc2/hcd.c retval = dwc2_hcd_qtd_add(hsotg, qtd, qh); qh 1921 drivers/usb/dwc2/hcd.c if (qtd->qh->ep_type == USB_ENDPOINT_XFER_BULK && qh 1941 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 1950 drivers/usb/dwc2/hcd.c qh = urb_qtd->qh; qh 1951 drivers/usb/dwc2/hcd.c if (!qh) { qh 1958 drivers/usb/dwc2/hcd.c if (urb_qtd->in_process && qh->channel) { qh 1959 drivers/usb/dwc2/hcd.c dwc2_dump_channel_info(hsotg, qh->channel); qh 1970 drivers/usb/dwc2/hcd.c dwc2_hc_halt(hsotg, qh->channel, qh 1981 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); qh 1983 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_deactivate(hsotg, qh, 0); qh 1984 drivers/usb/dwc2/hcd.c qh->channel = NULL; qh 1985 drivers/usb/dwc2/hcd.c } else if (list_empty(&qh->qtd_list)) { qh 1986 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_unlink(hsotg, qh); qh 1989 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); qh 2000 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 2006 drivers/usb/dwc2/hcd.c qh = ep->hcpriv; qh 2007 drivers/usb/dwc2/hcd.c if (!qh) { qh 2012 drivers/usb/dwc2/hcd.c while (!list_empty(&qh->qtd_list) && retry--) { qh 2023 drivers/usb/dwc2/hcd.c qh = ep->hcpriv; qh 2024 drivers/usb/dwc2/hcd.c if (!qh) { qh 2030 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_unlink(hsotg, qh); qh 2033 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) qh 2034 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 2038 drivers/usb/dwc2/hcd.c if (qh->channel && qh->channel->qh == qh) qh 2039 drivers/usb/dwc2/hcd.c qh->channel->qh = NULL; qh 2043 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_free(hsotg, qh); qh 2058 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh = ep->hcpriv; qh 2060 drivers/usb/dwc2/hcd.c if (!qh) qh 2063 drivers/usb/dwc2/hcd.c qh->data_toggle = DWC2_HC_PID_DATA0; qh 2444 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh, qh 2451 drivers/usb/dwc2/hcd.c if (!qh->dw_align_buf) { qh 2452 drivers/usb/dwc2/hcd.c qh->dw_align_buf = kmem_cache_alloc(hsotg->unaligned_cache, qh 2454 drivers/usb/dwc2/hcd.c if (!qh->dw_align_buf) qh 2458 drivers/usb/dwc2/hcd.c qh->dw_align_buf_dma = dma_map_single(hsotg->dev, qh->dw_align_buf, qh 2462 drivers/usb/dwc2/hcd.c if (dma_mapping_error(hsotg->dev, qh->dw_align_buf_dma)) { qh 2468 drivers/usb/dwc2/hcd.c chan->align_buf = qh->dw_align_buf_dma; qh 2578 drivers/usb/dwc2/hcd.c static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 2584 drivers/usb/dwc2/hcd.c if (dbg_qh(qh)) qh 2585 drivers/usb/dwc2/hcd.c dev_vdbg(hsotg->dev, "%s(%p,%p)\n", __func__, hsotg, qh); qh 2587 drivers/usb/dwc2/hcd.c if (list_empty(&qh->qtd_list)) { qh 2603 drivers/usb/dwc2/hcd.c qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); qh 2605 drivers/usb/dwc2/hcd.c qh->channel = chan; qh 2614 drivers/usb/dwc2/hcd.c chan->speed = qh->dev_speed; qh 2615 drivers/usb/dwc2/hcd.c chan->max_packet = qh->maxp; qh 2635 drivers/usb/dwc2/hcd.c chan->do_ping = qh->ping_state; qh 2637 drivers/usb/dwc2/hcd.c chan->data_pid_start = qh->data_toggle; qh 2653 drivers/usb/dwc2/hcd.c if (qh->do_split) qh 2662 drivers/usb/dwc2/hcd.c if (hsotg->params.host_dma && qh->do_split && qh 2665 drivers/usb/dwc2/hcd.c if (dwc2_alloc_split_dma_aligned_buf(hsotg, qh, chan)) { qh 2674 drivers/usb/dwc2/hcd.c qh->channel = NULL; qh 2693 drivers/usb/dwc2/hcd.c chan->multi_count = qh->maxp_mult; qh 2696 drivers/usb/dwc2/hcd.c chan->desc_list_addr = qh->desc_list_dma; qh 2697 drivers/usb/dwc2/hcd.c chan->desc_list_sz = qh->desc_list_sz; qh 2701 drivers/usb/dwc2/hcd.c chan->qh = qh; qh 2720 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 2737 drivers/usb/dwc2/hcd.c qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); qh 2738 drivers/usb/dwc2/hcd.c if (dwc2_assign_and_init_hc(hsotg, qh)) qh 2746 drivers/usb/dwc2/hcd.c list_move_tail(&qh->qh_list_entry, qh 2765 drivers/usb/dwc2/hcd.c qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); qh 2772 drivers/usb/dwc2/hcd.c if (dwc2_assign_and_init_hc(hsotg, qh)) qh 2780 drivers/usb/dwc2/hcd.c list_move_tail(&qh->qh_list_entry, qh 2831 drivers/usb/dwc2/hcd.c dwc2_hcd_start_xfer_ddma(hsotg, chan->qh); qh 2832 drivers/usb/dwc2/hcd.c chan->qh->ping_state = 0; qh 2836 drivers/usb/dwc2/hcd.c chan->qh->ping_state = 0; qh 2881 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 2920 drivers/usb/dwc2/hcd.c qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); qh 2921 drivers/usb/dwc2/hcd.c if (!qh->channel) { qh 2927 drivers/usb/dwc2/hcd.c if (qh->tt_buffer_dirty) { qh 2938 drivers/usb/dwc2/hcd.c qh->channel->multi_count > 1) qh 2943 drivers/usb/dwc2/hcd.c status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); qh 2957 drivers/usb/dwc2/hcd.c qh->channel->requests == qh->channel->multi_count) { qh 2963 drivers/usb/dwc2/hcd.c list_move_tail(&qh->qh_list_entry, qh 3015 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 3058 drivers/usb/dwc2/hcd.c qh = list_entry(hsotg->non_periodic_qh_ptr, struct dwc2_qh, qh 3060 drivers/usb/dwc2/hcd.c if (!qh->channel) qh 3064 drivers/usb/dwc2/hcd.c if (qh->tt_buffer_dirty) qh 3069 drivers/usb/dwc2/hcd.c status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); qh 3883 drivers/usb/dwc2/hcd.c dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); qh 3900 drivers/usb/dwc2/hcd.c if (!(chan->xfer_started && chan->qh)) qh 3903 drivers/usb/dwc2/hcd.c list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) { qh 4563 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 4642 drivers/usb/dwc2/hcd.c qh = (struct dwc2_qh *)ep->hcpriv; qh 4644 drivers/usb/dwc2/hcd.c if (!qh) { qh 4645 drivers/usb/dwc2/hcd.c qh = dwc2_hcd_qh_create(hsotg, dwc2_urb, mem_flags); qh 4646 drivers/usb/dwc2/hcd.c if (!qh) { qh 4650 drivers/usb/dwc2/hcd.c ep->hcpriv = qh; qh 4665 drivers/usb/dwc2/hcd.c retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, qh, qtd); qh 4682 drivers/usb/dwc2/hcd.c if (qh_allocated && qh->channel && qh->channel->qh == qh) qh 4683 drivers/usb/dwc2/hcd.c qh->channel->qh = NULL; qh 4693 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_unlink(hsotg, qh); qh 4695 drivers/usb/dwc2/hcd.c list_for_each_entry_safe(qtd2, qtd2_tmp, &qh->qtd_list, qh 4697 drivers/usb/dwc2/hcd.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd2, qh); qh 4698 drivers/usb/dwc2/hcd.c dwc2_hcd_qh_free(hsotg, qh); qh 4828 drivers/usb/dwc2/hcd.c struct dwc2_qh *qh; qh 4831 drivers/usb/dwc2/hcd.c qh = ep->hcpriv; qh 4832 drivers/usb/dwc2/hcd.c if (!qh) qh 4836 drivers/usb/dwc2/hcd.c qh->tt_buffer_dirty = 0; qh 162 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh; qh 447 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh; qh 568 drivers/usb/dwc2/hcd.h void dwc2_hcd_qh_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh); qh 569 drivers/usb/dwc2/hcd.h int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh); qh 570 drivers/usb/dwc2/hcd.h void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh); qh 571 drivers/usb/dwc2/hcd.h void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 576 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh); qh 581 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh) qh 589 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh); qh 594 drivers/usb/dwc2/hcd.h int dwc2_hcd_qh_init_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 596 drivers/usb/dwc2/hcd.h void dwc2_hcd_qh_free_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh); qh 605 drivers/usb/dwc2/hcd.h static inline bool dbg_qh(struct dwc2_qh *qh) { return true; } qh 615 drivers/usb/dwc2/hcd.h static inline bool dbg_qh(struct dwc2_qh *qh) qh 617 drivers/usb/dwc2/hcd.h return qh->ep_type == USB_ENDPOINT_XFER_BULK || qh 618 drivers/usb/dwc2/hcd.h qh->ep_type == USB_ENDPOINT_XFER_CONTROL; qh 737 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh = ep->hcpriv; qh 739 drivers/usb/dwc2/hcd.h if (qh && !list_empty(&qh->qh_list_entry)) qh 748 drivers/usb/dwc2/hcd.h struct dwc2_qh *qh = ep->hcpriv; qh 750 drivers/usb/dwc2/hcd.h if (!qh) { qh 755 drivers/usb/dwc2/hcd.h return qh->host_us; qh 75 drivers/usb/dwc2/hcd_ddma.c static u16 dwc2_max_desc_num(struct dwc2_qh *qh) qh 77 drivers/usb/dwc2/hcd_ddma.c return (qh->ep_type == USB_ENDPOINT_XFER_ISOC && qh 78 drivers/usb/dwc2/hcd_ddma.c qh->dev_speed == USB_SPEED_HIGH) ? qh 82 drivers/usb/dwc2/hcd_ddma.c static u16 dwc2_frame_incr_val(struct dwc2_qh *qh) qh 84 drivers/usb/dwc2/hcd_ddma.c return qh->dev_speed == USB_SPEED_HIGH ? qh 85 drivers/usb/dwc2/hcd_ddma.c (qh->host_interval + 8 - 1) / 8 : qh->host_interval; qh 88 drivers/usb/dwc2/hcd_ddma.c static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 93 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_ISOC && qh 94 drivers/usb/dwc2/hcd_ddma.c qh->dev_speed == USB_SPEED_HIGH) qh 99 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_sz = sizeof(struct dwc2_dma_desc) * qh 100 drivers/usb/dwc2/hcd_ddma.c dwc2_max_desc_num(qh); qh 102 drivers/usb/dwc2/hcd_ddma.c qh->desc_list = kmem_cache_zalloc(desc_cache, flags | GFP_DMA); qh 103 drivers/usb/dwc2/hcd_ddma.c if (!qh->desc_list) qh 106 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma = dma_map_single(hsotg->dev, qh->desc_list, qh 107 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_sz, qh 110 drivers/usb/dwc2/hcd_ddma.c qh->n_bytes = kcalloc(dwc2_max_desc_num(qh), sizeof(u32), flags); qh 111 drivers/usb/dwc2/hcd_ddma.c if (!qh->n_bytes) { qh 112 drivers/usb/dwc2/hcd_ddma.c dma_unmap_single(hsotg->dev, qh->desc_list_dma, qh 113 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_sz, qh 115 drivers/usb/dwc2/hcd_ddma.c kmem_cache_free(desc_cache, qh->desc_list); qh 116 drivers/usb/dwc2/hcd_ddma.c qh->desc_list = NULL; qh 123 drivers/usb/dwc2/hcd_ddma.c static void dwc2_desc_list_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 127 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_ISOC && qh 128 drivers/usb/dwc2/hcd_ddma.c qh->dev_speed == USB_SPEED_HIGH) qh 133 drivers/usb/dwc2/hcd_ddma.c if (qh->desc_list) { qh 134 drivers/usb/dwc2/hcd_ddma.c dma_unmap_single(hsotg->dev, qh->desc_list_dma, qh 135 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_sz, DMA_FROM_DEVICE); qh 136 drivers/usb/dwc2/hcd_ddma.c kmem_cache_free(desc_cache, qh->desc_list); qh 137 drivers/usb/dwc2/hcd_ddma.c qh->desc_list = NULL; qh 140 drivers/usb/dwc2/hcd_ddma.c kfree(qh->n_bytes); qh 141 drivers/usb/dwc2/hcd_ddma.c qh->n_bytes = NULL; qh 230 drivers/usb/dwc2/hcd_ddma.c static void dwc2_update_frame_list(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 241 drivers/usb/dwc2/hcd_ddma.c if (!qh->channel) { qh 242 drivers/usb/dwc2/hcd_ddma.c dev_err(hsotg->dev, "qh->channel = %p\n", qh->channel); qh 252 drivers/usb/dwc2/hcd_ddma.c chan = qh->channel; qh 253 drivers/usb/dwc2/hcd_ddma.c inc = dwc2_frame_incr_val(qh); qh 254 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_ISOC) qh 255 drivers/usb/dwc2/hcd_ddma.c i = dwc2_frame_list_idx(qh->next_active_frame); qh 281 drivers/usb/dwc2/hcd_ddma.c if (chan->speed == USB_SPEED_HIGH && qh->host_interval) { qh 284 drivers/usb/dwc2/hcd_ddma.c inc = (8 + qh->host_interval - 1) / qh->host_interval; qh 287 drivers/usb/dwc2/hcd_ddma.c j = j << qh->host_interval; qh 295 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh) qh 297 drivers/usb/dwc2/hcd_ddma.c struct dwc2_host_chan *chan = qh->channel; qh 299 drivers/usb/dwc2/hcd_ddma.c if (dwc2_qh_is_non_per(qh)) { qh 305 drivers/usb/dwc2/hcd_ddma.c dwc2_update_frame_list(hsotg, qh, 0); qh 313 drivers/usb/dwc2/hcd_ddma.c if (chan->qh) { qh 318 drivers/usb/dwc2/hcd_ddma.c chan->qh = NULL; qh 321 drivers/usb/dwc2/hcd_ddma.c qh->channel = NULL; qh 322 drivers/usb/dwc2/hcd_ddma.c qh->ntd = 0; qh 324 drivers/usb/dwc2/hcd_ddma.c if (qh->desc_list) qh 325 drivers/usb/dwc2/hcd_ddma.c memset(qh->desc_list, 0, sizeof(struct dwc2_dma_desc) * qh 326 drivers/usb/dwc2/hcd_ddma.c dwc2_max_desc_num(qh)); qh 342 drivers/usb/dwc2/hcd_ddma.c int dwc2_hcd_qh_init_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 347 drivers/usb/dwc2/hcd_ddma.c if (qh->do_split) { qh 354 drivers/usb/dwc2/hcd_ddma.c retval = dwc2_desc_list_alloc(hsotg, qh, mem_flags); qh 358 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_ISOC || qh 359 drivers/usb/dwc2/hcd_ddma.c qh->ep_type == USB_ENDPOINT_XFER_INT) { qh 369 drivers/usb/dwc2/hcd_ddma.c qh->ntd = 0; qh 373 drivers/usb/dwc2/hcd_ddma.c dwc2_desc_list_free(hsotg, qh); qh 388 drivers/usb/dwc2/hcd_ddma.c void dwc2_hcd_qh_free_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 392 drivers/usb/dwc2/hcd_ddma.c dwc2_desc_list_free(hsotg, qh); qh 402 drivers/usb/dwc2/hcd_ddma.c if (qh->channel) qh 403 drivers/usb/dwc2/hcd_ddma.c dwc2_release_channel_ddma(hsotg, qh); qh 406 drivers/usb/dwc2/hcd_ddma.c if ((qh->ep_type == USB_ENDPOINT_XFER_ISOC || qh 407 drivers/usb/dwc2/hcd_ddma.c qh->ep_type == USB_ENDPOINT_XFER_INT) && qh 415 drivers/usb/dwc2/hcd_ddma.c static u8 dwc2_frame_to_desc_idx(struct dwc2_qh *qh, u16 frame_idx) qh 417 drivers/usb/dwc2/hcd_ddma.c if (qh->dev_speed == USB_SPEED_HIGH) qh 429 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh, u16 *skip_frames) qh 454 drivers/usb/dwc2/hcd_ddma.c if (qh->dev_speed == USB_SPEED_HIGH) { qh 491 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh) qh 513 drivers/usb/dwc2/hcd_ddma.c if (qh->channel) { qh 514 drivers/usb/dwc2/hcd_ddma.c frame = dwc2_calc_starting_frame(hsotg, qh, &skip_frames); qh 521 drivers/usb/dwc2/hcd_ddma.c dwc2_frame_list_idx(qh->next_active_frame) - qh 522 drivers/usb/dwc2/hcd_ddma.c fr_idx_tmp) % dwc2_frame_incr_val(qh); qh 525 drivers/usb/dwc2/hcd_ddma.c qh->next_active_frame = dwc2_calc_starting_frame(hsotg, qh, qh 527 drivers/usb/dwc2/hcd_ddma.c fr_idx = dwc2_frame_list_idx(qh->next_active_frame); qh 530 drivers/usb/dwc2/hcd_ddma.c qh->td_first = qh->td_last = dwc2_frame_to_desc_idx(qh, fr_idx); qh 543 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh, u32 max_xfer_size, qh 546 drivers/usb/dwc2/hcd_ddma.c struct dwc2_dma_desc *dma_desc = &qh->desc_list[idx]; qh 553 drivers/usb/dwc2/hcd_ddma.c qh->n_bytes[idx] = max_xfer_size; qh 555 drivers/usb/dwc2/hcd_ddma.c qh->n_bytes[idx] = frame_desc->length; qh 558 drivers/usb/dwc2/hcd_ddma.c dma_desc->status = qh->n_bytes[idx] << HOST_DMA_ISOC_NBYTES_SHIFT & qh 564 drivers/usb/dwc2/hcd_ddma.c qh->ntd++; qh 574 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + qh 581 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh, u16 skip_frames) qh 589 drivers/usb/dwc2/hcd_ddma.c idx = qh->td_last; qh 590 drivers/usb/dwc2/hcd_ddma.c inc = qh->host_interval; qh 593 drivers/usb/dwc2/hcd_ddma.c next_idx = dwc2_desclist_idx_inc(qh->td_last, inc, qh->dev_speed); qh 606 drivers/usb/dwc2/hcd_ddma.c qh->td_last = dwc2_desclist_idx_inc(cur_idx, inc, qh 607 drivers/usb/dwc2/hcd_ddma.c qh->dev_speed); qh 608 drivers/usb/dwc2/hcd_ddma.c idx = qh->td_last; qh 612 drivers/usb/dwc2/hcd_ddma.c if (qh->host_interval) { qh 613 drivers/usb/dwc2/hcd_ddma.c ntd_max = (dwc2_max_desc_num(qh) + qh->host_interval - 1) / qh 614 drivers/usb/dwc2/hcd_ddma.c qh->host_interval; qh 615 drivers/usb/dwc2/hcd_ddma.c if (skip_frames && !qh->channel) qh 616 drivers/usb/dwc2/hcd_ddma.c ntd_max -= skip_frames / qh->host_interval; qh 619 drivers/usb/dwc2/hcd_ddma.c max_xfer_size = qh->dev_speed == USB_SPEED_HIGH ? qh 622 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { qh 629 drivers/usb/dwc2/hcd_ddma.c while (qh->ntd < ntd_max && qtd->isoc_frame_index_last < qh 631 drivers/usb/dwc2/hcd_ddma.c dwc2_fill_host_isoc_dma_desc(hsotg, qtd, qh, qh 633 drivers/usb/dwc2/hcd_ddma.c idx = dwc2_desclist_idx_inc(idx, inc, qh->dev_speed); qh 640 drivers/usb/dwc2/hcd_ddma.c qh->td_last = idx; qh 644 drivers/usb/dwc2/hcd_ddma.c if (qh->ntd == ntd_max) { qh 645 drivers/usb/dwc2/hcd_ddma.c idx = dwc2_desclist_idx_dec(qh->td_last, inc, qh->dev_speed); qh 646 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[idx].status |= HOST_DMA_IOC; qh 648 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + (idx * qh 670 drivers/usb/dwc2/hcd_ddma.c idx = dwc2_desclist_idx_dec(idx, inc * ((qh->ntd + 1) / 2), qh 671 drivers/usb/dwc2/hcd_ddma.c qh->dev_speed); qh 678 drivers/usb/dwc2/hcd_ddma.c idx = dwc2_desclist_idx_dec(qh->td_last, inc, qh->dev_speed); qh 680 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[idx].status |= HOST_DMA_IOC; qh 682 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + qh 691 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qtd *qtd, struct dwc2_qh *qh, qh 694 drivers/usb/dwc2/hcd_ddma.c struct dwc2_dma_desc *dma_desc = &qh->desc_list[n_desc]; qh 715 drivers/usb/dwc2/hcd_ddma.c qh->n_bytes[n_desc] = len; qh 717 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_CONTROL && qh 724 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + qh 742 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh) qh 745 drivers/usb/dwc2/hcd_ddma.c struct dwc2_host_chan *chan = qh->channel; qh 748 drivers/usb/dwc2/hcd_ddma.c dev_vdbg(hsotg->dev, "%s(): qh=%p dma=%08lx len=%d\n", __func__, qh, qh 758 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { qh 774 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[n_desc - 1].status |= HOST_DMA_A; qh 778 drivers/usb/dwc2/hcd_ddma.c &qh->desc_list[n_desc - 1]); qh 780 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + qh 786 drivers/usb/dwc2/hcd_ddma.c dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc); qh 789 drivers/usb/dwc2/hcd_ddma.c n_desc, &qh->desc_list[n_desc], qh 790 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[n_desc].buf, qh 791 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[n_desc].status); qh 799 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_CONTROL) qh 806 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[n_desc - 1].status |= qh 809 drivers/usb/dwc2/hcd_ddma.c n_desc - 1, &qh->desc_list[n_desc - 1]); qh 811 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + (n_desc - 1) * qh 816 drivers/usb/dwc2/hcd_ddma.c qh->desc_list[0].status |= HOST_DMA_A; qh 818 drivers/usb/dwc2/hcd_ddma.c &qh->desc_list[0]); qh 820 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma, qh 847 drivers/usb/dwc2/hcd_ddma.c void dwc2_hcd_start_xfer_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 850 drivers/usb/dwc2/hcd_ddma.c struct dwc2_host_chan *chan = qh->channel; qh 856 drivers/usb/dwc2/hcd_ddma.c dwc2_init_non_isoc_dma_desc(hsotg, qh); qh 860 drivers/usb/dwc2/hcd_ddma.c dwc2_init_non_isoc_dma_desc(hsotg, qh); qh 861 drivers/usb/dwc2/hcd_ddma.c dwc2_update_frame_list(hsotg, qh, 1); qh 865 drivers/usb/dwc2/hcd_ddma.c if (!qh->ntd) qh 866 drivers/usb/dwc2/hcd_ddma.c skip_frames = dwc2_recalc_initial_desc_idx(hsotg, qh); qh 867 drivers/usb/dwc2/hcd_ddma.c dwc2_init_isoc_dma_desc(hsotg, qh, skip_frames); qh 870 drivers/usb/dwc2/hcd_ddma.c dwc2_update_frame_list(hsotg, qh, 1); qh 877 drivers/usb/dwc2/hcd_ddma.c chan->ntd = dwc2_max_desc_num(qh); qh 895 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh, u16 idx) qh 905 drivers/usb/dwc2/hcd_ddma.c dma_sync_single_for_cpu(hsotg->dev, qh->desc_list_dma + (idx * qh 910 drivers/usb/dwc2/hcd_ddma.c dma_desc = &qh->desc_list[idx]; qh 925 drivers/usb/dwc2/hcd_ddma.c frame_desc->actual_length = qh->n_bytes[idx] - remain; qh 929 drivers/usb/dwc2/hcd_ddma.c frame_desc->actual_length = qh->n_bytes[idx] - remain; qh 939 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 952 drivers/usb/dwc2/hcd_ddma.c qh->ntd--; qh 967 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh; qh 971 drivers/usb/dwc2/hcd_ddma.c qh = chan->qh; qh 972 drivers/usb/dwc2/hcd_ddma.c idx = qh->td_first; qh 975 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) qh 994 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qh 1006 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 1012 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) { qh 1032 drivers/usb/dwc2/hcd_ddma.c rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh, qh 1036 drivers/usb/dwc2/hcd_ddma.c idx = dwc2_desclist_idx_inc(idx, qh->host_interval, qh 1046 drivers/usb/dwc2/hcd_ddma.c if (qh->host_interval >= 32) qh 1049 drivers/usb/dwc2/hcd_ddma.c qh->td_first = idx; qh 1051 drivers/usb/dwc2/hcd_ddma.c qtd_next = list_first_entry(&qh->qtd_list, qh 1060 drivers/usb/dwc2/hcd_ddma.c } while (idx != qh->td_first); qh 1064 drivers/usb/dwc2/hcd_ddma.c qh->td_first = idx; qh 1156 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh = chan->qh; qh 1168 drivers/usb/dwc2/hcd_ddma.c qh->desc_list_dma + (desc_num * qh 1173 drivers/usb/dwc2/hcd_ddma.c dma_desc = &qh->desc_list[desc_num]; qh 1174 drivers/usb/dwc2/hcd_ddma.c n_bytes = qh->n_bytes[desc_num]; qh 1183 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 1189 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type == USB_ENDPOINT_XFER_CONTROL) { qh 1227 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh = chan->qh; qh 1233 drivers/usb/dwc2/hcd_ddma.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) qh 1238 drivers/usb/dwc2/hcd_ddma.c list_for_each_safe(qtd_item, qtd_tmp, &qh->qtd_list) { qh 1259 drivers/usb/dwc2/hcd_ddma.c if (qh->ep_type != USB_ENDPOINT_XFER_CONTROL) { qh 1265 drivers/usb/dwc2/hcd_ddma.c qh->data_toggle = DWC2_HC_PID_DATA0; qh 1277 drivers/usb/dwc2/hcd_ddma.c qh->ping_state = 1; qh 1303 drivers/usb/dwc2/hcd_ddma.c struct dwc2_qh *qh = chan->qh; qh 1312 drivers/usb/dwc2/hcd_ddma.c list_empty(&qh->qtd_list)) { qh 1320 drivers/usb/dwc2/hcd_ddma.c &qh->qtd_list, qh 1325 drivers/usb/dwc2/hcd_ddma.c qtd, qh); qh 1331 drivers/usb/dwc2/hcd_ddma.c dwc2_release_channel_ddma(hsotg, qh); qh 1332 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qh_unlink(hsotg, qh); qh 1335 drivers/usb/dwc2/hcd_ddma.c list_move_tail(&qh->qh_list_entry, qh 1355 drivers/usb/dwc2/hcd_ddma.c dwc2_release_channel_ddma(hsotg, qh); qh 1356 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qh_unlink(hsotg, qh); qh 1358 drivers/usb/dwc2/hcd_ddma.c if (!list_empty(&qh->qtd_list)) { qh 1363 drivers/usb/dwc2/hcd_ddma.c dwc2_hcd_qh_add(hsotg, qh); qh 104 drivers/usb/dwc2/hcd_intr.c if (!chan->qh) qh 107 drivers/usb/dwc2/hcd_intr.c if (chan->qh->dev_speed == USB_SPEED_HIGH) qh 127 drivers/usb/dwc2/hcd_intr.c chan->qh->tt_buffer_dirty = 1; qh 130 drivers/usb/dwc2/hcd_intr.c chan->qh->tt_buffer_dirty = 0; qh 143 drivers/usb/dwc2/hcd_intr.c struct dwc2_qh *qh; qh 160 drivers/usb/dwc2/hcd_intr.c qh = list_entry(qh_entry, struct dwc2_qh, qh_list_entry); qh 162 drivers/usb/dwc2/hcd_intr.c if (dwc2_frame_num_le(qh->next_active_frame, qh 165 drivers/usb/dwc2/hcd_intr.c qh, hsotg->frame_number, qh 166 drivers/usb/dwc2/hcd_intr.c qh->next_active_frame); qh 172 drivers/usb/dwc2/hcd_intr.c list_move_tail(&qh->qh_list_entry, qh 453 drivers/usb/dwc2/hcd_intr.c } else if (chan->qh->do_split) { qh 548 drivers/usb/dwc2/hcd_intr.c if (WARN(!chan || !chan->qh, qh 553 drivers/usb/dwc2/hcd_intr.c chan->qh->data_toggle = DWC2_HC_PID_DATA0; qh 555 drivers/usb/dwc2/hcd_intr.c chan->qh->data_toggle = DWC2_HC_PID_DATA1; qh 623 drivers/usb/dwc2/hcd_intr.c if (chan->qh->do_split && qh 658 drivers/usb/dwc2/hcd_intr.c static void dwc2_deactivate_qh(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 664 drivers/usb/dwc2/hcd_intr.c if (dbg_qh(qh)) qh 666 drivers/usb/dwc2/hcd_intr.c hsotg, qh, free_qtd); qh 668 drivers/usb/dwc2/hcd_intr.c if (list_empty(&qh->qtd_list)) { qh 673 drivers/usb/dwc2/hcd_intr.c qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); qh 682 drivers/usb/dwc2/hcd_intr.c dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); qh 687 drivers/usb/dwc2/hcd_intr.c qh->channel = NULL; qh 688 drivers/usb/dwc2/hcd_intr.c dwc2_hcd_qh_deactivate(hsotg, qh, continue_split); qh 751 drivers/usb/dwc2/hcd_intr.c dwc2_deactivate_qh(hsotg, chan->qh, free_qtd); qh 843 drivers/usb/dwc2/hcd_intr.c list_move_tail(&chan->qh->qh_list_entry, qh 879 drivers/usb/dwc2/hcd_intr.c chan->qh->ping_state = 1; qh 954 drivers/usb/dwc2/hcd_intr.c dma_unmap_single(hsotg->dev, chan->qh->dw_align_buf_dma, qh 957 drivers/usb/dwc2/hcd_intr.c chan->qh->dw_align_buf, len); qh 1016 drivers/usb/dwc2/hcd_intr.c if (chan->qh->do_split) { qh 1155 drivers/usb/dwc2/hcd_intr.c chan->qh->data_toggle = 0; qh 1250 drivers/usb/dwc2/hcd_intr.c qtd->qh->want_wait = qtd->num_naks >= DWC2_NAKS_BEFORE_DELAY && qh 1278 drivers/usb/dwc2/hcd_intr.c if (!chan->qh->ping_state) { qh 1284 drivers/usb/dwc2/hcd_intr.c chan->qh->ping_state = 1; qh 1365 drivers/usb/dwc2/hcd_intr.c if (chan->qh->ping_state) { qh 1366 drivers/usb/dwc2/hcd_intr.c chan->qh->ping_state = 0; qh 1424 drivers/usb/dwc2/hcd_intr.c struct dwc2_qh *qh = chan->qh; qh 1432 drivers/usb/dwc2/hcd_intr.c dwc2_full_frame_num(qh->next_active_frame); qh 1459 drivers/usb/dwc2/hcd_intr.c qh->start_active_frame, qh 1460 drivers/usb/dwc2/hcd_intr.c qh->num_hs_transfers); qh 1462 drivers/usb/dwc2/hcd_intr.c if (qh->ep_type != USB_ENDPOINT_XFER_ISOC || qh 1463 drivers/usb/dwc2/hcd_intr.c qh->ep_is_in) qh 1468 drivers/usb/dwc2/hcd_intr.c end_frnum, qh->next_active_frame); qh 1495 drivers/usb/dwc2/hcd_intr.c chan->qh->ping_state = 1; qh 1673 drivers/usb/dwc2/hcd_intr.c if (!chan->qh->ping_state) { qh 1678 drivers/usb/dwc2/hcd_intr.c chan->qh->ping_state = 1; qh 2019 drivers/usb/dwc2/hcd_intr.c static bool dwc2_check_qtd_still_ok(struct dwc2_qtd *qtd, struct dwc2_qh *qh) qh 2023 drivers/usb/dwc2/hcd_intr.c if (!qh) qh 2026 drivers/usb/dwc2/hcd_intr.c cur_head = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qh 2062 drivers/usb/dwc2/hcd_intr.c if (!chan->qh) { qh 2090 drivers/usb/dwc2/hcd_intr.c if (list_empty(&chan->qh->qtd_list)) { qh 2106 drivers/usb/dwc2/hcd_intr.c qtd = list_first_entry(&chan->qh->qtd_list, struct dwc2_qtd, qh 2126 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2131 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2136 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2141 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2146 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2151 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2156 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2161 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2166 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 2171 drivers/usb/dwc2/hcd_intr.c if (!dwc2_check_qtd_still_ok(qtd, chan->qh)) qh 110 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 117 drivers/usb/dwc2/hcd_queue.c if (qh->dev_speed == USB_SPEED_HIGH || qh->do_split) { qh 122 drivers/usb/dwc2/hcd_queue.c max_claimed_usecs = 100 - qh->host_us; qh 128 drivers/usb/dwc2/hcd_queue.c max_claimed_usecs = 900 - qh->host_us; qh 134 drivers/usb/dwc2/hcd_queue.c __func__, hsotg->periodic_usecs, qh->host_us); qh 375 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 380 drivers/usb/dwc2/hcd_queue.c if (WARN_ON(!qh->dwc_tt)) qh 384 drivers/usb/dwc2/hcd_queue.c map = qh->dwc_tt->periodic_bitmaps; qh 385 drivers/usb/dwc2/hcd_queue.c if (qh->dwc_tt->usb_tt->multi) qh 386 drivers/usb/dwc2/hcd_queue.c map += DWC2_ELEMENTS_PER_LS_BITMAP * (qh->ttport - 1); qh 493 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh; qh 506 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(print_data->hsotg, "QH=%p ...%s\n", print_data->qh, str); qh 516 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 518 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh_print_data print_data = { hsotg, qh }; qh 527 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) { qh 528 drivers/usb/dwc2/hcd_queue.c unsigned long *map = dwc2_get_ls_map(hsotg, qh); qh 531 drivers/usb/dwc2/hcd_queue.c qh, qh->device_us, qh 532 drivers/usb/dwc2/hcd_queue.c DWC2_ROUND_US_TO_SLICE(qh->device_us), qh 533 drivers/usb/dwc2/hcd_queue.c DWC2_US_PER_SLICE * qh->ls_start_schedule_slice); qh 538 drivers/usb/dwc2/hcd_queue.c qh, map); qh 545 drivers/usb/dwc2/hcd_queue.c for (i = 0; i < qh->num_hs_transfers; i++) { qh 546 drivers/usb/dwc2/hcd_queue.c struct dwc2_hs_transfer_time *trans_time = qh->hs_transfers + i; qh 554 drivers/usb/dwc2/hcd_queue.c qh, i, trans_time->duration_us, uframe, rel_us); qh 556 drivers/usb/dwc2/hcd_queue.c if (qh->num_hs_transfers) { qh 557 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(hsotg, "QH=%p Whole high speed map now:\n", qh); qh 566 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) {}; qh 584 drivers/usb/dwc2/hcd_queue.c static int dwc2_ls_pmap_schedule(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 587 drivers/usb/dwc2/hcd_queue.c int slices = DIV_ROUND_UP(qh->device_us, DWC2_US_PER_SLICE); qh 588 drivers/usb/dwc2/hcd_queue.c unsigned long *map = dwc2_get_ls_map(hsotg, qh); qh 608 drivers/usb/dwc2/hcd_queue.c qh->device_interval, search_slice, false); qh 613 drivers/usb/dwc2/hcd_queue.c qh->ls_start_schedule_slice = slice; qh 624 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 626 drivers/usb/dwc2/hcd_queue.c int slices = DIV_ROUND_UP(qh->device_us, DWC2_US_PER_SLICE); qh 627 drivers/usb/dwc2/hcd_queue.c unsigned long *map = dwc2_get_ls_map(hsotg, qh); qh 634 drivers/usb/dwc2/hcd_queue.c DWC2_LS_SCHEDULE_FRAMES, slices, qh->device_interval, qh 635 drivers/usb/dwc2/hcd_queue.c qh->ls_start_schedule_slice); qh 658 drivers/usb/dwc2/hcd_queue.c static int dwc2_hs_pmap_schedule(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 661 drivers/usb/dwc2/hcd_queue.c struct dwc2_hs_transfer_time *trans_time = qh->hs_transfers + index; qh 667 drivers/usb/dwc2/hcd_queue.c qh->host_interval, trans_time->start_schedule_us, qh 685 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh, int index) qh 687 drivers/usb/dwc2/hcd_queue.c struct dwc2_hs_transfer_time *trans_time = qh->hs_transfers + index; qh 692 drivers/usb/dwc2/hcd_queue.c qh->host_interval, trans_time->start_schedule_us); qh 709 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 711 drivers/usb/dwc2/hcd_queue.c int bytecount = qh->maxp_mult * qh->maxp; qh 720 drivers/usb/dwc2/hcd_queue.c host_interval_in_sched = gcd(qh->host_interval, qh 748 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) { qh 749 drivers/usb/dwc2/hcd_queue.c err = dwc2_ls_pmap_schedule(hsotg, qh, ls_search_slice); qh 768 drivers/usb/dwc2/hcd_queue.c start_s_uframe = qh->ls_start_schedule_slice / qh 783 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) qh 784 drivers/usb/dwc2/hcd_queue.c dwc2_ls_pmap_unschedule(hsotg, qh); qh 786 drivers/usb/dwc2/hcd_queue.c (qh->ls_start_schedule_slice / qh 826 drivers/usb/dwc2/hcd_queue.c if (qh->ep_type == USB_ENDPOINT_XFER_ISOC && !qh->ep_is_in) qh 833 drivers/usb/dwc2/hcd_queue.c DIV_ROUND_UP(188 * (qh->ls_start_schedule_slice % qh 855 drivers/usb/dwc2/hcd_queue.c if (!qh->ep_is_in && qh 859 drivers/usb/dwc2/hcd_queue.c qh, first_data_bytes, bytecount); qh 860 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) qh 861 drivers/usb/dwc2/hcd_queue.c dwc2_ls_pmap_unschedule(hsotg, qh); qh 868 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers = 1 + DIV_ROUND_UP(other_data_bytes, 188); qh 875 drivers/usb/dwc2/hcd_queue.c if (qh->ep_type == USB_ENDPOINT_XFER_INT) { qh 877 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers += 2; qh 879 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers += 3; qh 881 drivers/usb/dwc2/hcd_queue.c if (qh->ep_is_in) { qh 900 drivers/usb/dwc2/hcd_queue.c if (qh->ep_is_in) { qh 904 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers++; qh 907 drivers/usb/dwc2/hcd_queue.c last = rel_uframe + qh->num_hs_transfers + 1; qh 911 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers += 2; qh 913 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers += 1; qh 917 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers--; qh 933 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[0].duration_us = HS_USECS_ISO(first_count); qh 934 drivers/usb/dwc2/hcd_queue.c for (i = 1; i < qh->num_hs_transfers - 1; i++) qh 935 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[i].duration_us = qh 937 drivers/usb/dwc2/hcd_queue.c if (qh->num_hs_transfers > 1) qh 938 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[qh->num_hs_transfers - 1].duration_us = qh 946 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[0].start_schedule_us = qh 948 drivers/usb/dwc2/hcd_queue.c for (i = 1; i < qh->num_hs_transfers; i++) qh 949 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[i].start_schedule_us = qh 955 drivers/usb/dwc2/hcd_queue.c for (i = 0; i < qh->num_hs_transfers; i++) { qh 956 drivers/usb/dwc2/hcd_queue.c err = dwc2_hs_pmap_schedule(hsotg, qh, true, i); qh 962 drivers/usb/dwc2/hcd_queue.c if (i == qh->num_hs_transfers) qh 966 drivers/usb/dwc2/hcd_queue.c dwc2_hs_pmap_unschedule(hsotg, qh, i); qh 968 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) qh 969 drivers/usb/dwc2/hcd_queue.c dwc2_ls_pmap_unschedule(hsotg, qh); qh 990 drivers/usb/dwc2/hcd_queue.c static int dwc2_uframe_schedule_hs(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 993 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->host_us != qh->device_us); qh 994 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->host_interval != qh->device_interval); qh 995 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->num_hs_transfers != 1); qh 998 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[0].start_schedule_us = 0; qh 999 drivers/usb/dwc2/hcd_queue.c qh->hs_transfers[0].duration_us = qh->host_us; qh 1001 drivers/usb/dwc2/hcd_queue.c return dwc2_hs_pmap_schedule(hsotg, qh, false, 0); qh 1013 drivers/usb/dwc2/hcd_queue.c static int dwc2_uframe_schedule_ls(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1016 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->host_us != qh->device_us); qh 1017 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->host_interval != qh->device_interval); qh 1018 drivers/usb/dwc2/hcd_queue.c WARN_ON(!qh->schedule_low_speed); qh 1021 drivers/usb/dwc2/hcd_queue.c return dwc2_ls_pmap_schedule(hsotg, qh, 0); qh 1033 drivers/usb/dwc2/hcd_queue.c static int dwc2_uframe_schedule(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1037 drivers/usb/dwc2/hcd_queue.c if (qh->dev_speed == USB_SPEED_HIGH) qh 1038 drivers/usb/dwc2/hcd_queue.c ret = dwc2_uframe_schedule_hs(hsotg, qh); qh 1039 drivers/usb/dwc2/hcd_queue.c else if (!qh->do_split) qh 1040 drivers/usb/dwc2/hcd_queue.c ret = dwc2_uframe_schedule_ls(hsotg, qh); qh 1042 drivers/usb/dwc2/hcd_queue.c ret = dwc2_uframe_schedule_split(hsotg, qh); qh 1045 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(hsotg, "QH=%p Failed to schedule %d\n", qh, ret); qh 1047 drivers/usb/dwc2/hcd_queue.c dwc2_qh_schedule_print(hsotg, qh); qh 1058 drivers/usb/dwc2/hcd_queue.c static void dwc2_uframe_unschedule(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1062 drivers/usb/dwc2/hcd_queue.c for (i = 0; i < qh->num_hs_transfers; i++) qh 1063 drivers/usb/dwc2/hcd_queue.c dwc2_hs_pmap_unschedule(hsotg, qh, i); qh 1065 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) qh 1066 drivers/usb/dwc2/hcd_queue.c dwc2_ls_pmap_unschedule(hsotg, qh); qh 1068 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(hsotg, "QH=%p Unscheduled\n", qh); qh 1086 drivers/usb/dwc2/hcd_queue.c static void dwc2_pick_first_frame(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1113 drivers/usb/dwc2/hcd_queue.c if (qh->do_split) qh 1119 drivers/usb/dwc2/hcd_queue.c if (qh->dev_speed == USB_SPEED_HIGH || qh->do_split) { qh 1126 drivers/usb/dwc2/hcd_queue.c WARN_ON(qh->num_hs_transfers < 1); qh 1128 drivers/usb/dwc2/hcd_queue.c relative_frame = qh->hs_transfers[0].start_schedule_us / qh 1132 drivers/usb/dwc2/hcd_queue.c interval = gcd(qh->host_interval, DWC2_HS_SCHEDULE_UFRAMES); qh 1142 drivers/usb/dwc2/hcd_queue.c relative_frame = qh->ls_start_schedule_slice / qh 1144 drivers/usb/dwc2/hcd_queue.c interval = gcd(qh->host_interval, DWC2_LS_SCHEDULE_FRAMES); qh 1183 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame = next_active_frame; qh 1184 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame = next_active_frame; qh 1187 drivers/usb/dwc2/hcd_queue.c qh, frame_number, qh->next_active_frame); qh 1201 drivers/usb/dwc2/hcd_queue.c static int dwc2_do_reserve(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1206 drivers/usb/dwc2/hcd_queue.c status = dwc2_uframe_schedule(hsotg, qh); qh 1216 drivers/usb/dwc2/hcd_queue.c status = dwc2_check_periodic_bandwidth(hsotg, qh); qh 1231 drivers/usb/dwc2/hcd_queue.c hsotg->periodic_usecs += qh->host_us; qh 1233 drivers/usb/dwc2/hcd_queue.c dwc2_pick_first_frame(hsotg, qh); qh 1247 drivers/usb/dwc2/hcd_queue.c static void dwc2_do_unreserve(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1251 drivers/usb/dwc2/hcd_queue.c WARN_ON(!qh->unreserve_pending); qh 1254 drivers/usb/dwc2/hcd_queue.c qh->unreserve_pending = false; qh 1256 drivers/usb/dwc2/hcd_queue.c if (WARN_ON(!list_empty(&qh->qh_list_entry))) qh 1257 drivers/usb/dwc2/hcd_queue.c list_del_init(&qh->qh_list_entry); qh 1260 drivers/usb/dwc2/hcd_queue.c hsotg->periodic_usecs -= qh->host_us; qh 1263 drivers/usb/dwc2/hcd_queue.c dwc2_uframe_unschedule(hsotg, qh); qh 1284 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh = from_timer(qh, t, unreserve_timer); qh 1285 drivers/usb/dwc2/hcd_queue.c struct dwc2_hsotg *hsotg = qh->hsotg; qh 1298 drivers/usb/dwc2/hcd_queue.c if (timer_pending(&qh->unreserve_timer)) qh 1312 drivers/usb/dwc2/hcd_queue.c if (qh->unreserve_pending) qh 1313 drivers/usb/dwc2/hcd_queue.c dwc2_do_unreserve(hsotg, qh); qh 1329 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 1335 drivers/usb/dwc2/hcd_queue.c max_xfer_size = qh->maxp * qh->maxp_mult; qh 1358 drivers/usb/dwc2/hcd_queue.c static int dwc2_schedule_periodic(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1362 drivers/usb/dwc2/hcd_queue.c status = dwc2_check_max_xfer_size(hsotg, qh); qh 1371 drivers/usb/dwc2/hcd_queue.c if (del_timer(&qh->unreserve_timer)) qh 1372 drivers/usb/dwc2/hcd_queue.c WARN_ON(!qh->unreserve_pending); qh 1381 drivers/usb/dwc2/hcd_queue.c if (!qh->unreserve_pending) { qh 1382 drivers/usb/dwc2/hcd_queue.c status = dwc2_do_reserve(hsotg, qh); qh 1392 drivers/usb/dwc2/hcd_queue.c if (dwc2_frame_num_le(qh->next_active_frame, qh 1394 drivers/usb/dwc2/hcd_queue.c dwc2_pick_first_frame(hsotg, qh); qh 1397 drivers/usb/dwc2/hcd_queue.c qh->unreserve_pending = 0; qh 1401 drivers/usb/dwc2/hcd_queue.c list_add_tail(&qh->qh_list_entry, &hsotg->periodic_sched_ready); qh 1404 drivers/usb/dwc2/hcd_queue.c list_add_tail(&qh->qh_list_entry, qh 1418 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 1439 drivers/usb/dwc2/hcd_queue.c did_modify = mod_timer(&qh->unreserve_timer, qh 1442 drivers/usb/dwc2/hcd_queue.c qh->unreserve_pending = 1; qh 1444 drivers/usb/dwc2/hcd_queue.c list_del_init(&qh->qh_list_entry); qh 1472 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh = container_of(t, struct dwc2_qh, wait_timer); qh 1473 drivers/usb/dwc2/hcd_queue.c struct dwc2_hsotg *hsotg = qh->hsotg; qh 1482 drivers/usb/dwc2/hcd_queue.c if (!qh->wait_timer_cancel) { qh 1485 drivers/usb/dwc2/hcd_queue.c qh->want_wait = false; qh 1487 drivers/usb/dwc2/hcd_queue.c list_move(&qh->qh_list_entry, qh 1508 drivers/usb/dwc2/hcd_queue.c static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 1526 drivers/usb/dwc2/hcd_queue.c qh->hsotg = hsotg; qh 1527 drivers/usb/dwc2/hcd_queue.c timer_setup(&qh->unreserve_timer, dwc2_unreserve_timer_fn, 0); qh 1528 drivers/usb/dwc2/hcd_queue.c hrtimer_init(&qh->wait_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); qh 1529 drivers/usb/dwc2/hcd_queue.c qh->wait_timer.function = &dwc2_wait_timer_fn; qh 1530 drivers/usb/dwc2/hcd_queue.c qh->ep_type = ep_type; qh 1531 drivers/usb/dwc2/hcd_queue.c qh->ep_is_in = ep_is_in; qh 1533 drivers/usb/dwc2/hcd_queue.c qh->data_toggle = DWC2_HC_PID_DATA0; qh 1534 drivers/usb/dwc2/hcd_queue.c qh->maxp = maxp; qh 1535 drivers/usb/dwc2/hcd_queue.c qh->maxp_mult = maxp_mult; qh 1536 drivers/usb/dwc2/hcd_queue.c INIT_LIST_HEAD(&qh->qtd_list); qh 1537 drivers/usb/dwc2/hcd_queue.c INIT_LIST_HEAD(&qh->qh_list_entry); qh 1539 drivers/usb/dwc2/hcd_queue.c qh->do_split = do_split; qh 1540 drivers/usb/dwc2/hcd_queue.c qh->dev_speed = dev_speed; qh 1547 drivers/usb/dwc2/hcd_queue.c &qh->ttport); qh 1550 drivers/usb/dwc2/hcd_queue.c qh->dwc_tt = dwc_tt; qh 1552 drivers/usb/dwc2/hcd_queue.c qh->host_us = NS_TO_US(usb_calc_bus_time(host_speed, ep_is_in, qh 1559 drivers/usb/dwc2/hcd_queue.c qh->device_us = NS_TO_US(device_ns); qh 1561 drivers/usb/dwc2/hcd_queue.c qh->device_interval = urb->interval; qh 1562 drivers/usb/dwc2/hcd_queue.c qh->host_interval = urb->interval * (do_split ? 8 : 1); qh 1569 drivers/usb/dwc2/hcd_queue.c qh->schedule_low_speed = prtspd != HPRT0_SPD_HIGH_SPEED || qh 1574 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers = -1; qh 1576 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers = 1; qh 1578 drivers/usb/dwc2/hcd_queue.c qh->num_hs_transfers = 0; qh 1599 drivers/usb/dwc2/hcd_queue.c switch (qh->ep_type) { qh 1617 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(hsotg, "QH=%p Init %s, %s speed, %d bytes:\n", qh, type, qh 1619 drivers/usb/dwc2/hcd_queue.c dwc2_sch_dbg(hsotg, "QH=%p ...addr=%d, ep=%d, %s\n", qh, qh 1626 drivers/usb/dwc2/hcd_queue.c qh, qh->host_us, qh->device_us); qh 1628 drivers/usb/dwc2/hcd_queue.c qh, qh->host_interval, qh->device_interval); qh 1629 drivers/usb/dwc2/hcd_queue.c if (qh->schedule_low_speed) qh 1631 drivers/usb/dwc2/hcd_queue.c qh, dwc2_get_ls_map(hsotg, qh)); qh 1649 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh; qh 1655 drivers/usb/dwc2/hcd_queue.c qh = kzalloc(sizeof(*qh), mem_flags); qh 1656 drivers/usb/dwc2/hcd_queue.c if (!qh) qh 1659 drivers/usb/dwc2/hcd_queue.c dwc2_qh_init(hsotg, qh, urb, mem_flags); qh 1662 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_init_ddma(hsotg, qh, mem_flags) < 0) { qh 1663 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_free(hsotg, qh); qh 1667 drivers/usb/dwc2/hcd_queue.c return qh; qh 1681 drivers/usb/dwc2/hcd_queue.c void dwc2_hcd_qh_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1684 drivers/usb/dwc2/hcd_queue.c if (del_timer_sync(&qh->unreserve_timer)) { qh 1688 drivers/usb/dwc2/hcd_queue.c dwc2_do_unreserve(hsotg, qh); qh 1699 drivers/usb/dwc2/hcd_queue.c hrtimer_cancel(&qh->wait_timer); qh 1701 drivers/usb/dwc2/hcd_queue.c dwc2_host_put_tt_info(hsotg, qh->dwc_tt); qh 1703 drivers/usb/dwc2/hcd_queue.c if (qh->desc_list) qh 1704 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_free_ddma(hsotg, qh); qh 1705 drivers/usb/dwc2/hcd_queue.c else if (hsotg->unaligned_cache && qh->dw_align_buf) qh 1706 drivers/usb/dwc2/hcd_queue.c kmem_cache_free(hsotg->unaligned_cache, qh->dw_align_buf); qh 1708 drivers/usb/dwc2/hcd_queue.c kfree(qh); qh 1721 drivers/usb/dwc2/hcd_queue.c int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1727 drivers/usb/dwc2/hcd_queue.c if (dbg_qh(qh)) qh 1730 drivers/usb/dwc2/hcd_queue.c if (!list_empty(&qh->qh_list_entry)) qh 1735 drivers/usb/dwc2/hcd_queue.c if (dwc2_qh_is_non_per(qh)) { qh 1737 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame = hsotg->frame_number; qh 1738 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame = qh->start_active_frame; qh 1740 drivers/usb/dwc2/hcd_queue.c if (qh->want_wait) { qh 1741 drivers/usb/dwc2/hcd_queue.c list_add_tail(&qh->qh_list_entry, qh 1743 drivers/usb/dwc2/hcd_queue.c qh->wait_timer_cancel = false; qh 1745 drivers/usb/dwc2/hcd_queue.c hrtimer_start(&qh->wait_timer, delay, HRTIMER_MODE_REL); qh 1747 drivers/usb/dwc2/hcd_queue.c list_add_tail(&qh->qh_list_entry, qh 1753 drivers/usb/dwc2/hcd_queue.c status = dwc2_schedule_periodic(hsotg, qh); qh 1773 drivers/usb/dwc2/hcd_queue.c void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) qh 1780 drivers/usb/dwc2/hcd_queue.c qh->wait_timer_cancel = true; qh 1782 drivers/usb/dwc2/hcd_queue.c if (list_empty(&qh->qh_list_entry)) qh 1786 drivers/usb/dwc2/hcd_queue.c if (dwc2_qh_is_non_per(qh)) { qh 1787 drivers/usb/dwc2/hcd_queue.c if (hsotg->non_periodic_qh_ptr == &qh->qh_list_entry) qh 1790 drivers/usb/dwc2/hcd_queue.c list_del_init(&qh->qh_list_entry); qh 1794 drivers/usb/dwc2/hcd_queue.c dwc2_deschedule_periodic(hsotg, qh); qh 1824 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh, u16 frame_number) qh 1826 drivers/usb/dwc2/hcd_queue.c u16 old_frame = qh->next_active_frame; qh 1837 drivers/usb/dwc2/hcd_queue.c if (old_frame == qh->start_active_frame && qh 1838 drivers/usb/dwc2/hcd_queue.c !(qh->ep_type == USB_ENDPOINT_XFER_ISOC && !qh->ep_is_in)) qh 1843 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame = dwc2_frame_num_inc(old_frame, incr); qh 1853 drivers/usb/dwc2/hcd_queue.c if (dwc2_frame_num_gt(prev_frame_number, qh->next_active_frame)) { qh 1859 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame); qh 1860 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame = frame_number; qh 1887 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh, u16 frame_number) qh 1890 drivers/usb/dwc2/hcd_queue.c u16 interval = qh->host_interval; qh 1893 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame = dwc2_frame_num_inc(qh->start_active_frame, qh 1933 drivers/usb/dwc2/hcd_queue.c if (qh->start_active_frame == qh->next_active_frame || qh 1934 drivers/usb/dwc2/hcd_queue.c dwc2_frame_num_gt(prev_frame_number, qh->start_active_frame)) { qh 1935 drivers/usb/dwc2/hcd_queue.c u16 ideal_start = qh->start_active_frame; qh 1942 drivers/usb/dwc2/hcd_queue.c if (qh->do_split || qh->dev_speed == USB_SPEED_HIGH) qh 1949 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame = dwc2_frame_num_inc( qh 1950 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame, interval); qh 1952 drivers/usb/dwc2/hcd_queue.c qh->start_active_frame)); qh 1954 drivers/usb/dwc2/hcd_queue.c missed = dwc2_frame_num_dec(qh->start_active_frame, qh 1959 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame = qh->start_active_frame; qh 1977 drivers/usb/dwc2/hcd_queue.c void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, qh 1980 drivers/usb/dwc2/hcd_queue.c u16 old_frame = qh->next_active_frame; qh 1984 drivers/usb/dwc2/hcd_queue.c if (dbg_qh(qh)) qh 1987 drivers/usb/dwc2/hcd_queue.c if (dwc2_qh_is_non_per(qh)) { qh 1988 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_unlink(hsotg, qh); qh 1989 drivers/usb/dwc2/hcd_queue.c if (!list_empty(&qh->qtd_list)) qh 1991 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_add(hsotg, qh); qh 2004 drivers/usb/dwc2/hcd_queue.c missed = dwc2_next_for_periodic_split(hsotg, qh, frame_number); qh 2006 drivers/usb/dwc2/hcd_queue.c missed = dwc2_next_periodic_start(hsotg, qh, frame_number); qh 2010 drivers/usb/dwc2/hcd_queue.c qh, sched_next_periodic_split, frame_number, old_frame, qh 2011 drivers/usb/dwc2/hcd_queue.c qh->next_active_frame, qh 2012 drivers/usb/dwc2/hcd_queue.c dwc2_frame_num_dec(qh->next_active_frame, old_frame), qh 2015 drivers/usb/dwc2/hcd_queue.c if (list_empty(&qh->qtd_list)) { qh 2016 drivers/usb/dwc2/hcd_queue.c dwc2_hcd_qh_unlink(hsotg, qh); qh 2027 drivers/usb/dwc2/hcd_queue.c if (dwc2_frame_num_le(qh->next_active_frame, hsotg->frame_number)) qh 2028 drivers/usb/dwc2/hcd_queue.c list_move_tail(&qh->qh_list_entry, qh 2031 drivers/usb/dwc2/hcd_queue.c list_move_tail(&qh->qh_list_entry, qh 2079 drivers/usb/dwc2/hcd_queue.c struct dwc2_qh *qh) qh 2083 drivers/usb/dwc2/hcd_queue.c if (unlikely(!qh)) { qh 2089 drivers/usb/dwc2/hcd_queue.c retval = dwc2_hcd_qh_add(hsotg, qh); qh 2093 drivers/usb/dwc2/hcd_queue.c qtd->qh = qh; qh 2094 drivers/usb/dwc2/hcd_queue.c list_add_tail(&qtd->qtd_list_entry, &qh->qtd_list); qh 704 drivers/usb/gadget/udc/fsl_udc_core.c struct ep_queue_head *qh = get_qh_by_ep(ep); qh 707 drivers/usb/gadget/udc/fsl_udc_core.c qh->next_dtd_ptr = cpu_to_hc32(td->td_dma qh 711 drivers/usb/gadget/udc/fsl_udc_core.c qh->size_ioc_int_sts &= cpu_to_hc32(~(EP_QUEUE_HEAD_STATUS_ACTIVE qh 1053 drivers/usb/gadget/udc/fsl_udc_core.c struct ep_queue_head *qh; qh 1064 drivers/usb/gadget/udc/fsl_udc_core.c qh = get_qh_by_ep(ep); qh 1070 drivers/usb/gadget/udc/fsl_udc_core.c size = (qh->size_ioc_int_sts & DTD_PACKET_SIZE) qh 1560 drivers/usb/gadget/udc/fsl_udc_core.c struct ep_queue_head *qh; qh 1563 drivers/usb/gadget/udc/fsl_udc_core.c qh = &udc->ep_qh[ep_num * 2 + EP_DIR_OUT]; qh 1578 drivers/usb/gadget/udc/fsl_udc_core.c u32 *s = (u32 *)qh->setup_buffer; qh 1584 drivers/usb/gadget/udc/fsl_udc_core.c memcpy(buffer_ptr, (u8 *) qh->setup_buffer, 8); qh 2353 drivers/usb/gadget/udc/fsl_udc_core.c ep->qh = &udc->ep_qh[index]; qh 462 drivers/usb/gadget/udc/fsl_usb2_udc.h struct ep_queue_head *qh; qh 585 drivers/usb/gadget/udc/fsl_usb2_udc.h return ep->qh; qh 821 drivers/usb/gadget/udc/mv_udc_core.c struct mv_dqh *qh; qh 823 drivers/usb/gadget/udc/mv_udc_core.c qh = ep->dqh; qh 824 drivers/usb/gadget/udc/mv_udc_core.c qh->next_dtd_ptr = 1; qh 825 drivers/usb/gadget/udc/mv_udc_core.c qh->size_ioc_int_sts = 0; qh 96 drivers/usb/host/ehci-dbg.c dbg_qh(const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) qh 98 drivers/usb/host/ehci-dbg.c struct ehci_qh_hw *hw = qh->hw; qh 101 drivers/usb/host/ehci-dbg.c qh, hw->hw_next, hw->hw_info1, hw->hw_info2, hw->hw_current); qh 370 drivers/usb/host/ehci-dbg.c static void qh_lines(struct ehci_hcd *ehci, struct ehci_qh *qh, qh 382 drivers/usb/host/ehci-dbg.c struct ehci_qh_hw *hw = qh->hw; qh 401 drivers/usb/host/ehci-dbg.c qh, scratch & 0x007f, qh 416 drivers/usb/host/ehci-dbg.c list_for_each(entry, &qh->qtd_list) { qh 477 drivers/usb/host/ehci-dbg.c struct ehci_qh *qh; qh 492 drivers/usb/host/ehci-dbg.c for (qh = ehci->async->qh_next.qh; size > 0 && qh; qh = qh->qh_next.qh) qh 493 drivers/usb/host/ehci-dbg.c qh_lines(ehci, qh, &next, &size); qh 499 drivers/usb/host/ehci-dbg.c list_for_each_entry(qh, &ehci->async_unlink, unlink_node) { qh 502 drivers/usb/host/ehci-dbg.c qh_lines(ehci, qh, &next, &size); qh 594 drivers/usb/host/ehci-dbg.c struct ehci_qh_hw *hw, struct ehci_qh *qh, unsigned size) qh 602 drivers/usb/host/ehci-dbg.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { qh 616 drivers/usb/host/ehci-dbg.c (scratch >> 8) & 0x000f, type, qh->ps.usecs, qh 617 drivers/usb/host/ehci-dbg.c qh->ps.c_usecs, temp, 0x7ff & (scratch >> 16)); qh 666 drivers/usb/host/ehci-dbg.c hw = p.qh->hw; qh 668 drivers/usb/host/ehci-dbg.c p.qh->ps.period, qh 673 drivers/usb/host/ehci-dbg.c p.qh); qh 680 drivers/usb/host/ehci-dbg.c if (p.qh->qh_next.ptr) { qh 691 drivers/usb/host/ehci-dbg.c hw, p.qh, size); qh 694 drivers/usb/host/ehci-dbg.c seen[seen_count++].qh = p.qh; qh 699 drivers/usb/host/ehci-dbg.c p = p.qh->qh_next; qh 1053 drivers/usb/host/ehci-dbg.c struct ehci_hcd *ehci, struct ehci_qh *qh) { } qh 300 drivers/usb/host/ehci-hcd.c static void start_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh); qh 301 drivers/usb/host/ehci-hcd.c static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh); qh 518 drivers/usb/host/ehci-hcd.c ehci->async->qh_next.qh = NULL; qh 896 drivers/usb/host/ehci-hcd.c struct ehci_qh *qh; qh 912 drivers/usb/host/ehci-hcd.c qh = (struct ehci_qh *) urb->hcpriv; qh 913 drivers/usb/host/ehci-hcd.c qh->unlink_reason |= QH_UNLINK_REQUESTED; qh 914 drivers/usb/host/ehci-hcd.c switch (qh->qh_state) { qh 917 drivers/usb/host/ehci-hcd.c start_unlink_intr(ehci, qh); qh 919 drivers/usb/host/ehci-hcd.c start_unlink_async(ehci, qh); qh 922 drivers/usb/host/ehci-hcd.c qh->dequeue_during_giveback = 1; qh 930 drivers/usb/host/ehci-hcd.c qh_completions(ehci, qh); qh 948 drivers/usb/host/ehci-hcd.c struct ehci_qh *qh; qh 955 drivers/usb/host/ehci-hcd.c qh = ep->hcpriv; qh 956 drivers/usb/host/ehci-hcd.c if (!qh) qh 962 drivers/usb/host/ehci-hcd.c if (qh->hw == NULL) { qh 974 drivers/usb/host/ehci-hcd.c qh->unlink_reason |= QH_UNLINK_REQUESTED; qh 975 drivers/usb/host/ehci-hcd.c switch (qh->qh_state) { qh 977 drivers/usb/host/ehci-hcd.c if (list_empty(&qh->qtd_list)) qh 978 drivers/usb/host/ehci-hcd.c qh->unlink_reason |= QH_UNLINK_QUEUE_EMPTY; qh 982 drivers/usb/host/ehci-hcd.c start_unlink_async(ehci, qh); qh 984 drivers/usb/host/ehci-hcd.c start_unlink_intr(ehci, qh); qh 994 drivers/usb/host/ehci-hcd.c if (qh->clearing_tt) qh 996 drivers/usb/host/ehci-hcd.c if (list_empty (&qh->qtd_list)) { qh 997 drivers/usb/host/ehci-hcd.c if (qh->ps.bw_uperiod) qh 998 drivers/usb/host/ehci-hcd.c reserve_release_intr_bandwidth(ehci, qh, -1); qh 999 drivers/usb/host/ehci-hcd.c qh_destroy(ehci, qh); qh 1008 drivers/usb/host/ehci-hcd.c qh, ep->desc.bEndpointAddress, qh->qh_state, qh 1009 drivers/usb/host/ehci-hcd.c list_empty (&qh->qtd_list) ? "" : "(has tds)"); qh 1021 drivers/usb/host/ehci-hcd.c struct ehci_qh *qh; qh 1031 drivers/usb/host/ehci-hcd.c qh = ep->hcpriv; qh 1038 drivers/usb/host/ehci-hcd.c if (qh) { qh 1039 drivers/usb/host/ehci-hcd.c if (!list_empty(&qh->qtd_list)) { qh 1046 drivers/usb/host/ehci-hcd.c usb_settoggle(qh->ps.udev, epnum, is_out, 0); qh 1047 drivers/usb/host/ehci-hcd.c qh->unlink_reason |= QH_UNLINK_REQUESTED; qh 1049 drivers/usb/host/ehci-hcd.c start_unlink_async(ehci, qh); qh 1051 drivers/usb/host/ehci-hcd.c start_unlink_intr(ehci, qh); qh 54 drivers/usb/host/ehci-mem.c static void qh_destroy(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 57 drivers/usb/host/ehci-mem.c if (!list_empty (&qh->qtd_list) || qh->qh_next.ptr) { qh 61 drivers/usb/host/ehci-mem.c if (qh->dummy) qh 62 drivers/usb/host/ehci-mem.c ehci_qtd_free (ehci, qh->dummy); qh 63 drivers/usb/host/ehci-mem.c dma_pool_free(ehci->qh_pool, qh->hw, qh->qh_dma); qh 64 drivers/usb/host/ehci-mem.c kfree(qh); qh 69 drivers/usb/host/ehci-mem.c struct ehci_qh *qh; qh 72 drivers/usb/host/ehci-mem.c qh = kzalloc(sizeof *qh, GFP_ATOMIC); qh 73 drivers/usb/host/ehci-mem.c if (!qh) qh 75 drivers/usb/host/ehci-mem.c qh->hw = (struct ehci_qh_hw *) qh 77 drivers/usb/host/ehci-mem.c if (!qh->hw) qh 79 drivers/usb/host/ehci-mem.c memset(qh->hw, 0, sizeof *qh->hw); qh 80 drivers/usb/host/ehci-mem.c qh->qh_dma = dma; qh 82 drivers/usb/host/ehci-mem.c INIT_LIST_HEAD (&qh->qtd_list); qh 83 drivers/usb/host/ehci-mem.c INIT_LIST_HEAD(&qh->unlink_node); qh 86 drivers/usb/host/ehci-mem.c qh->dummy = ehci_qtd_alloc (ehci, flags); qh 87 drivers/usb/host/ehci-mem.c if (qh->dummy == NULL) { qh 92 drivers/usb/host/ehci-mem.c return qh; qh 94 drivers/usb/host/ehci-mem.c dma_pool_free(ehci->qh_pool, qh->hw, qh->qh_dma); qh 96 drivers/usb/host/ehci-mem.c kfree(qh); qh 79 drivers/usb/host/ehci-q.c qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) qh 81 drivers/usb/host/ehci-q.c struct ehci_qh_hw *hw = qh->hw; qh 84 drivers/usb/host/ehci-q.c WARN_ON(qh->qh_state != QH_STATE_IDLE); qh 97 drivers/usb/host/ehci-q.c is_out = qh->is_out; qh 99 drivers/usb/host/ehci-q.c if (unlikely(!usb_gettoggle(qh->ps.udev, epnum, is_out))) { qh 101 drivers/usb/host/ehci-q.c usb_settoggle(qh->ps.udev, epnum, is_out, 1); qh 113 drivers/usb/host/ehci-q.c qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh) qh 117 drivers/usb/host/ehci-q.c qtd = list_entry(qh->qtd_list.next, struct ehci_qtd, qtd_list); qh 126 drivers/usb/host/ehci-q.c if (qh->hw->hw_token & ACTIVE_BIT(ehci)) { qh 127 drivers/usb/host/ehci-q.c qh->hw->hw_qtd_next = qtd->hw_next; qh 128 drivers/usb/host/ehci-q.c if (qh->should_be_inactive) qh 129 drivers/usb/host/ehci-q.c ehci_warn(ehci, "qh %p should be inactive!\n", qh); qh 131 drivers/usb/host/ehci-q.c qh_update(ehci, qh, qtd); qh 133 drivers/usb/host/ehci-q.c qh->should_be_inactive = 0; qh 138 drivers/usb/host/ehci-q.c static void qh_link_async(struct ehci_hcd *ehci, struct ehci_qh *qh); qh 144 drivers/usb/host/ehci-q.c struct ehci_qh *qh = ep->hcpriv; qh 148 drivers/usb/host/ehci-q.c qh->clearing_tt = 0; qh 149 drivers/usb/host/ehci-q.c if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) qh 151 drivers/usb/host/ehci-q.c qh_link_async(ehci, qh); qh 155 drivers/usb/host/ehci-q.c static void ehci_clear_tt_buffer(struct ehci_hcd *ehci, struct ehci_qh *qh, qh 165 drivers/usb/host/ehci-q.c if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { qh 177 drivers/usb/host/ehci-q.c qh->clearing_tt = 1; qh 281 drivers/usb/host/ehci-q.c static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh); qh 289 drivers/usb/host/ehci-q.c qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) qh 291 drivers/usb/host/ehci-q.c struct ehci_qtd *last, *end = qh->dummy; qh 296 drivers/usb/host/ehci-q.c struct ehci_qh_hw *hw = qh->hw; qh 308 drivers/usb/host/ehci-q.c state = qh->qh_state; qh 309 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_COMPLETING; qh 315 drivers/usb/host/ehci-q.c qh->dequeue_during_giveback = 0; qh 322 drivers/usb/host/ehci-q.c list_for_each_safe (entry, tmp, &qh->qtd_list) { qh 361 drivers/usb/host/ehci-q.c qh); qh 373 drivers/usb/host/ehci-q.c ++qh->xacterrs < QH_XACTERR_MAX && qh 377 drivers/usb/host/ehci-q.c qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); qh 395 drivers/usb/host/ehci-q.c qh->unlink_reason |= QH_UNLINK_HALTED; qh 410 drivers/usb/host/ehci-q.c qh->unlink_reason |= QH_UNLINK_SHORT_READ; qh 425 drivers/usb/host/ehci-q.c qh->unlink_reason |= QH_UNLINK_SHUTDOWN; qh 443 drivers/usb/host/ehci-q.c qh->qtd_list.next == &qtd->qtd_list && qh 447 drivers/usb/host/ehci-q.c qh->should_be_inactive = 1; qh 453 drivers/usb/host/ehci-q.c ehci_clear_tt_buffer(ehci, qh, urb, token); qh 487 drivers/usb/host/ehci-q.c ehci_clear_tt_buffer(ehci, qh, urb, qh 495 drivers/usb/host/ehci-q.c if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { qh 506 drivers/usb/host/ehci-q.c qh->xacterrs = 0; qh 516 drivers/usb/host/ehci-q.c if (unlikely(qh->dequeue_during_giveback)) { qh 525 drivers/usb/host/ehci-q.c qh->qh_state = state; qh 543 drivers/usb/host/ehci-q.c qh->unlink_reason |= QH_UNLINK_DUMMY_OVERLAY; qh 546 drivers/usb/host/ehci-q.c return qh->unlink_reason; qh 765 drivers/usb/host/ehci-q.c struct ehci_qh *qh = ehci_qh_alloc (ehci, flags); qh 774 drivers/usb/host/ehci-q.c if (!qh) qh 775 drivers/usb/host/ehci-q.c return qh; qh 808 drivers/usb/host/ehci-q.c qh->ps.usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, qh 810 drivers/usb/host/ehci-q.c qh->ps.phase = NO_FRAME; qh 813 drivers/usb/host/ehci-q.c qh->ps.c_usecs = 0; qh 814 drivers/usb/host/ehci-q.c qh->gap_uf = 0; qh 825 drivers/usb/host/ehci-q.c qh->ps.period = urb->interval >> 3; qh 832 drivers/usb/host/ehci-q.c qh->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval); qh 833 drivers/usb/host/ehci-q.c qh->ps.bw_period = qh->ps.bw_uperiod >> 3; qh 838 drivers/usb/host/ehci-q.c qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed, qh 843 drivers/usb/host/ehci-q.c qh->ps.c_usecs = qh->ps.usecs + HS_USECS(0); qh 844 drivers/usb/host/ehci-q.c qh->ps.usecs = HS_USECS(1); qh 846 drivers/usb/host/ehci-q.c qh->ps.usecs += HS_USECS(1); qh 847 drivers/usb/host/ehci-q.c qh->ps.c_usecs = HS_USECS(0); qh 851 drivers/usb/host/ehci-q.c qh->ps.tt_usecs = NS_TO_US(think_time + qh 856 drivers/usb/host/ehci-q.c qh->ps.period = urb->interval; qh 864 drivers/usb/host/ehci-q.c qh->ps.bw_period = min_t(unsigned, tmp, urb->interval); qh 865 drivers/usb/host/ehci-q.c qh->ps.bw_uperiod = qh->ps.bw_period << 3; qh 870 drivers/usb/host/ehci-q.c qh->ps.udev = urb->dev; qh 871 drivers/usb/host/ehci-q.c qh->ps.ep = urb->ep; qh 935 drivers/usb/host/ehci-q.c qh_destroy(ehci, qh); qh 942 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_IDLE; qh 943 drivers/usb/host/ehci-q.c hw = qh->hw; qh 946 drivers/usb/host/ehci-q.c qh->is_out = !is_input; qh 948 drivers/usb/host/ehci-q.c return qh; qh 972 drivers/usb/host/ehci-q.c WARN_ON(ehci->async->qh_next.qh || !list_empty(&ehci->async_unlink) || qh 981 drivers/usb/host/ehci-q.c static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) qh 983 drivers/usb/host/ehci-q.c __hc32 dma = QH_NEXT(ehci, qh->qh_dma); qh 987 drivers/usb/host/ehci-q.c if (unlikely(qh->clearing_tt)) qh 990 drivers/usb/host/ehci-q.c WARN_ON(qh->qh_state != QH_STATE_IDLE); qh 993 drivers/usb/host/ehci-q.c qh_refresh(ehci, qh); qh 997 drivers/usb/host/ehci-q.c qh->qh_next = head->qh_next; qh 998 drivers/usb/host/ehci-q.c qh->hw->hw_next = head->hw->hw_next; qh 1001 drivers/usb/host/ehci-q.c head->qh_next.qh = qh; qh 1004 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_LINKED; qh 1005 drivers/usb/host/ehci-q.c qh->xacterrs = 0; qh 1006 drivers/usb/host/ehci-q.c qh->unlink_reason = 0; qh 1028 drivers/usb/host/ehci-q.c struct ehci_qh *qh = NULL; qh 1031 drivers/usb/host/ehci-q.c qh = (struct ehci_qh *) *ptr; qh 1032 drivers/usb/host/ehci-q.c if (unlikely (qh == NULL)) { qh 1034 drivers/usb/host/ehci-q.c qh = qh_make (ehci, urb, GFP_ATOMIC); qh 1035 drivers/usb/host/ehci-q.c *ptr = qh; qh 1037 drivers/usb/host/ehci-q.c if (likely (qh != NULL)) { qh 1051 drivers/usb/host/ehci-q.c qh->hw->hw_info1 &= ~qh_addr_mask; qh 1070 drivers/usb/host/ehci-q.c dummy = qh->dummy; qh 1078 drivers/usb/host/ehci-q.c list_splice_tail(qtd_list, &qh->qtd_list); qh 1081 drivers/usb/host/ehci-q.c qh->dummy = qtd; qh 1085 drivers/usb/host/ehci-q.c qtd = list_entry (qh->qtd_list.prev, qh 1093 drivers/usb/host/ehci-q.c urb->hcpriv = qh; qh 1096 drivers/usb/host/ehci-q.c return qh; qh 1110 drivers/usb/host/ehci-q.c struct ehci_qh *qh = NULL; qh 1137 drivers/usb/host/ehci-q.c qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 1138 drivers/usb/host/ehci-q.c if (unlikely(qh == NULL)) { qh 1147 drivers/usb/host/ehci-q.c if (likely (qh->qh_state == QH_STATE_IDLE)) qh 1148 drivers/usb/host/ehci-q.c qh_link_async(ehci, qh); qh 1151 drivers/usb/host/ehci-q.c if (unlikely (qh == NULL)) qh 1257 drivers/usb/host/ehci-q.c static void single_unlink_async(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 1262 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_UNLINK_WAIT; qh 1263 drivers/usb/host/ehci-q.c list_add_tail(&qh->unlink_node, &ehci->async_unlink); qh 1267 drivers/usb/host/ehci-q.c while (prev->qh_next.qh != qh) qh 1268 drivers/usb/host/ehci-q.c prev = prev->qh_next.qh; qh 1270 drivers/usb/host/ehci-q.c prev->hw->hw_next = qh->hw->hw_next; qh 1271 drivers/usb/host/ehci-q.c prev->qh_next = qh->qh_next; qh 1272 drivers/usb/host/ehci-q.c if (ehci->qh_scan_next == qh) qh 1273 drivers/usb/host/ehci-q.c ehci->qh_scan_next = qh->qh_next.qh; qh 1313 drivers/usb/host/ehci-q.c struct ehci_qh *qh; qh 1318 drivers/usb/host/ehci-q.c qh = list_first_entry(&ehci->async_unlink, struct ehci_qh, qh 1336 drivers/usb/host/ehci-q.c else if (qh->qh_state == QH_STATE_UNLINK) { qh 1341 drivers/usb/host/ehci-q.c list_move_tail(&qh->unlink_node, &ehci->async_idle); qh 1358 drivers/usb/host/ehci-q.c else if (qh->unlink_reason & (QH_UNLINK_HALTED | qh 1363 drivers/usb/host/ehci-q.c else if ((qh->unlink_reason & QH_UNLINK_QUEUE_EMPTY) && qh 1364 drivers/usb/host/ehci-q.c list_empty(&qh->qtd_list)) qh 1368 drivers/usb/host/ehci-q.c else if (qh->hw->hw_token & cpu_to_hc32(ehci, QTD_STS_HALT)) qh 1375 drivers/usb/host/ehci-q.c qh_current = qh->hw->hw_current; qh 1376 drivers/usb/host/ehci-q.c qh_token = qh->hw->hw_token; qh 1386 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_UNLINK; qh 1405 drivers/usb/host/ehci-q.c qh = list_first_entry(&ehci->async_idle, struct ehci_qh, qh 1407 drivers/usb/host/ehci-q.c list_del(&qh->unlink_node); qh 1409 drivers/usb/host/ehci-q.c qh->qh_state = QH_STATE_IDLE; qh 1410 drivers/usb/host/ehci-q.c qh->qh_next.qh = NULL; qh 1412 drivers/usb/host/ehci-q.c if (!list_empty(&qh->qtd_list)) qh 1413 drivers/usb/host/ehci-q.c qh_completions(ehci, qh); qh 1414 drivers/usb/host/ehci-q.c if (!list_empty(&qh->qtd_list) && qh 1416 drivers/usb/host/ehci-q.c qh_link_async(ehci, qh); qh 1422 drivers/usb/host/ehci-q.c static void start_unlink_async(struct ehci_hcd *ehci, struct ehci_qh *qh); qh 1426 drivers/usb/host/ehci-q.c struct ehci_qh *qh; qh 1431 drivers/usb/host/ehci-q.c for (qh = ehci->async->qh_next.qh; qh; qh = qh->qh_next.qh) { qh 1432 drivers/usb/host/ehci-q.c if (list_empty(&qh->qtd_list) && qh 1433 drivers/usb/host/ehci-q.c qh->qh_state == QH_STATE_LINKED) { qh 1435 drivers/usb/host/ehci-q.c if (qh->unlink_cycle != ehci->async_unlink_cycle) qh 1436 drivers/usb/host/ehci-q.c qh_to_unlink = qh; qh 1459 drivers/usb/host/ehci-q.c struct ehci_qh *qh; qh 1461 drivers/usb/host/ehci-q.c while (ehci->async->qh_next.qh) { qh 1462 drivers/usb/host/ehci-q.c qh = ehci->async->qh_next.qh; qh 1463 drivers/usb/host/ehci-q.c WARN_ON(!list_empty(&qh->qtd_list)); qh 1464 drivers/usb/host/ehci-q.c single_unlink_async(ehci, qh); qh 1473 drivers/usb/host/ehci-q.c static void start_unlink_async(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 1476 drivers/usb/host/ehci-q.c if (qh->qh_state != QH_STATE_LINKED) qh 1479 drivers/usb/host/ehci-q.c single_unlink_async(ehci, qh); qh 1487 drivers/usb/host/ehci-q.c struct ehci_qh *qh; qh 1490 drivers/usb/host/ehci-q.c ehci->qh_scan_next = ehci->async->qh_next.qh; qh 1492 drivers/usb/host/ehci-q.c qh = ehci->qh_scan_next; qh 1493 drivers/usb/host/ehci-q.c ehci->qh_scan_next = qh->qh_next.qh; qh 1496 drivers/usb/host/ehci-q.c if (!list_empty(&qh->qtd_list)) { qh 1506 drivers/usb/host/ehci-q.c temp = qh_completions(ehci, qh); qh 1508 drivers/usb/host/ehci-q.c start_unlink_async(ehci, qh); qh 1509 drivers/usb/host/ehci-q.c } else if (list_empty(&qh->qtd_list) qh 1510 drivers/usb/host/ehci-q.c && qh->qh_state == QH_STATE_LINKED) { qh 1511 drivers/usb/host/ehci-q.c qh->unlink_cycle = ehci->async_unlink_cycle; qh 37 drivers/usb/host/ehci-sched.c return &periodic->qh->qh_next; qh 55 drivers/usb/host/ehci-sched.c return &periodic->qh->hw->hw_next; qh 207 drivers/usb/host/ehci-sched.c struct ehci_qh *qh, int sign) qh 211 drivers/usb/host/ehci-sched.c int usecs = qh->ps.usecs; qh 212 drivers/usb/host/ehci-sched.c int c_usecs = qh->ps.c_usecs; qh 213 drivers/usb/host/ehci-sched.c int tt_usecs = qh->ps.tt_usecs; qh 216 drivers/usb/host/ehci-sched.c if (qh->ps.phase == NO_FRAME) /* Bandwidth wasn't reserved */ qh 218 drivers/usb/host/ehci-sched.c start_uf = qh->ps.bw_phase << 3; qh 220 drivers/usb/host/ehci-sched.c bandwidth_dbg(ehci, sign, "intr", &qh->ps); qh 229 drivers/usb/host/ehci-sched.c for (i = start_uf + qh->ps.phase_uf; i < EHCI_BANDWIDTH_SIZE; qh 230 drivers/usb/host/ehci-sched.c i += qh->ps.bw_uperiod) qh 234 drivers/usb/host/ehci-sched.c if (qh->ps.c_usecs) { qh 237 drivers/usb/host/ehci-sched.c i += qh->ps.bw_uperiod) { qh 239 drivers/usb/host/ehci-sched.c if (qh->ps.cs_mask & m) qh 247 drivers/usb/host/ehci-sched.c tt = find_tt(qh->ps.udev); qh 249 drivers/usb/host/ehci-sched.c list_add_tail(&qh->ps.ps_list, &tt->ps_list); qh 251 drivers/usb/host/ehci-sched.c list_del(&qh->ps.ps_list); qh 254 drivers/usb/host/ehci-sched.c i += qh->ps.bw_period) qh 456 drivers/usb/host/ehci-sched.c hw = here.qh->hw; qh 457 drivers/usb/host/ehci-sched.c if (same_tt(dev, here.qh->ps.udev)) { qh 468 drivers/usb/host/ehci-sched.c here = here.qh->qh_next; qh 534 drivers/usb/host/ehci-sched.c static void qh_link_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 537 drivers/usb/host/ehci-sched.c unsigned period = qh->ps.period; qh 539 drivers/usb/host/ehci-sched.c dev_dbg(&qh->ps.udev->dev, qh 541 drivers/usb/host/ehci-sched.c period, hc32_to_cpup(ehci, &qh->hw->hw_info2) qh 543 drivers/usb/host/ehci-sched.c qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs); qh 549 drivers/usb/host/ehci-sched.c for (i = qh->ps.phase; i < ehci->periodic_size; i += period) { qh 568 drivers/usb/host/ehci-sched.c while (here.ptr && qh != here.qh) { qh 569 drivers/usb/host/ehci-sched.c if (qh->ps.period > here.qh->ps.period) qh 571 drivers/usb/host/ehci-sched.c prev = &here.qh->qh_next; qh 572 drivers/usb/host/ehci-sched.c hw_p = &here.qh->hw->hw_next; qh 576 drivers/usb/host/ehci-sched.c if (qh != here.qh) { qh 577 drivers/usb/host/ehci-sched.c qh->qh_next = here; qh 578 drivers/usb/host/ehci-sched.c if (here.qh) qh 579 drivers/usb/host/ehci-sched.c qh->hw->hw_next = *hw_p; qh 581 drivers/usb/host/ehci-sched.c prev->qh = qh; qh 582 drivers/usb/host/ehci-sched.c *hw_p = QH_NEXT(ehci, qh->qh_dma); qh 585 drivers/usb/host/ehci-sched.c qh->qh_state = QH_STATE_LINKED; qh 586 drivers/usb/host/ehci-sched.c qh->xacterrs = 0; qh 587 drivers/usb/host/ehci-sched.c qh->unlink_reason = 0; qh 590 drivers/usb/host/ehci-sched.c ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->ps.bw_period qh 591 drivers/usb/host/ehci-sched.c ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period) qh 592 drivers/usb/host/ehci-sched.c : (qh->ps.usecs * 8); qh 594 drivers/usb/host/ehci-sched.c list_add(&qh->intr_node, &ehci->intr_qh_list); qh 601 drivers/usb/host/ehci-sched.c static void qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 622 drivers/usb/host/ehci-sched.c period = qh->ps.period ? : 1; qh 624 drivers/usb/host/ehci-sched.c for (i = qh->ps.phase; i < ehci->periodic_size; i += period) qh 625 drivers/usb/host/ehci-sched.c periodic_unlink(ehci, i, qh); qh 628 drivers/usb/host/ehci-sched.c ehci_to_hcd(ehci)->self.bandwidth_allocated -= qh->ps.bw_period qh 629 drivers/usb/host/ehci-sched.c ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period) qh 630 drivers/usb/host/ehci-sched.c : (qh->ps.usecs * 8); qh 632 drivers/usb/host/ehci-sched.c dev_dbg(&qh->ps.udev->dev, qh 634 drivers/usb/host/ehci-sched.c qh->ps.period, qh 635 drivers/usb/host/ehci-sched.c hc32_to_cpup(ehci, &qh->hw->hw_info2) & (QH_CMASK | QH_SMASK), qh 636 drivers/usb/host/ehci-sched.c qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs); qh 639 drivers/usb/host/ehci-sched.c qh->qh_state = QH_STATE_UNLINK; qh 640 drivers/usb/host/ehci-sched.c qh->qh_next.ptr = NULL; qh 642 drivers/usb/host/ehci-sched.c if (ehci->qh_scan_next == qh) qh 643 drivers/usb/host/ehci-sched.c ehci->qh_scan_next = list_entry(qh->intr_node.next, qh 645 drivers/usb/host/ehci-sched.c list_del(&qh->intr_node); qh 648 drivers/usb/host/ehci-sched.c static void cancel_unlink_wait_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 650 drivers/usb/host/ehci-sched.c if (qh->qh_state != QH_STATE_LINKED || qh 651 drivers/usb/host/ehci-sched.c list_empty(&qh->unlink_node)) qh 654 drivers/usb/host/ehci-sched.c list_del_init(&qh->unlink_node); qh 662 drivers/usb/host/ehci-sched.c static void start_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 665 drivers/usb/host/ehci-sched.c if (qh->qh_state != QH_STATE_LINKED) qh 669 drivers/usb/host/ehci-sched.c cancel_unlink_wait_intr(ehci, qh); qh 671 drivers/usb/host/ehci-sched.c qh_unlink_periodic(ehci, qh); qh 681 drivers/usb/host/ehci-sched.c qh->unlink_cycle = ehci->intr_unlink_cycle; qh 684 drivers/usb/host/ehci-sched.c list_add_tail(&qh->unlink_node, &ehci->intr_unlink); qh 690 drivers/usb/host/ehci-sched.c else if (ehci->intr_unlink.next == &qh->unlink_node) { qh 702 drivers/usb/host/ehci-sched.c struct ehci_qh *qh) qh 704 drivers/usb/host/ehci-sched.c qh->unlink_cycle = ehci->intr_unlink_wait_cycle; qh 707 drivers/usb/host/ehci-sched.c list_add_tail(&qh->unlink_node, &ehci->intr_unlink_wait); qh 711 drivers/usb/host/ehci-sched.c else if (ehci->intr_unlink_wait.next == &qh->unlink_node) { qh 717 drivers/usb/host/ehci-sched.c static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 719 drivers/usb/host/ehci-sched.c struct ehci_qh_hw *hw = qh->hw; qh 722 drivers/usb/host/ehci-sched.c qh->qh_state = QH_STATE_IDLE; qh 725 drivers/usb/host/ehci-sched.c if (!list_empty(&qh->qtd_list)) qh 726 drivers/usb/host/ehci-sched.c qh_completions(ehci, qh); qh 729 drivers/usb/host/ehci-sched.c if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) { qh 730 drivers/usb/host/ehci-sched.c rc = qh_schedule(ehci, qh); qh 732 drivers/usb/host/ehci-sched.c qh_refresh(ehci, qh); qh 733 drivers/usb/host/ehci-sched.c qh_link_periodic(ehci, qh); qh 744 drivers/usb/host/ehci-sched.c qh, rc); qh 785 drivers/usb/host/ehci-sched.c struct ehci_qh *qh, qh 793 drivers/usb/host/ehci-sched.c if (qh->ps.c_usecs && uframe >= 6) /* FSTN territory? */ qh 796 drivers/usb/host/ehci-sched.c if (!check_period(ehci, frame, uframe, qh->ps.bw_uperiod, qh->ps.usecs)) qh 798 drivers/usb/host/ehci-sched.c if (!qh->ps.c_usecs) { qh 805 drivers/usb/host/ehci-sched.c if (tt_available(ehci, &qh->ps, tt, frame, uframe)) { qh 811 drivers/usb/host/ehci-sched.c qh->ps.bw_uperiod, qh->ps.c_usecs)) qh 828 drivers/usb/host/ehci-sched.c mask = 0x03 << (uframe + qh->gap_uf); qh 832 drivers/usb/host/ehci-sched.c if (tt_no_collision(ehci, qh->ps.bw_period, qh->ps.udev, frame, mask)) { qh 833 drivers/usb/host/ehci-sched.c if (!check_period(ehci, frame, uframe + qh->gap_uf + 1, qh 834 drivers/usb/host/ehci-sched.c qh->ps.bw_uperiod, qh->ps.c_usecs)) qh 836 drivers/usb/host/ehci-sched.c if (!check_period(ehci, frame, uframe + qh->gap_uf, qh 837 drivers/usb/host/ehci-sched.c qh->ps.bw_uperiod, qh->ps.c_usecs)) qh 849 drivers/usb/host/ehci-sched.c static int qh_schedule(struct ehci_hcd *ehci, struct ehci_qh *qh) qh 854 drivers/usb/host/ehci-sched.c struct ehci_qh_hw *hw = qh->hw; qh 860 drivers/usb/host/ehci-sched.c if (qh->ps.phase != NO_FRAME) { qh 861 drivers/usb/host/ehci-sched.c ehci_dbg(ehci, "reused qh %p schedule\n", qh); qh 867 drivers/usb/host/ehci-sched.c tt = find_tt(qh->ps.udev); qh 878 drivers/usb/host/ehci-sched.c if (qh->ps.bw_period) { qh 882 drivers/usb/host/ehci-sched.c for (i = qh->ps.bw_period; i > 0; --i) { qh 883 drivers/usb/host/ehci-sched.c frame = ++ehci->random_frame & (qh->ps.bw_period - 1); qh 886 drivers/usb/host/ehci-sched.c frame, uframe, qh, &c_mask, tt); qh 894 drivers/usb/host/ehci-sched.c status = check_intr_schedule(ehci, 0, 0, qh, &c_mask, tt); qh 900 drivers/usb/host/ehci-sched.c qh->ps.phase = (qh->ps.period ? ehci->random_frame & qh 901 drivers/usb/host/ehci-sched.c (qh->ps.period - 1) : 0); qh 902 drivers/usb/host/ehci-sched.c qh->ps.bw_phase = qh->ps.phase & (qh->ps.bw_period - 1); qh 903 drivers/usb/host/ehci-sched.c qh->ps.phase_uf = uframe; qh 904 drivers/usb/host/ehci-sched.c qh->ps.cs_mask = qh->ps.period ? qh 910 drivers/usb/host/ehci-sched.c hw->hw_info2 |= cpu_to_hc32(ehci, qh->ps.cs_mask); qh 911 drivers/usb/host/ehci-sched.c reserve_release_intr_bandwidth(ehci, qh, 1); qh 925 drivers/usb/host/ehci-sched.c struct ehci_qh *qh; qh 944 drivers/usb/host/ehci-sched.c qh = qh_append_tds(ehci, urb, &empty, epnum, &urb->ep->hcpriv); qh 945 drivers/usb/host/ehci-sched.c if (qh == NULL) { qh 949 drivers/usb/host/ehci-sched.c if (qh->qh_state == QH_STATE_IDLE) { qh 950 drivers/usb/host/ehci-sched.c status = qh_schedule(ehci, qh); qh 956 drivers/usb/host/ehci-sched.c qh = qh_append_tds(ehci, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 957 drivers/usb/host/ehci-sched.c BUG_ON(qh == NULL); qh 960 drivers/usb/host/ehci-sched.c if (qh->qh_state == QH_STATE_IDLE) { qh 961 drivers/usb/host/ehci-sched.c qh_refresh(ehci, qh); qh 962 drivers/usb/host/ehci-sched.c qh_link_periodic(ehci, qh); qh 965 drivers/usb/host/ehci-sched.c cancel_unlink_wait_intr(ehci, qh); qh 984 drivers/usb/host/ehci-sched.c struct ehci_qh *qh; qh 986 drivers/usb/host/ehci-sched.c list_for_each_entry_safe(qh, ehci->qh_scan_next, &ehci->intr_qh_list, qh 990 drivers/usb/host/ehci-sched.c if (!list_empty(&qh->qtd_list)) { qh 1000 drivers/usb/host/ehci-sched.c temp = qh_completions(ehci, qh); qh 1002 drivers/usb/host/ehci-sched.c start_unlink_intr(ehci, qh); qh 1003 drivers/usb/host/ehci-sched.c else if (unlikely(list_empty(&qh->qtd_list) && qh 1004 drivers/usb/host/ehci-sched.c qh->qh_state == QH_STATE_LINKED)) qh 1005 drivers/usb/host/ehci-sched.c start_unlink_intr_wait(ehci, qh); qh 223 drivers/usb/host/ehci-timer.c struct ehci_qh *qh; qh 225 drivers/usb/host/ehci-timer.c qh = list_first_entry(&ehci->intr_unlink_wait, qh 227 drivers/usb/host/ehci-timer.c if (!stopped && (qh->unlink_cycle == qh 230 drivers/usb/host/ehci-timer.c list_del_init(&qh->unlink_node); qh 231 drivers/usb/host/ehci-timer.c qh->unlink_reason |= QH_UNLINK_QUEUE_EMPTY; qh 232 drivers/usb/host/ehci-timer.c start_unlink_intr(ehci, qh); qh 256 drivers/usb/host/ehci-timer.c struct ehci_qh *qh; qh 258 drivers/usb/host/ehci-timer.c qh = list_first_entry(&ehci->intr_unlink, struct ehci_qh, qh 260 drivers/usb/host/ehci-timer.c if (!stopped && qh->unlink_cycle == ehci->intr_unlink_cycle) qh 262 drivers/usb/host/ehci-timer.c list_del_init(&qh->unlink_node); qh 263 drivers/usb/host/ehci-timer.c end_unlink_intr(ehci, qh); qh 359 drivers/usb/host/ehci.h struct ehci_qh *qh; /* Q_TYPE_QH */ qh 131 drivers/usb/host/fotg210-hcd.c dbg_qh(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 133 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 135 drivers/usb/host/fotg210-hcd.c fotg210_dbg(fotg210, "%s qh %p n%08x info %x %x qtd %x\n", label, qh, qh 353 drivers/usb/host/fotg210-hcd.c static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, qh 364 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 382 drivers/usb/host/fotg210-hcd.c qh, scratch & 0x007f, qh 394 drivers/usb/host/fotg210-hcd.c list_for_each_entry(td, &qh->qtd_list, qtd_list) { qh 454 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 468 drivers/usb/host/fotg210-hcd.c for (qh = fotg210->async->qh_next.qh; size > 0 && qh; qh 469 drivers/usb/host/fotg210-hcd.c qh = qh->qh_next.qh) qh 470 drivers/usb/host/fotg210-hcd.c qh_lines(fotg210, qh, &next, &size); qh 476 drivers/usb/host/fotg210-hcd.c for (qh = fotg210->async_unlink; size > 0 && qh; qh 477 drivers/usb/host/fotg210-hcd.c qh = qh->unlink_next) qh 478 drivers/usb/host/fotg210-hcd.c qh_lines(fotg210, qh, &next, &size); qh 487 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw, struct fotg210_qh *qh, unsigned size) qh 495 drivers/usb/host/fotg210-hcd.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { qh 509 drivers/usb/host/fotg210-hcd.c (scratch >> 8) & 0x000f, type, qh->usecs, qh 510 drivers/usb/host/fotg210-hcd.c qh->c_usecs, temp, (scratch >> 16) & 0x7ff); qh 560 drivers/usb/host/fotg210-hcd.c hw = p.qh->hw; qh 562 drivers/usb/host/fotg210-hcd.c p.qh->period, qh 567 drivers/usb/host/fotg210-hcd.c p.qh); qh 574 drivers/usb/host/fotg210-hcd.c if (p.qh->qh_next.ptr) { qh 586 drivers/usb/host/fotg210-hcd.c p.qh, size); qh 589 drivers/usb/host/fotg210-hcd.c seen[seen_count++].qh = p.qh; qh 593 drivers/usb/host/fotg210-hcd.c p = p.qh->qh_next; qh 991 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh); qh 992 drivers/usb/host/fotg210-hcd.c static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh); qh 1207 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = fotg210->intr_unlink; qh 1209 drivers/usb/host/fotg210-hcd.c if (!stopped && qh->unlink_cycle == fotg210->intr_unlink_cycle) qh 1211 drivers/usb/host/fotg210-hcd.c fotg210->intr_unlink = qh->unlink_next; qh 1212 drivers/usb/host/fotg210-hcd.c qh->unlink_next = NULL; qh 1213 drivers/usb/host/fotg210-hcd.c end_unlink_intr(fotg210, qh); qh 1840 drivers/usb/host/fotg210-hcd.c static void qh_destroy(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 1843 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { qh 1847 drivers/usb/host/fotg210-hcd.c if (qh->dummy) qh 1848 drivers/usb/host/fotg210-hcd.c fotg210_qtd_free(fotg210, qh->dummy); qh 1849 drivers/usb/host/fotg210-hcd.c dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); qh 1850 drivers/usb/host/fotg210-hcd.c kfree(qh); qh 1856 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 1859 drivers/usb/host/fotg210-hcd.c qh = kzalloc(sizeof(*qh), GFP_ATOMIC); qh 1860 drivers/usb/host/fotg210-hcd.c if (!qh) qh 1862 drivers/usb/host/fotg210-hcd.c qh->hw = dma_pool_zalloc(fotg210->qh_pool, flags, &dma); qh 1863 drivers/usb/host/fotg210-hcd.c if (!qh->hw) qh 1865 drivers/usb/host/fotg210-hcd.c qh->qh_dma = dma; qh 1866 drivers/usb/host/fotg210-hcd.c INIT_LIST_HEAD(&qh->qtd_list); qh 1869 drivers/usb/host/fotg210-hcd.c qh->dummy = fotg210_qtd_alloc(fotg210, flags); qh 1870 drivers/usb/host/fotg210-hcd.c if (qh->dummy == NULL) { qh 1875 drivers/usb/host/fotg210-hcd.c return qh; qh 1877 drivers/usb/host/fotg210-hcd.c dma_pool_free(fotg210->qh_pool, qh->hw, qh->qh_dma); qh 1879 drivers/usb/host/fotg210-hcd.c kfree(qh); qh 2035 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh, struct fotg210_qtd *qtd) qh 2037 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 2040 drivers/usb/host/fotg210-hcd.c BUG_ON(qh->qh_state != QH_STATE_IDLE); qh 2053 drivers/usb/host/fotg210-hcd.c is_out = qh->is_out; qh 2055 drivers/usb/host/fotg210-hcd.c if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { qh 2057 drivers/usb/host/fotg210-hcd.c usb_settoggle(qh->dev, epnum, is_out, 1); qh 2068 drivers/usb/host/fotg210-hcd.c static void qh_refresh(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 2072 drivers/usb/host/fotg210-hcd.c if (list_empty(&qh->qtd_list)) qh 2073 drivers/usb/host/fotg210-hcd.c qtd = qh->dummy; qh 2075 drivers/usb/host/fotg210-hcd.c qtd = list_entry(qh->qtd_list.next, qh 2084 drivers/usb/host/fotg210-hcd.c if (cpu_to_hc32(fotg210, qtd->qtd_dma) == qh->hw->hw_current) { qh 2085 drivers/usb/host/fotg210-hcd.c qh->hw->hw_qtd_next = qtd->hw_next; qh 2091 drivers/usb/host/fotg210-hcd.c qh_update(fotg210, qh, qtd); qh 2094 drivers/usb/host/fotg210-hcd.c static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh); qh 2100 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = ep->hcpriv; qh 2104 drivers/usb/host/fotg210-hcd.c qh->clearing_tt = 0; qh 2105 drivers/usb/host/fotg210-hcd.c if (qh->qh_state == QH_STATE_IDLE && !list_empty(&qh->qtd_list) qh 2107 drivers/usb/host/fotg210-hcd.c qh_link_async(fotg210, qh); qh 2112 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh, struct urb *urb, u32 token) qh 2121 drivers/usb/host/fotg210-hcd.c if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { qh 2132 drivers/usb/host/fotg210-hcd.c qh->clearing_tt = 1; qh 2202 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = (struct fotg210_qh *) urb->hcpriv; qh 2205 drivers/usb/host/fotg210-hcd.c if ((qh->hw->hw_info2 & cpu_to_hc32(fotg210, QH_SMASK)) != 0) { qh 2238 drivers/usb/host/fotg210-hcd.c static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh); qh 2245 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh) qh 2247 drivers/usb/host/fotg210-hcd.c struct fotg210_qtd *last, *end = qh->dummy; qh 2253 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 2255 drivers/usb/host/fotg210-hcd.c if (unlikely(list_empty(&qh->qtd_list))) qh 2268 drivers/usb/host/fotg210-hcd.c state = qh->qh_state; qh 2269 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_COMPLETING; qh 2275 drivers/usb/host/fotg210-hcd.c qh->needs_rescan = 0; qh 2282 drivers/usb/host/fotg210-hcd.c list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { qh 2319 drivers/usb/host/fotg210-hcd.c urb->transfer_buffer_length, qtd, qh); qh 2331 drivers/usb/host/fotg210-hcd.c ++qh->xacterrs < QH_XACTERR_MAX && qh 2337 drivers/usb/host/fotg210-hcd.c qh->xacterrs); qh 2400 drivers/usb/host/fotg210-hcd.c fotg210_clear_tt_buffer(fotg210, qh, urb, qh 2435 drivers/usb/host/fotg210-hcd.c fotg210_clear_tt_buffer(fotg210, qh, qh 2443 drivers/usb/host/fotg210-hcd.c if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { qh 2454 drivers/usb/host/fotg210-hcd.c qh->xacterrs = 0; qh 2465 drivers/usb/host/fotg210-hcd.c if (unlikely(qh->needs_rescan)) { qh 2476 drivers/usb/host/fotg210-hcd.c qh->needs_rescan = 0; qh 2480 drivers/usb/host/fotg210-hcd.c qh->qh_state = state; qh 2489 drivers/usb/host/fotg210-hcd.c qh_refresh(fotg210, qh); qh 2505 drivers/usb/host/fotg210-hcd.c qh->needs_rescan = 1; qh 2717 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = fotg210_qh_alloc(fotg210, flags); qh 2724 drivers/usb/host/fotg210-hcd.c if (!qh) qh 2725 drivers/usb/host/fotg210-hcd.c return qh; qh 2755 drivers/usb/host/fotg210-hcd.c qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, qh 2758 drivers/usb/host/fotg210-hcd.c qh->start = NO_FRAME; qh 2761 drivers/usb/host/fotg210-hcd.c qh->c_usecs = 0; qh 2762 drivers/usb/host/fotg210-hcd.c qh->gap_uf = 0; qh 2764 drivers/usb/host/fotg210-hcd.c qh->period = urb->interval >> 3; qh 2765 drivers/usb/host/fotg210-hcd.c if (qh->period == 0 && urb->interval != 1) { qh 2771 drivers/usb/host/fotg210-hcd.c } else if (qh->period > fotg210->periodic_size) { qh 2772 drivers/usb/host/fotg210-hcd.c qh->period = fotg210->periodic_size; qh 2773 drivers/usb/host/fotg210-hcd.c urb->interval = qh->period << 3; qh 2779 drivers/usb/host/fotg210-hcd.c qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, qh 2784 drivers/usb/host/fotg210-hcd.c qh->c_usecs = qh->usecs + HS_USECS(0); qh 2785 drivers/usb/host/fotg210-hcd.c qh->usecs = HS_USECS(1); qh 2787 drivers/usb/host/fotg210-hcd.c qh->usecs += HS_USECS(1); qh 2788 drivers/usb/host/fotg210-hcd.c qh->c_usecs = HS_USECS(0); qh 2792 drivers/usb/host/fotg210-hcd.c qh->tt_usecs = NS_TO_US(think_time + qh 2795 drivers/usb/host/fotg210-hcd.c qh->period = urb->interval; qh 2796 drivers/usb/host/fotg210-hcd.c if (qh->period > fotg210->periodic_size) { qh 2797 drivers/usb/host/fotg210-hcd.c qh->period = fotg210->periodic_size; qh 2798 drivers/usb/host/fotg210-hcd.c urb->interval = qh->period; qh 2804 drivers/usb/host/fotg210-hcd.c qh->dev = urb->dev; qh 2868 drivers/usb/host/fotg210-hcd.c qh_destroy(fotg210, qh); qh 2875 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_IDLE; qh 2876 drivers/usb/host/fotg210-hcd.c hw = qh->hw; qh 2879 drivers/usb/host/fotg210-hcd.c qh->is_out = !is_input; qh 2881 drivers/usb/host/fotg210-hcd.c qh_refresh(fotg210, qh); qh 2882 drivers/usb/host/fotg210-hcd.c return qh; qh 2904 drivers/usb/host/fotg210-hcd.c WARN_ON(fotg210->async->qh_next.qh || fotg210->async_unlink); qh 2912 drivers/usb/host/fotg210-hcd.c static void qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 2914 drivers/usb/host/fotg210-hcd.c __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); qh 2918 drivers/usb/host/fotg210-hcd.c if (unlikely(qh->clearing_tt)) qh 2921 drivers/usb/host/fotg210-hcd.c WARN_ON(qh->qh_state != QH_STATE_IDLE); qh 2924 drivers/usb/host/fotg210-hcd.c qh_refresh(fotg210, qh); qh 2928 drivers/usb/host/fotg210-hcd.c qh->qh_next = head->qh_next; qh 2929 drivers/usb/host/fotg210-hcd.c qh->hw->hw_next = head->hw->hw_next; qh 2932 drivers/usb/host/fotg210-hcd.c head->qh_next.qh = qh; qh 2935 drivers/usb/host/fotg210-hcd.c qh->xacterrs = 0; qh 2936 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_LINKED; qh 2951 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = NULL; qh 2954 drivers/usb/host/fotg210-hcd.c qh = (struct fotg210_qh *) *ptr; qh 2955 drivers/usb/host/fotg210-hcd.c if (unlikely(qh == NULL)) { qh 2957 drivers/usb/host/fotg210-hcd.c qh = qh_make(fotg210, urb, GFP_ATOMIC); qh 2958 drivers/usb/host/fotg210-hcd.c *ptr = qh; qh 2960 drivers/usb/host/fotg210-hcd.c if (likely(qh != NULL)) { qh 2973 drivers/usb/host/fotg210-hcd.c qh->hw->hw_info1 &= ~qh_addr_mask; qh 2992 drivers/usb/host/fotg210-hcd.c dummy = qh->dummy; qh 3000 drivers/usb/host/fotg210-hcd.c list_splice_tail(qtd_list, &qh->qtd_list); qh 3003 drivers/usb/host/fotg210-hcd.c qh->dummy = qtd; qh 3007 drivers/usb/host/fotg210-hcd.c qtd = list_entry(qh->qtd_list.prev, qh 3015 drivers/usb/host/fotg210-hcd.c urb->hcpriv = qh; qh 3018 drivers/usb/host/fotg210-hcd.c return qh; qh 3026 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh = NULL; qh 3055 drivers/usb/host/fotg210-hcd.c qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 3056 drivers/usb/host/fotg210-hcd.c if (unlikely(qh == NULL)) { qh 3065 drivers/usb/host/fotg210-hcd.c if (likely(qh->qh_state == QH_STATE_IDLE)) qh 3066 drivers/usb/host/fotg210-hcd.c qh_link_async(fotg210, qh); qh 3069 drivers/usb/host/fotg210-hcd.c if (unlikely(qh == NULL)) qh 3075 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh) qh 3080 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_UNLINK; qh 3082 drivers/usb/host/fotg210-hcd.c fotg210->async_unlink_last->unlink_next = qh; qh 3084 drivers/usb/host/fotg210-hcd.c fotg210->async_unlink = qh; qh 3085 drivers/usb/host/fotg210-hcd.c fotg210->async_unlink_last = qh; qh 3089 drivers/usb/host/fotg210-hcd.c while (prev->qh_next.qh != qh) qh 3090 drivers/usb/host/fotg210-hcd.c prev = prev->qh_next.qh; qh 3092 drivers/usb/host/fotg210-hcd.c prev->hw->hw_next = qh->hw->hw_next; qh 3093 drivers/usb/host/fotg210-hcd.c prev->qh_next = qh->qh_next; qh 3094 drivers/usb/host/fotg210-hcd.c if (fotg210->qh_scan_next == qh) qh 3095 drivers/usb/host/fotg210-hcd.c fotg210->qh_scan_next = qh->qh_next.qh; qh 3133 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 3139 drivers/usb/host/fotg210-hcd.c qh = fotg210->async_iaa; qh 3140 drivers/usb/host/fotg210-hcd.c fotg210->async_iaa = qh->unlink_next; qh 3141 drivers/usb/host/fotg210-hcd.c qh->unlink_next = NULL; qh 3143 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_IDLE; qh 3144 drivers/usb/host/fotg210-hcd.c qh->qh_next.qh = NULL; qh 3146 drivers/usb/host/fotg210-hcd.c qh_completions(fotg210, qh); qh 3147 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list) && qh 3149 drivers/usb/host/fotg210-hcd.c qh_link_async(fotg210, qh); qh 3164 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh, *next; qh 3169 drivers/usb/host/fotg210-hcd.c next = fotg210->async->qh_next.qh; qh 3171 drivers/usb/host/fotg210-hcd.c qh = next; qh 3172 drivers/usb/host/fotg210-hcd.c next = qh->qh_next.qh; qh 3174 drivers/usb/host/fotg210-hcd.c if (list_empty(&qh->qtd_list) && qh 3175 drivers/usb/host/fotg210-hcd.c qh->qh_state == QH_STATE_LINKED) { qh 3176 drivers/usb/host/fotg210-hcd.c if (!stopped && qh->unlink_cycle == qh 3180 drivers/usb/host/fotg210-hcd.c single_unlink_async(fotg210, qh); qh 3200 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh) qh 3207 drivers/usb/host/fotg210-hcd.c if (qh->qh_state != QH_STATE_LINKED) { qh 3208 drivers/usb/host/fotg210-hcd.c if (qh->qh_state == QH_STATE_COMPLETING) qh 3209 drivers/usb/host/fotg210-hcd.c qh->needs_rescan = 1; qh 3213 drivers/usb/host/fotg210-hcd.c single_unlink_async(fotg210, qh); qh 3219 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 3222 drivers/usb/host/fotg210-hcd.c fotg210->qh_scan_next = fotg210->async->qh_next.qh; qh 3224 drivers/usb/host/fotg210-hcd.c qh = fotg210->qh_scan_next; qh 3225 drivers/usb/host/fotg210-hcd.c fotg210->qh_scan_next = qh->qh_next.qh; qh 3228 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list)) { qh 3238 drivers/usb/host/fotg210-hcd.c temp = qh_completions(fotg210, qh); qh 3239 drivers/usb/host/fotg210-hcd.c if (qh->needs_rescan) { qh 3240 drivers/usb/host/fotg210-hcd.c start_unlink_async(fotg210, qh); qh 3241 drivers/usb/host/fotg210-hcd.c } else if (list_empty(&qh->qtd_list) qh 3242 drivers/usb/host/fotg210-hcd.c && qh->qh_state == QH_STATE_LINKED) { qh 3243 drivers/usb/host/fotg210-hcd.c qh->unlink_cycle = fotg210->async_unlink_cycle; qh 3286 drivers/usb/host/fotg210-hcd.c return &periodic->qh->qh_next; qh 3300 drivers/usb/host/fotg210-hcd.c return &periodic->qh->hw->hw_next; qh 3349 drivers/usb/host/fotg210-hcd.c hw = q->qh->hw; qh 3352 drivers/usb/host/fotg210-hcd.c usecs += q->qh->usecs; qh 3356 drivers/usb/host/fotg210-hcd.c usecs += q->qh->c_usecs; qh 3358 drivers/usb/host/fotg210-hcd.c q = &q->qh->qh_next; qh 3425 drivers/usb/host/fotg210-hcd.c hw = here.qh->hw; qh 3426 drivers/usb/host/fotg210-hcd.c if (same_tt(dev, here.qh->dev)) { qh 3437 drivers/usb/host/fotg210-hcd.c here = here.qh->qh_next; qh 3484 drivers/usb/host/fotg210-hcd.c static void qh_link_periodic(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 3487 drivers/usb/host/fotg210-hcd.c unsigned period = qh->period; qh 3489 drivers/usb/host/fotg210-hcd.c dev_dbg(&qh->dev->dev, qh 3491 drivers/usb/host/fotg210-hcd.c hc32_to_cpup(fotg210, &qh->hw->hw_info2) & qh 3492 drivers/usb/host/fotg210-hcd.c (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, qh 3493 drivers/usb/host/fotg210-hcd.c qh->c_usecs); qh 3499 drivers/usb/host/fotg210-hcd.c for (i = qh->start; i < fotg210->periodic_size; i += period) { qh 3518 drivers/usb/host/fotg210-hcd.c while (here.ptr && qh != here.qh) { qh 3519 drivers/usb/host/fotg210-hcd.c if (qh->period > here.qh->period) qh 3521 drivers/usb/host/fotg210-hcd.c prev = &here.qh->qh_next; qh 3522 drivers/usb/host/fotg210-hcd.c hw_p = &here.qh->hw->hw_next; qh 3526 drivers/usb/host/fotg210-hcd.c if (qh != here.qh) { qh 3527 drivers/usb/host/fotg210-hcd.c qh->qh_next = here; qh 3528 drivers/usb/host/fotg210-hcd.c if (here.qh) qh 3529 drivers/usb/host/fotg210-hcd.c qh->hw->hw_next = *hw_p; qh 3531 drivers/usb/host/fotg210-hcd.c prev->qh = qh; qh 3532 drivers/usb/host/fotg210-hcd.c *hw_p = QH_NEXT(fotg210, qh->qh_dma); qh 3535 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_LINKED; qh 3536 drivers/usb/host/fotg210-hcd.c qh->xacterrs = 0; qh 3539 drivers/usb/host/fotg210-hcd.c fotg210_to_hcd(fotg210)->self.bandwidth_allocated += qh->period qh 3540 drivers/usb/host/fotg210-hcd.c ? ((qh->usecs + qh->c_usecs) / qh->period) qh 3541 drivers/usb/host/fotg210-hcd.c : (qh->usecs * 8); qh 3543 drivers/usb/host/fotg210-hcd.c list_add(&qh->intr_node, &fotg210->intr_qh_list); qh 3551 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh) qh 3572 drivers/usb/host/fotg210-hcd.c period = qh->period; qh 3576 drivers/usb/host/fotg210-hcd.c for (i = qh->start; i < fotg210->periodic_size; i += period) qh 3577 drivers/usb/host/fotg210-hcd.c periodic_unlink(fotg210, i, qh); qh 3580 drivers/usb/host/fotg210-hcd.c fotg210_to_hcd(fotg210)->self.bandwidth_allocated -= qh->period qh 3581 drivers/usb/host/fotg210-hcd.c ? ((qh->usecs + qh->c_usecs) / qh->period) qh 3582 drivers/usb/host/fotg210-hcd.c : (qh->usecs * 8); qh 3584 drivers/usb/host/fotg210-hcd.c dev_dbg(&qh->dev->dev, qh 3586 drivers/usb/host/fotg210-hcd.c qh->period, hc32_to_cpup(fotg210, &qh->hw->hw_info2) & qh 3587 drivers/usb/host/fotg210-hcd.c (QH_CMASK | QH_SMASK), qh, qh->start, qh->usecs, qh 3588 drivers/usb/host/fotg210-hcd.c qh->c_usecs); qh 3591 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_UNLINK; qh 3592 drivers/usb/host/fotg210-hcd.c qh->qh_next.ptr = NULL; qh 3594 drivers/usb/host/fotg210-hcd.c if (fotg210->qh_scan_next == qh) qh 3595 drivers/usb/host/fotg210-hcd.c fotg210->qh_scan_next = list_entry(qh->intr_node.next, qh 3597 drivers/usb/host/fotg210-hcd.c list_del(&qh->intr_node); qh 3601 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh) qh 3607 drivers/usb/host/fotg210-hcd.c if (qh->qh_state != QH_STATE_LINKED) { qh 3608 drivers/usb/host/fotg210-hcd.c if (qh->qh_state == QH_STATE_COMPLETING) qh 3609 drivers/usb/host/fotg210-hcd.c qh->needs_rescan = 1; qh 3613 drivers/usb/host/fotg210-hcd.c qh_unlink_periodic(fotg210, qh); qh 3623 drivers/usb/host/fotg210-hcd.c qh->unlink_cycle = fotg210->intr_unlink_cycle; qh 3627 drivers/usb/host/fotg210-hcd.c fotg210->intr_unlink_last->unlink_next = qh; qh 3629 drivers/usb/host/fotg210-hcd.c fotg210->intr_unlink = qh; qh 3630 drivers/usb/host/fotg210-hcd.c fotg210->intr_unlink_last = qh; qh 3636 drivers/usb/host/fotg210-hcd.c else if (fotg210->intr_unlink == qh) { qh 3643 drivers/usb/host/fotg210-hcd.c static void end_unlink_intr(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 3645 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 3648 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_IDLE; qh 3651 drivers/usb/host/fotg210-hcd.c qh_completions(fotg210, qh); qh 3654 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list) && qh 3656 drivers/usb/host/fotg210-hcd.c rc = qh_schedule(fotg210, qh); qh 3666 drivers/usb/host/fotg210-hcd.c qh, rc); qh 3715 drivers/usb/host/fotg210-hcd.c unsigned uframe, const struct fotg210_qh *qh, __hc32 *c_maskp) qh 3720 drivers/usb/host/fotg210-hcd.c if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ qh 3723 drivers/usb/host/fotg210-hcd.c if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs)) qh 3725 drivers/usb/host/fotg210-hcd.c if (!qh->c_usecs) { qh 3738 drivers/usb/host/fotg210-hcd.c mask = 0x03 << (uframe + qh->gap_uf); qh 3742 drivers/usb/host/fotg210-hcd.c if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) { qh 3743 drivers/usb/host/fotg210-hcd.c if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1, qh 3744 drivers/usb/host/fotg210-hcd.c qh->period, qh->c_usecs)) qh 3746 drivers/usb/host/fotg210-hcd.c if (!check_period(fotg210, frame, uframe + qh->gap_uf, qh 3747 drivers/usb/host/fotg210-hcd.c qh->period, qh->c_usecs)) qh 3758 drivers/usb/host/fotg210-hcd.c static int qh_schedule(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) qh 3764 drivers/usb/host/fotg210-hcd.c struct fotg210_qh_hw *hw = qh->hw; qh 3766 drivers/usb/host/fotg210-hcd.c qh_refresh(fotg210, qh); qh 3768 drivers/usb/host/fotg210-hcd.c frame = qh->start; qh 3771 drivers/usb/host/fotg210-hcd.c if (frame < qh->period) { qh 3774 drivers/usb/host/fotg210-hcd.c qh, &c_mask); qh 3786 drivers/usb/host/fotg210-hcd.c if (qh->period) { qh 3789 drivers/usb/host/fotg210-hcd.c for (i = qh->period; status && i > 0; --i) { qh 3790 drivers/usb/host/fotg210-hcd.c frame = ++fotg210->random_frame % qh->period; qh 3793 drivers/usb/host/fotg210-hcd.c frame, uframe, qh, qh 3803 drivers/usb/host/fotg210-hcd.c status = check_intr_schedule(fotg210, 0, 0, qh, qh 3808 drivers/usb/host/fotg210-hcd.c qh->start = frame; qh 3812 drivers/usb/host/fotg210-hcd.c hw->hw_info2 |= qh->period qh 3817 drivers/usb/host/fotg210-hcd.c fotg210_dbg(fotg210, "reused qh %p schedule\n", qh); qh 3820 drivers/usb/host/fotg210-hcd.c qh_link_periodic(fotg210, qh); qh 3830 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 3849 drivers/usb/host/fotg210-hcd.c qh = qh_append_tds(fotg210, urb, &empty, epnum, &urb->ep->hcpriv); qh 3850 drivers/usb/host/fotg210-hcd.c if (qh == NULL) { qh 3854 drivers/usb/host/fotg210-hcd.c if (qh->qh_state == QH_STATE_IDLE) { qh 3855 drivers/usb/host/fotg210-hcd.c status = qh_schedule(fotg210, qh); qh 3861 drivers/usb/host/fotg210-hcd.c qh = qh_append_tds(fotg210, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 3862 drivers/usb/host/fotg210-hcd.c BUG_ON(qh == NULL); qh 3880 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 3882 drivers/usb/host/fotg210-hcd.c list_for_each_entry_safe(qh, fotg210->qh_scan_next, qh 3886 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list)) { qh 3896 drivers/usb/host/fotg210-hcd.c temp = qh_completions(fotg210, qh); qh 3897 drivers/usb/host/fotg210-hcd.c if (unlikely(qh->needs_rescan || qh 3898 drivers/usb/host/fotg210-hcd.c (list_empty(&qh->qtd_list) && qh 3899 drivers/usb/host/fotg210-hcd.c qh->qh_state == QH_STATE_LINKED))) qh 3900 drivers/usb/host/fotg210-hcd.c start_unlink_intr(fotg210, qh); qh 4967 drivers/usb/host/fotg210-hcd.c fotg210->async->qh_next.qh = NULL; qh 5306 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 5319 drivers/usb/host/fotg210-hcd.c qh = (struct fotg210_qh *) urb->hcpriv; qh 5320 drivers/usb/host/fotg210-hcd.c if (!qh) qh 5322 drivers/usb/host/fotg210-hcd.c switch (qh->qh_state) { qh 5325 drivers/usb/host/fotg210-hcd.c start_unlink_async(fotg210, qh); qh 5333 drivers/usb/host/fotg210-hcd.c qh_completions(fotg210, qh); qh 5339 drivers/usb/host/fotg210-hcd.c qh = (struct fotg210_qh *) urb->hcpriv; qh 5340 drivers/usb/host/fotg210-hcd.c if (!qh) qh 5342 drivers/usb/host/fotg210-hcd.c switch (qh->qh_state) { qh 5345 drivers/usb/host/fotg210-hcd.c start_unlink_intr(fotg210, qh); qh 5348 drivers/usb/host/fotg210-hcd.c qh_completions(fotg210, qh); qh 5352 drivers/usb/host/fotg210-hcd.c qh, qh->qh_state); qh 5376 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh, *tmp; qh 5383 drivers/usb/host/fotg210-hcd.c qh = ep->hcpriv; qh 5384 drivers/usb/host/fotg210-hcd.c if (!qh) qh 5390 drivers/usb/host/fotg210-hcd.c if (qh->hw == NULL) { qh 5402 drivers/usb/host/fotg210-hcd.c qh->qh_state = QH_STATE_IDLE; qh 5403 drivers/usb/host/fotg210-hcd.c switch (qh->qh_state) { qh 5406 drivers/usb/host/fotg210-hcd.c for (tmp = fotg210->async->qh_next.qh; qh 5407 drivers/usb/host/fotg210-hcd.c tmp && tmp != qh; qh 5408 drivers/usb/host/fotg210-hcd.c tmp = tmp->qh_next.qh) qh 5414 drivers/usb/host/fotg210-hcd.c start_unlink_async(fotg210, qh); qh 5423 drivers/usb/host/fotg210-hcd.c if (qh->clearing_tt) qh 5425 drivers/usb/host/fotg210-hcd.c if (list_empty(&qh->qtd_list)) { qh 5426 drivers/usb/host/fotg210-hcd.c qh_destroy(fotg210, qh); qh 5435 drivers/usb/host/fotg210-hcd.c qh, ep->desc.bEndpointAddress, qh->qh_state, qh 5436 drivers/usb/host/fotg210-hcd.c list_empty(&qh->qtd_list) ? "" : "(has tds)"); qh 5448 drivers/usb/host/fotg210-hcd.c struct fotg210_qh *qh; qh 5458 drivers/usb/host/fotg210-hcd.c qh = ep->hcpriv; qh 5465 drivers/usb/host/fotg210-hcd.c if (qh) { qh 5466 drivers/usb/host/fotg210-hcd.c usb_settoggle(qh->dev, epnum, is_out, 0); qh 5467 drivers/usb/host/fotg210-hcd.c if (!list_empty(&qh->qtd_list)) { qh 5469 drivers/usb/host/fotg210-hcd.c } else if (qh->qh_state == QH_STATE_LINKED || qh 5470 drivers/usb/host/fotg210-hcd.c qh->qh_state == QH_STATE_COMPLETING) { qh 5477 drivers/usb/host/fotg210-hcd.c start_unlink_async(fotg210, qh); qh 5479 drivers/usb/host/fotg210-hcd.c start_unlink_intr(fotg210, qh); qh 393 drivers/usb/host/fotg210.h struct fotg210_qh *qh; /* Q_TYPE_QH */ qh 293 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh; /* Q_TYPE_QH */ qh 1031 drivers/usb/host/oxu210hp-hcd.c static void oxu_qh_free(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 1037 drivers/usb/host/oxu210hp-hcd.c index = qh - &oxu->mem->qh_pool[0]; qh 1045 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = container_of(kref, struct ehci_qh, kref); qh 1046 drivers/usb/host/oxu210hp-hcd.c struct oxu_hcd *oxu = qh->oxu; qh 1049 drivers/usb/host/oxu210hp-hcd.c if (!list_empty(&qh->qtd_list) || qh->qh_next.ptr) { qh 1053 drivers/usb/host/oxu210hp-hcd.c if (qh->dummy) qh 1054 drivers/usb/host/oxu210hp-hcd.c oxu_qtd_free(oxu, qh->dummy); qh 1055 drivers/usb/host/oxu210hp-hcd.c oxu_qh_free(oxu, qh); qh 1061 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = NULL; qh 1070 drivers/usb/host/oxu210hp-hcd.c qh = (struct ehci_qh *) &oxu->mem->qh_pool[i]; qh 1071 drivers/usb/host/oxu210hp-hcd.c memset(qh, 0, sizeof *qh); qh 1073 drivers/usb/host/oxu210hp-hcd.c kref_init(&qh->kref); qh 1074 drivers/usb/host/oxu210hp-hcd.c qh->oxu = oxu; qh 1075 drivers/usb/host/oxu210hp-hcd.c qh->qh_dma = virt_to_phys(qh); qh 1076 drivers/usb/host/oxu210hp-hcd.c INIT_LIST_HEAD(&qh->qtd_list); qh 1079 drivers/usb/host/oxu210hp-hcd.c qh->dummy = ehci_qtd_alloc(oxu); qh 1080 drivers/usb/host/oxu210hp-hcd.c if (qh->dummy == NULL) { qh 1083 drivers/usb/host/oxu210hp-hcd.c qh = NULL; qh 1092 drivers/usb/host/oxu210hp-hcd.c return qh; qh 1096 drivers/usb/host/oxu210hp-hcd.c static inline struct ehci_qh *qh_get(struct ehci_qh *qh) qh 1098 drivers/usb/host/oxu210hp-hcd.c kref_get(&qh->kref); qh 1099 drivers/usb/host/oxu210hp-hcd.c return qh; qh 1102 drivers/usb/host/oxu210hp-hcd.c static inline void qh_put(struct ehci_qh *qh) qh 1104 drivers/usb/host/oxu210hp-hcd.c kref_put(&qh->kref, qh_destroy); qh 1246 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh, struct ehci_qtd *qtd) qh 1249 drivers/usb/host/oxu210hp-hcd.c BUG_ON(qh->qh_state != QH_STATE_IDLE); qh 1251 drivers/usb/host/oxu210hp-hcd.c qh->hw_qtd_next = QTD_NEXT(qtd->qtd_dma); qh 1252 drivers/usb/host/oxu210hp-hcd.c qh->hw_alt_next = EHCI_LIST_END; qh 1259 drivers/usb/host/oxu210hp-hcd.c if (!(qh->hw_info1 & cpu_to_le32(1 << 14))) { qh 1263 drivers/usb/host/oxu210hp-hcd.c epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f; qh 1264 drivers/usb/host/oxu210hp-hcd.c if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { qh 1265 drivers/usb/host/oxu210hp-hcd.c qh->hw_token &= ~cpu_to_le32(QTD_TOGGLE); qh 1266 drivers/usb/host/oxu210hp-hcd.c usb_settoggle(qh->dev, epnum, is_out, 1); qh 1272 drivers/usb/host/oxu210hp-hcd.c qh->hw_token &= cpu_to_le32(QTD_TOGGLE | QTD_STS_PING); qh 1279 drivers/usb/host/oxu210hp-hcd.c static void qh_refresh(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 1283 drivers/usb/host/oxu210hp-hcd.c if (list_empty(&qh->qtd_list)) qh 1284 drivers/usb/host/oxu210hp-hcd.c qtd = qh->dummy; qh 1286 drivers/usb/host/oxu210hp-hcd.c qtd = list_entry(qh->qtd_list.next, qh 1289 drivers/usb/host/oxu210hp-hcd.c if (cpu_to_le32(qtd->qtd_dma) == qh->hw_current) qh 1294 drivers/usb/host/oxu210hp-hcd.c qh_update(oxu, qh, qtd); qh 1354 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; qh 1357 drivers/usb/host/oxu210hp-hcd.c if ((qh->hw_info2 & cpu_to_le32(QH_SMASK)) != 0) { qh 1362 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); qh 1395 drivers/usb/host/oxu210hp-hcd.c static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh); qh 1396 drivers/usb/host/oxu210hp-hcd.c static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh); qh 1398 drivers/usb/host/oxu210hp-hcd.c static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh); qh 1399 drivers/usb/host/oxu210hp-hcd.c static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh); qh 1407 drivers/usb/host/oxu210hp-hcd.c static unsigned qh_completions(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 1409 drivers/usb/host/oxu210hp-hcd.c struct ehci_qtd *last = NULL, *end = qh->dummy; qh 1417 drivers/usb/host/oxu210hp-hcd.c if (unlikely(list_empty(&qh->qtd_list))) qh 1426 drivers/usb/host/oxu210hp-hcd.c state = qh->qh_state; qh 1427 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_COMPLETING; qh 1435 drivers/usb/host/oxu210hp-hcd.c list_for_each_entry_safe(qtd, tmp, &qh->qtd_list, qtd_list) { qh 1512 drivers/usb/host/oxu210hp-hcd.c == qh->hw_current) qh 1513 drivers/usb/host/oxu210hp-hcd.c token = le32_to_cpu(qh->hw_token); qh 1519 drivers/usb/host/oxu210hp-hcd.c if ((HALT_BIT & qh->hw_token) == 0) { qh 1521 drivers/usb/host/oxu210hp-hcd.c qh->hw_token |= HALT_BIT; qh 1536 drivers/usb/host/oxu210hp-hcd.c if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { qh 1563 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = state; qh 1569 drivers/usb/host/oxu210hp-hcd.c if (stopped != 0 || qh->hw_qtd_next == EHCI_LIST_END) { qh 1572 drivers/usb/host/oxu210hp-hcd.c qh_refresh(oxu, qh); qh 1579 drivers/usb/host/oxu210hp-hcd.c & qh->hw_info2) != 0) { qh 1580 drivers/usb/host/oxu210hp-hcd.c intr_deschedule(oxu, qh); qh 1581 drivers/usb/host/oxu210hp-hcd.c (void) qh_schedule(oxu, qh); qh 1583 drivers/usb/host/oxu210hp-hcd.c unlink_async(oxu, qh); qh 1783 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = oxu_qh_alloc(oxu); qh 1788 drivers/usb/host/oxu210hp-hcd.c if (!qh) qh 1789 drivers/usb/host/oxu210hp-hcd.c return qh; qh 1810 drivers/usb/host/oxu210hp-hcd.c qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, qh 1813 drivers/usb/host/oxu210hp-hcd.c qh->start = NO_FRAME; qh 1816 drivers/usb/host/oxu210hp-hcd.c qh->c_usecs = 0; qh 1817 drivers/usb/host/oxu210hp-hcd.c qh->gap_uf = 0; qh 1819 drivers/usb/host/oxu210hp-hcd.c qh->period = urb->interval >> 3; qh 1820 drivers/usb/host/oxu210hp-hcd.c if (qh->period == 0 && urb->interval != 1) { qh 1834 drivers/usb/host/oxu210hp-hcd.c qh->gap_uf = 1 + usb_calc_bus_time(urb->dev->speed, qh 1839 drivers/usb/host/oxu210hp-hcd.c qh->c_usecs = qh->usecs + HS_USECS(0); qh 1840 drivers/usb/host/oxu210hp-hcd.c qh->usecs = HS_USECS(1); qh 1842 drivers/usb/host/oxu210hp-hcd.c qh->usecs += HS_USECS(1); qh 1843 drivers/usb/host/oxu210hp-hcd.c qh->c_usecs = HS_USECS(0); qh 1847 drivers/usb/host/oxu210hp-hcd.c qh->tt_usecs = NS_TO_US(think_time + qh 1850 drivers/usb/host/oxu210hp-hcd.c qh->period = urb->interval; qh 1855 drivers/usb/host/oxu210hp-hcd.c qh->dev = urb->dev; qh 1899 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); qh 1906 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_IDLE; qh 1907 drivers/usb/host/oxu210hp-hcd.c qh->hw_info1 = cpu_to_le32(info1); qh 1908 drivers/usb/host/oxu210hp-hcd.c qh->hw_info2 = cpu_to_le32(info2); qh 1910 drivers/usb/host/oxu210hp-hcd.c qh_refresh(oxu, qh); qh 1911 drivers/usb/host/oxu210hp-hcd.c return qh; qh 1916 drivers/usb/host/oxu210hp-hcd.c static void qh_link_async(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 1918 drivers/usb/host/oxu210hp-hcd.c __le32 dma = QH_NEXT(qh->qh_dma); qh 1924 drivers/usb/host/oxu210hp-hcd.c if (!head->qh_next.qh) { qh 1939 drivers/usb/host/oxu210hp-hcd.c if (qh->qh_state == QH_STATE_IDLE) qh 1940 drivers/usb/host/oxu210hp-hcd.c qh_refresh(oxu, qh); qh 1943 drivers/usb/host/oxu210hp-hcd.c qh->qh_next = head->qh_next; qh 1944 drivers/usb/host/oxu210hp-hcd.c qh->hw_next = head->hw_next; qh 1947 drivers/usb/host/oxu210hp-hcd.c head->qh_next.qh = qh; qh 1950 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_LINKED; qh 1966 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = NULL; qh 1968 drivers/usb/host/oxu210hp-hcd.c qh = (struct ehci_qh *) *ptr; qh 1969 drivers/usb/host/oxu210hp-hcd.c if (unlikely(qh == NULL)) { qh 1971 drivers/usb/host/oxu210hp-hcd.c qh = qh_make(oxu, urb, GFP_ATOMIC); qh 1972 drivers/usb/host/oxu210hp-hcd.c *ptr = qh; qh 1974 drivers/usb/host/oxu210hp-hcd.c if (likely(qh != NULL)) { qh 1988 drivers/usb/host/oxu210hp-hcd.c qh->hw_info1 &= ~QH_ADDR_MASK; qh 2007 drivers/usb/host/oxu210hp-hcd.c dummy = qh->dummy; qh 2015 drivers/usb/host/oxu210hp-hcd.c list_splice(qtd_list, qh->qtd_list.prev); qh 2018 drivers/usb/host/oxu210hp-hcd.c qh->dummy = qtd; qh 2022 drivers/usb/host/oxu210hp-hcd.c qtd = list_entry(qh->qtd_list.prev, qh 2031 drivers/usb/host/oxu210hp-hcd.c urb->hcpriv = qh_get(qh); qh 2034 drivers/usb/host/oxu210hp-hcd.c return qh; qh 2043 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = NULL; qh 2063 drivers/usb/host/oxu210hp-hcd.c qh = qh_append_tds(oxu, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 2064 drivers/usb/host/oxu210hp-hcd.c if (unlikely(qh == NULL)) { qh 2072 drivers/usb/host/oxu210hp-hcd.c if (likely(qh->qh_state == QH_STATE_IDLE)) qh 2073 drivers/usb/host/oxu210hp-hcd.c qh_link_async(oxu, qh_get(qh)); qh 2076 drivers/usb/host/oxu210hp-hcd.c if (unlikely(qh == NULL)) qh 2085 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh = oxu->reclaim; qh 2090 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_IDLE; qh 2091 drivers/usb/host/oxu210hp-hcd.c qh->qh_next.qh = NULL; qh 2092 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); /* refcount from reclaim */ qh 2095 drivers/usb/host/oxu210hp-hcd.c next = qh->reclaim; qh 2098 drivers/usb/host/oxu210hp-hcd.c qh->reclaim = NULL; qh 2100 drivers/usb/host/oxu210hp-hcd.c qh_completions(oxu, qh); qh 2102 drivers/usb/host/oxu210hp-hcd.c if (!list_empty(&qh->qtd_list) qh 2104 drivers/usb/host/oxu210hp-hcd.c qh_link_async(oxu, qh); qh 2106 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); /* refcount from async list */ qh 2112 drivers/usb/host/oxu210hp-hcd.c && oxu->async->qh_next.qh == NULL) qh 2125 drivers/usb/host/oxu210hp-hcd.c static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2132 drivers/usb/host/oxu210hp-hcd.c BUG_ON(oxu->reclaim || (qh->qh_state != QH_STATE_LINKED qh 2133 drivers/usb/host/oxu210hp-hcd.c && qh->qh_state != QH_STATE_UNLINK_WAIT)); qh 2137 drivers/usb/host/oxu210hp-hcd.c if (unlikely(qh == oxu->async)) { qh 2150 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_UNLINK; qh 2151 drivers/usb/host/oxu210hp-hcd.c oxu->reclaim = qh = qh_get(qh); qh 2154 drivers/usb/host/oxu210hp-hcd.c while (prev->qh_next.qh != qh) qh 2155 drivers/usb/host/oxu210hp-hcd.c prev = prev->qh_next.qh; qh 2157 drivers/usb/host/oxu210hp-hcd.c prev->hw_next = qh->hw_next; qh 2158 drivers/usb/host/oxu210hp-hcd.c prev->qh_next = qh->qh_next; qh 2178 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh; qh 2185 drivers/usb/host/oxu210hp-hcd.c qh = oxu->async->qh_next.qh; qh 2186 drivers/usb/host/oxu210hp-hcd.c if (likely(qh != NULL)) { qh 2189 drivers/usb/host/oxu210hp-hcd.c if (!list_empty(&qh->qtd_list) qh 2190 drivers/usb/host/oxu210hp-hcd.c && qh->stamp != oxu->stamp) { qh 2198 drivers/usb/host/oxu210hp-hcd.c qh = qh_get(qh); qh 2199 drivers/usb/host/oxu210hp-hcd.c qh->stamp = oxu->stamp; qh 2200 drivers/usb/host/oxu210hp-hcd.c temp = qh_completions(oxu, qh); qh 2201 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); qh 2212 drivers/usb/host/oxu210hp-hcd.c if (list_empty(&qh->qtd_list)) { qh 2213 drivers/usb/host/oxu210hp-hcd.c if (qh->stamp == oxu->stamp) qh 2216 drivers/usb/host/oxu210hp-hcd.c && qh->qh_state == QH_STATE_LINKED) qh 2217 drivers/usb/host/oxu210hp-hcd.c start_unlink_async(oxu, qh); qh 2220 drivers/usb/host/oxu210hp-hcd.c qh = qh->qh_next.qh; qh 2221 drivers/usb/host/oxu210hp-hcd.c } while (qh); qh 2238 drivers/usb/host/oxu210hp-hcd.c return &periodic->qh->qh_next; qh 2279 drivers/usb/host/oxu210hp-hcd.c if (q->qh->hw_info2 & cpu_to_le32(1 << uframe)) qh 2280 drivers/usb/host/oxu210hp-hcd.c usecs += q->qh->usecs; qh 2282 drivers/usb/host/oxu210hp-hcd.c if (q->qh->hw_info2 & cpu_to_le32(1 << (8 + uframe))) qh 2283 drivers/usb/host/oxu210hp-hcd.c usecs += q->qh->c_usecs; qh 2284 drivers/usb/host/oxu210hp-hcd.c hw_p = &q->qh->hw_next; qh 2285 drivers/usb/host/oxu210hp-hcd.c q = &q->qh->qh_next; qh 2352 drivers/usb/host/oxu210hp-hcd.c static int qh_link_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2355 drivers/usb/host/oxu210hp-hcd.c unsigned period = qh->period; qh 2357 drivers/usb/host/oxu210hp-hcd.c dev_dbg(&qh->dev->dev, qh 2359 drivers/usb/host/oxu210hp-hcd.c period, le32_to_cpup(&qh->hw_info2) & (QH_CMASK | QH_SMASK), qh 2360 drivers/usb/host/oxu210hp-hcd.c qh, qh->start, qh->usecs, qh->c_usecs); qh 2366 drivers/usb/host/oxu210hp-hcd.c for (i = qh->start; i < oxu->periodic_size; i += period) { qh 2378 drivers/usb/host/oxu210hp-hcd.c hw_p = &here.qh->hw_next; qh 2385 drivers/usb/host/oxu210hp-hcd.c while (here.ptr && qh != here.qh) { qh 2386 drivers/usb/host/oxu210hp-hcd.c if (qh->period > here.qh->period) qh 2388 drivers/usb/host/oxu210hp-hcd.c prev = &here.qh->qh_next; qh 2389 drivers/usb/host/oxu210hp-hcd.c hw_p = &here.qh->hw_next; qh 2393 drivers/usb/host/oxu210hp-hcd.c if (qh != here.qh) { qh 2394 drivers/usb/host/oxu210hp-hcd.c qh->qh_next = here; qh 2395 drivers/usb/host/oxu210hp-hcd.c if (here.qh) qh 2396 drivers/usb/host/oxu210hp-hcd.c qh->hw_next = *hw_p; qh 2398 drivers/usb/host/oxu210hp-hcd.c prev->qh = qh; qh 2399 drivers/usb/host/oxu210hp-hcd.c *hw_p = QH_NEXT(qh->qh_dma); qh 2402 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_LINKED; qh 2403 drivers/usb/host/oxu210hp-hcd.c qh_get(qh); qh 2406 drivers/usb/host/oxu210hp-hcd.c oxu_to_hcd(oxu)->self.bandwidth_allocated += qh->period qh 2407 drivers/usb/host/oxu210hp-hcd.c ? ((qh->usecs + qh->c_usecs) / qh->period) qh 2408 drivers/usb/host/oxu210hp-hcd.c : (qh->usecs * 8); qh 2417 drivers/usb/host/oxu210hp-hcd.c static void qh_unlink_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2431 drivers/usb/host/oxu210hp-hcd.c period = qh->period; qh 2435 drivers/usb/host/oxu210hp-hcd.c for (i = qh->start; i < oxu->periodic_size; i += period) qh 2436 drivers/usb/host/oxu210hp-hcd.c periodic_unlink(oxu, i, qh); qh 2439 drivers/usb/host/oxu210hp-hcd.c oxu_to_hcd(oxu)->self.bandwidth_allocated -= qh->period qh 2440 drivers/usb/host/oxu210hp-hcd.c ? ((qh->usecs + qh->c_usecs) / qh->period) qh 2441 drivers/usb/host/oxu210hp-hcd.c : (qh->usecs * 8); qh 2443 drivers/usb/host/oxu210hp-hcd.c dev_dbg(&qh->dev->dev, qh 2445 drivers/usb/host/oxu210hp-hcd.c qh->period, qh 2446 drivers/usb/host/oxu210hp-hcd.c le32_to_cpup(&qh->hw_info2) & (QH_CMASK | QH_SMASK), qh 2447 drivers/usb/host/oxu210hp-hcd.c qh, qh->start, qh->usecs, qh->c_usecs); qh 2450 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_UNLINK; qh 2451 drivers/usb/host/oxu210hp-hcd.c qh->qh_next.ptr = NULL; qh 2452 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); qh 2460 drivers/usb/host/oxu210hp-hcd.c static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2464 drivers/usb/host/oxu210hp-hcd.c qh_unlink_periodic(oxu, qh); qh 2471 drivers/usb/host/oxu210hp-hcd.c if (list_empty(&qh->qtd_list) qh 2472 drivers/usb/host/oxu210hp-hcd.c || (cpu_to_le32(QH_CMASK) & qh->hw_info2) != 0) qh 2478 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_IDLE; qh 2479 drivers/usb/host/oxu210hp-hcd.c qh->hw_next = EHCI_LIST_END; qh 2527 drivers/usb/host/oxu210hp-hcd.c const struct ehci_qh *qh, __le32 *c_maskp) qh 2531 drivers/usb/host/oxu210hp-hcd.c if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ qh 2534 drivers/usb/host/oxu210hp-hcd.c if (!check_period(oxu, frame, uframe, qh->period, qh->usecs)) qh 2536 drivers/usb/host/oxu210hp-hcd.c if (!qh->c_usecs) { qh 2549 drivers/usb/host/oxu210hp-hcd.c static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2556 drivers/usb/host/oxu210hp-hcd.c qh_refresh(oxu, qh); qh 2557 drivers/usb/host/oxu210hp-hcd.c qh->hw_next = EHCI_LIST_END; qh 2558 drivers/usb/host/oxu210hp-hcd.c frame = qh->start; qh 2561 drivers/usb/host/oxu210hp-hcd.c if (frame < qh->period) { qh 2562 drivers/usb/host/oxu210hp-hcd.c uframe = ffs(le32_to_cpup(&qh->hw_info2) & QH_SMASK); qh 2564 drivers/usb/host/oxu210hp-hcd.c qh, &c_mask); qh 2576 drivers/usb/host/oxu210hp-hcd.c if (qh->period) { qh 2577 drivers/usb/host/oxu210hp-hcd.c frame = qh->period - 1; qh 2581 drivers/usb/host/oxu210hp-hcd.c frame, uframe, qh, qh 2591 drivers/usb/host/oxu210hp-hcd.c status = check_intr_schedule(oxu, 0, 0, qh, &c_mask); qh 2595 drivers/usb/host/oxu210hp-hcd.c qh->start = frame; qh 2598 drivers/usb/host/oxu210hp-hcd.c qh->hw_info2 &= cpu_to_le32(~(QH_CMASK | QH_SMASK)); qh 2599 drivers/usb/host/oxu210hp-hcd.c qh->hw_info2 |= qh->period qh 2602 drivers/usb/host/oxu210hp-hcd.c qh->hw_info2 |= c_mask; qh 2604 drivers/usb/host/oxu210hp-hcd.c oxu_dbg(oxu, "reused qh %p schedule\n", qh); qh 2607 drivers/usb/host/oxu210hp-hcd.c status = qh_link_periodic(oxu, qh); qh 2617 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh; qh 2633 drivers/usb/host/oxu210hp-hcd.c qh = qh_append_tds(oxu, urb, &empty, epnum, &urb->ep->hcpriv); qh 2634 drivers/usb/host/oxu210hp-hcd.c if (qh == NULL) { qh 2638 drivers/usb/host/oxu210hp-hcd.c if (qh->qh_state == QH_STATE_IDLE) { qh 2639 drivers/usb/host/oxu210hp-hcd.c status = qh_schedule(oxu, qh); qh 2645 drivers/usb/host/oxu210hp-hcd.c qh = qh_append_tds(oxu, urb, qtd_list, epnum, &urb->ep->hcpriv); qh 2646 drivers/usb/host/oxu210hp-hcd.c BUG_ON(qh == NULL); qh 2717 drivers/usb/host/oxu210hp-hcd.c temp.qh = qh_get(q.qh); qh 2718 drivers/usb/host/oxu210hp-hcd.c type = Q_NEXT_TYPE(q.qh->hw_next); qh 2719 drivers/usb/host/oxu210hp-hcd.c q = q.qh->qh_next; qh 2720 drivers/usb/host/oxu210hp-hcd.c modified = qh_completions(oxu, temp.qh); qh 2721 drivers/usb/host/oxu210hp-hcd.c if (unlikely(list_empty(&temp.qh->qtd_list))) qh 2722 drivers/usb/host/oxu210hp-hcd.c intr_deschedule(oxu, temp.qh); qh 2723 drivers/usb/host/oxu210hp-hcd.c qh_put(temp.qh); qh 2825 drivers/usb/host/oxu210hp-hcd.c static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh) qh 2828 drivers/usb/host/oxu210hp-hcd.c if (qh->qh_state == QH_STATE_LINKED qh 2837 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_UNLINK_WAIT; qh 2838 drivers/usb/host/oxu210hp-hcd.c last->reclaim = qh; qh 2845 drivers/usb/host/oxu210hp-hcd.c if (qh->qh_state == QH_STATE_LINKED) qh 2846 drivers/usb/host/oxu210hp-hcd.c start_unlink_async(oxu, qh); qh 3044 drivers/usb/host/oxu210hp-hcd.c oxu->async->qh_next.qh = NULL; qh 3356 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh; qh 3364 drivers/usb/host/oxu210hp-hcd.c qh = (struct ehci_qh *) urb->hcpriv; qh 3365 drivers/usb/host/oxu210hp-hcd.c if (!qh) qh 3367 drivers/usb/host/oxu210hp-hcd.c unlink_async(oxu, qh); qh 3371 drivers/usb/host/oxu210hp-hcd.c qh = (struct ehci_qh *) urb->hcpriv; qh 3372 drivers/usb/host/oxu210hp-hcd.c if (!qh) qh 3374 drivers/usb/host/oxu210hp-hcd.c switch (qh->qh_state) { qh 3376 drivers/usb/host/oxu210hp-hcd.c intr_deschedule(oxu, qh); qh 3379 drivers/usb/host/oxu210hp-hcd.c qh_completions(oxu, qh); qh 3383 drivers/usb/host/oxu210hp-hcd.c qh, qh->qh_state); qh 3388 drivers/usb/host/oxu210hp-hcd.c if (!list_empty(&qh->qtd_list) qh 3392 drivers/usb/host/oxu210hp-hcd.c status = qh_schedule(oxu, qh); qh 3400 drivers/usb/host/oxu210hp-hcd.c "can't reschedule qh %p, err %d\n", qh, qh 3418 drivers/usb/host/oxu210hp-hcd.c struct ehci_qh *qh, *tmp; qh 3425 drivers/usb/host/oxu210hp-hcd.c qh = ep->hcpriv; qh 3426 drivers/usb/host/oxu210hp-hcd.c if (!qh) qh 3432 drivers/usb/host/oxu210hp-hcd.c if (qh->hw_info1 == 0) { qh 3438 drivers/usb/host/oxu210hp-hcd.c qh->qh_state = QH_STATE_IDLE; qh 3439 drivers/usb/host/oxu210hp-hcd.c switch (qh->qh_state) { qh 3441 drivers/usb/host/oxu210hp-hcd.c for (tmp = oxu->async->qh_next.qh; qh 3442 drivers/usb/host/oxu210hp-hcd.c tmp && tmp != qh; qh 3443 drivers/usb/host/oxu210hp-hcd.c tmp = tmp->qh_next.qh) qh 3448 drivers/usb/host/oxu210hp-hcd.c unlink_async(oxu, qh); qh 3456 drivers/usb/host/oxu210hp-hcd.c if (list_empty(&qh->qtd_list)) { qh 3457 drivers/usb/host/oxu210hp-hcd.c qh_put(qh); qh 3467 drivers/usb/host/oxu210hp-hcd.c qh, ep->desc.bEndpointAddress, qh->qh_state, qh 3468 drivers/usb/host/oxu210hp-hcd.c list_empty(&qh->qtd_list) ? "" : "(has tds)"); qh 3989 drivers/usb/host/oxu210hp-hcd.c if (oxu->async->qh_next.qh) qh 111 drivers/usb/host/uhci-debug.c out += sprintf(out, "qh [%p] ", urbp->qh); qh 128 drivers/usb/host/uhci-debug.c (urbp->qh->type == USB_ENDPOINT_XFER_CONTROL ? qh 140 drivers/usb/host/uhci-debug.c if (urbp->qh->type != USB_ENDPOINT_XFER_ISOC && qh 166 drivers/usb/host/uhci-debug.c struct uhci_qh *qh, char *buf, int len, int space) qh 170 drivers/usb/host/uhci-debug.c __hc32 element = qh_element(qh); qh 173 drivers/usb/host/uhci-debug.c switch (qh->type) { qh 182 drivers/usb/host/uhci-debug.c space, "", qh, qtype, qh 183 drivers/usb/host/uhci-debug.c hc32_to_cpu(uhci, qh->link), qh 185 drivers/usb/host/uhci-debug.c if (qh->type == USB_ENDPOINT_XFER_ISOC) qh 188 drivers/usb/host/uhci-debug.c space, "", qh->period, qh->phase, qh->load, qh 189 drivers/usb/host/uhci-debug.c qh->iso_frame, qh->iso_packet_desc); qh 190 drivers/usb/host/uhci-debug.c else if (qh->type == USB_ENDPOINT_XFER_INT) qh 192 drivers/usb/host/uhci-debug.c space, "", qh->period, qh->phase, qh->load); qh 211 drivers/usb/host/uhci-debug.c if (list_empty(&qh->queue)) { qh 213 drivers/usb/host/uhci-debug.c if (qh == uhci->skel_async_qh) { qh 220 drivers/usb/host/uhci-debug.c struct urb_priv *urbp = list_entry(qh->queue.next, qh 229 drivers/usb/host/uhci-debug.c list_for_each_entry(urbp, &qh->queue, node) { qh 247 drivers/usb/host/uhci-debug.c if (qh->dummy_td) { qh 249 drivers/usb/host/uhci-debug.c out += uhci_show_td(uhci, qh->dummy_td, out, qh 378 drivers/usb/host/uhci-debug.c struct uhci_qh *qh; qh 486 drivers/usb/host/uhci-debug.c qh = uhci->skelqh[i]; qh 488 drivers/usb/host/uhci-debug.c out += uhci_show_qh(uhci, qh, out, len - (out - buf), 4); qh 494 drivers/usb/host/uhci-debug.c if (qh_element(qh) != LINK_TO_TD(uhci, uhci->term_td)) { qh 506 drivers/usb/host/uhci-debug.c head = &qh->node; qh 510 drivers/usb/host/uhci-debug.c qh = list_entry(tmp, struct uhci_qh, node); qh 513 drivers/usb/host/uhci-debug.c out += uhci_show_qh(uhci, qh, out, qh 518 drivers/usb/host/uhci-debug.c if (!fsbr_link && qh->skel >= SKEL_FSBR) qh 519 drivers/usb/host/uhci-debug.c fsbr_link = LINK_TO_QH(uhci, qh); qh 534 drivers/usb/host/uhci-debug.c if (qh->link != link) qh 626 drivers/usb/host/uhci-debug.c struct uhci_qh *qh, char *buf, int len, int space) qh 774 drivers/usb/host/uhci-hcd.c struct uhci_qh *qh; qh 777 drivers/usb/host/uhci-hcd.c qh = (struct uhci_qh *) hep->hcpriv; qh 778 drivers/usb/host/uhci-hcd.c if (qh == NULL) qh 781 drivers/usb/host/uhci-hcd.c while (qh->state != QH_STATE_IDLE) { qh 785 drivers/usb/host/uhci-hcd.c qh->state == QH_STATE_IDLE); qh 790 drivers/usb/host/uhci-hcd.c uhci_free_qh(uhci, qh); qh 191 drivers/usb/host/uhci-hcd.h #define qh_element(qh) READ_ONCE((qh)->element) qh 193 drivers/usb/host/uhci-hcd.h #define LINK_TO_QH(uhci, qh) (UHCI_PTR_QH((uhci)) | \ qh 194 drivers/usb/host/uhci-hcd.h cpu_to_hc32((uhci), (qh)->dma_handle)) qh 488 drivers/usb/host/uhci-hcd.h struct uhci_qh *qh; /* QH for this URB */ qh 249 drivers/usb/host/uhci-q.c struct uhci_qh *qh; qh 251 drivers/usb/host/uhci-q.c qh = dma_pool_zalloc(uhci->qh_pool, GFP_ATOMIC, &dma_handle); qh 252 drivers/usb/host/uhci-q.c if (!qh) qh 255 drivers/usb/host/uhci-q.c qh->dma_handle = dma_handle; qh 257 drivers/usb/host/uhci-q.c qh->element = UHCI_PTR_TERM(uhci); qh 258 drivers/usb/host/uhci-q.c qh->link = UHCI_PTR_TERM(uhci); qh 260 drivers/usb/host/uhci-q.c INIT_LIST_HEAD(&qh->queue); qh 261 drivers/usb/host/uhci-q.c INIT_LIST_HEAD(&qh->node); qh 264 drivers/usb/host/uhci-q.c qh->type = usb_endpoint_type(&hep->desc); qh 265 drivers/usb/host/uhci-q.c if (qh->type != USB_ENDPOINT_XFER_ISOC) { qh 266 drivers/usb/host/uhci-q.c qh->dummy_td = uhci_alloc_td(uhci); qh 267 drivers/usb/host/uhci-q.c if (!qh->dummy_td) { qh 268 drivers/usb/host/uhci-q.c dma_pool_free(uhci->qh_pool, qh, dma_handle); qh 272 drivers/usb/host/uhci-q.c qh->state = QH_STATE_IDLE; qh 273 drivers/usb/host/uhci-q.c qh->hep = hep; qh 274 drivers/usb/host/uhci-q.c qh->udev = udev; qh 275 drivers/usb/host/uhci-q.c hep->hcpriv = qh; qh 277 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_INT || qh 278 drivers/usb/host/uhci-q.c qh->type == USB_ENDPOINT_XFER_ISOC) qh 279 drivers/usb/host/uhci-q.c qh->load = usb_calc_bus_time(udev->speed, qh 281 drivers/usb/host/uhci-q.c qh->type == USB_ENDPOINT_XFER_ISOC, qh 286 drivers/usb/host/uhci-q.c qh->state = QH_STATE_ACTIVE; qh 287 drivers/usb/host/uhci-q.c qh->type = -1; qh 289 drivers/usb/host/uhci-q.c return qh; qh 292 drivers/usb/host/uhci-q.c static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 294 drivers/usb/host/uhci-q.c WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); qh 295 drivers/usb/host/uhci-q.c if (!list_empty(&qh->queue)) qh 296 drivers/usb/host/uhci-q.c dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh); qh 298 drivers/usb/host/uhci-q.c list_del(&qh->node); qh 299 drivers/usb/host/uhci-q.c if (qh->udev) { qh 300 drivers/usb/host/uhci-q.c qh->hep->hcpriv = NULL; qh 301 drivers/usb/host/uhci-q.c if (qh->dummy_td) qh 302 drivers/usb/host/uhci-q.c uhci_free_td(uhci, qh->dummy_td); qh 304 drivers/usb/host/uhci-q.c dma_pool_free(uhci->qh_pool, qh, qh->dma_handle); qh 314 drivers/usb/host/uhci-q.c static int uhci_cleanup_queue(struct uhci_hcd *uhci, struct uhci_qh *qh, qh 325 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_ISOC) { qh 327 drivers/usb/host/uhci-q.c qh->unlink_frame); qh 334 drivers/usb/host/uhci-q.c if (qh->queue.next != &urbp->node) { qh 350 drivers/usb/host/uhci-q.c if (qh_element(qh) == UHCI_PTR_TERM(uhci)) qh 352 drivers/usb/host/uhci-q.c qh->element = UHCI_PTR_TERM(uhci); qh 355 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_CONTROL) qh 361 drivers/usb/host/uhci-q.c qh->needs_fixup = 1; qh 362 drivers/usb/host/uhci-q.c qh->initial_toggle = uhci_toggle(td_token(uhci, td)); qh 372 drivers/usb/host/uhci-q.c static void uhci_fixup_toggles(struct uhci_hcd *uhci, struct uhci_qh *qh, qh 377 drivers/usb/host/uhci-q.c unsigned int toggle = qh->initial_toggle; qh 383 drivers/usb/host/uhci-q.c urbp = list_entry(qh->queue.next, struct urb_priv, node); qh 387 drivers/usb/host/uhci-q.c else if (qh_element(qh) != UHCI_PTR_TERM(uhci)) qh 393 drivers/usb/host/uhci-q.c urbp = list_prepare_entry(urbp, &qh->queue, node); qh 394 drivers/usb/host/uhci-q.c list_for_each_entry_continue(urbp, &qh->queue, node) { qh 415 drivers/usb/host/uhci-q.c pipe = list_entry(qh->queue.next, struct urb_priv, node)->urb->pipe; qh 416 drivers/usb/host/uhci-q.c usb_settoggle(qh->udev, usb_pipeendpoint(pipe), qh 418 drivers/usb/host/uhci-q.c qh->needs_fixup = 0; qh 424 drivers/usb/host/uhci-q.c static inline void link_iso(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 426 drivers/usb/host/uhci-q.c list_add_tail(&qh->node, &uhci->skel_iso_qh->node); qh 435 drivers/usb/host/uhci-q.c static void link_interrupt(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 439 drivers/usb/host/uhci-q.c list_add_tail(&qh->node, &uhci->skelqh[qh->skel]->node); qh 441 drivers/usb/host/uhci-q.c pqh = list_entry(qh->node.prev, struct uhci_qh, node); qh 442 drivers/usb/host/uhci-q.c qh->link = pqh->link; qh 444 drivers/usb/host/uhci-q.c pqh->link = LINK_TO_QH(uhci, qh); qh 451 drivers/usb/host/uhci-q.c static void link_async(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 460 drivers/usb/host/uhci-q.c if (pqh->skel <= qh->skel) qh 463 drivers/usb/host/uhci-q.c list_add(&qh->node, &pqh->node); qh 466 drivers/usb/host/uhci-q.c qh->link = pqh->link; qh 468 drivers/usb/host/uhci-q.c link_to_new_qh = LINK_TO_QH(uhci, qh); qh 473 drivers/usb/host/uhci-q.c if (pqh->skel < SKEL_FSBR && qh->skel >= SKEL_FSBR) qh 480 drivers/usb/host/uhci-q.c static void uhci_activate_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 482 drivers/usb/host/uhci-q.c WARN_ON(list_empty(&qh->queue)); qh 486 drivers/usb/host/uhci-q.c if (qh_element(qh) == UHCI_PTR_TERM(uhci)) { qh 487 drivers/usb/host/uhci-q.c struct urb_priv *urbp = list_entry(qh->queue.next, qh 492 drivers/usb/host/uhci-q.c qh->element = LINK_TO_TD(uhci, td); qh 496 drivers/usb/host/uhci-q.c qh->wait_expired = 0; qh 497 drivers/usb/host/uhci-q.c qh->advance_jiffies = jiffies; qh 499 drivers/usb/host/uhci-q.c if (qh->state == QH_STATE_ACTIVE) qh 501 drivers/usb/host/uhci-q.c qh->state = QH_STATE_ACTIVE; qh 505 drivers/usb/host/uhci-q.c if (qh == uhci->next_qh) qh 506 drivers/usb/host/uhci-q.c uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, qh 508 drivers/usb/host/uhci-q.c list_del(&qh->node); qh 510 drivers/usb/host/uhci-q.c if (qh->skel == SKEL_ISO) qh 511 drivers/usb/host/uhci-q.c link_iso(uhci, qh); qh 512 drivers/usb/host/uhci-q.c else if (qh->skel < SKEL_ASYNC) qh 513 drivers/usb/host/uhci-q.c link_interrupt(uhci, qh); qh 515 drivers/usb/host/uhci-q.c link_async(uhci, qh); qh 521 drivers/usb/host/uhci-q.c static void unlink_interrupt(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 525 drivers/usb/host/uhci-q.c pqh = list_entry(qh->node.prev, struct uhci_qh, node); qh 526 drivers/usb/host/uhci-q.c pqh->link = qh->link; qh 533 drivers/usb/host/uhci-q.c static void unlink_async(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 536 drivers/usb/host/uhci-q.c __hc32 link_to_next_qh = qh->link; qh 538 drivers/usb/host/uhci-q.c pqh = list_entry(qh->node.prev, struct uhci_qh, node); qh 543 drivers/usb/host/uhci-q.c if (pqh->skel < SKEL_FSBR && qh->skel >= SKEL_FSBR) qh 551 drivers/usb/host/uhci-q.c static void uhci_unlink_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 553 drivers/usb/host/uhci-q.c if (qh->state == QH_STATE_UNLINKING) qh 555 drivers/usb/host/uhci-q.c WARN_ON(qh->state != QH_STATE_ACTIVE || !qh->udev); qh 556 drivers/usb/host/uhci-q.c qh->state = QH_STATE_UNLINKING; qh 559 drivers/usb/host/uhci-q.c if (qh->skel == SKEL_ISO) qh 561 drivers/usb/host/uhci-q.c else if (qh->skel < SKEL_ASYNC) qh 562 drivers/usb/host/uhci-q.c unlink_interrupt(uhci, qh); qh 564 drivers/usb/host/uhci-q.c unlink_async(uhci, qh); qh 567 drivers/usb/host/uhci-q.c qh->unlink_frame = uhci->frame_number; qh 574 drivers/usb/host/uhci-q.c if (qh == uhci->next_qh) qh 575 drivers/usb/host/uhci-q.c uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, qh 577 drivers/usb/host/uhci-q.c list_move_tail(&qh->node, &uhci->skel_unlink_qh->node); qh 586 drivers/usb/host/uhci-q.c static void uhci_make_qh_idle(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 588 drivers/usb/host/uhci-q.c WARN_ON(qh->state == QH_STATE_ACTIVE); qh 590 drivers/usb/host/uhci-q.c if (qh == uhci->next_qh) qh 591 drivers/usb/host/uhci-q.c uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, qh 593 drivers/usb/host/uhci-q.c list_move(&qh->node, &uhci->idle_qh_list); qh 594 drivers/usb/host/uhci-q.c qh->state = QH_STATE_IDLE; qh 597 drivers/usb/host/uhci-q.c if (qh->post_td) { qh 598 drivers/usb/host/uhci-q.c uhci_free_td(uhci, qh->post_td); qh 599 drivers/usb/host/uhci-q.c qh->post_td = NULL; qh 623 drivers/usb/host/uhci-q.c static int uhci_check_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 629 drivers/usb/host/uhci-q.c if (qh->phase >= 0) qh 630 drivers/usb/host/uhci-q.c minimax_load = uhci_highest_load(uhci, qh->phase, qh->period); qh 633 drivers/usb/host/uhci-q.c int max_phase = min_t(int, MAX_PHASE, qh->period); qh 635 drivers/usb/host/uhci-q.c qh->phase = 0; qh 636 drivers/usb/host/uhci-q.c minimax_load = uhci_highest_load(uhci, qh->phase, qh->period); qh 638 drivers/usb/host/uhci-q.c load = uhci_highest_load(uhci, phase, qh->period); qh 641 drivers/usb/host/uhci-q.c qh->phase = phase; qh 647 drivers/usb/host/uhci-q.c if (minimax_load + qh->load > 900) { qh 650 drivers/usb/host/uhci-q.c qh->period, qh->phase, minimax_load, qh->load); qh 659 drivers/usb/host/uhci-q.c static void uhci_reserve_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 662 drivers/usb/host/uhci-q.c int load = qh->load; qh 665 drivers/usb/host/uhci-q.c for (i = qh->phase; i < MAX_PHASE; i += qh->period) { qh 671 drivers/usb/host/uhci-q.c switch (qh->type) { qh 681 drivers/usb/host/uhci-q.c qh->bandwidth_reserved = 1; qh 684 drivers/usb/host/uhci-q.c "reserve", qh->udev->devnum, qh 685 drivers/usb/host/uhci-q.c qh->hep->desc.bEndpointAddress, p, qh 686 drivers/usb/host/uhci-q.c qh->period, qh->phase, load); qh 692 drivers/usb/host/uhci-q.c static void uhci_release_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 695 drivers/usb/host/uhci-q.c int load = qh->load; qh 698 drivers/usb/host/uhci-q.c for (i = qh->phase; i < MAX_PHASE; i += qh->period) { qh 704 drivers/usb/host/uhci-q.c switch (qh->type) { qh 714 drivers/usb/host/uhci-q.c qh->bandwidth_reserved = 0; qh 717 drivers/usb/host/uhci-q.c "release", qh->udev->devnum, qh 718 drivers/usb/host/uhci-q.c qh->hep->desc.bEndpointAddress, p, qh 719 drivers/usb/host/uhci-q.c qh->period, qh->phase, load); qh 790 drivers/usb/host/uhci-q.c struct uhci_qh *qh) qh 794 drivers/usb/host/uhci-q.c int maxsze = usb_endpoint_maxp(&qh->hep->desc); qh 812 drivers/usb/host/uhci-q.c td = qh->dummy_td; qh 888 drivers/usb/host/uhci-q.c qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); qh 889 drivers/usb/host/uhci-q.c qh->dummy_td = td; qh 902 drivers/usb/host/uhci-q.c if (qh->state != QH_STATE_ACTIVE) qh 903 drivers/usb/host/uhci-q.c qh->skel = skel; qh 908 drivers/usb/host/uhci-q.c uhci_remove_td_from_urbp(qh->dummy_td); qh 916 drivers/usb/host/uhci-q.c struct uhci_qh *qh) qh 920 drivers/usb/host/uhci-q.c int maxsze = usb_endpoint_maxp(&qh->hep->desc); qh 963 drivers/usb/host/uhci-q.c td = qh->dummy_td; qh 1043 drivers/usb/host/uhci-q.c qh->dummy_td->status |= cpu_to_hc32(uhci, TD_CTRL_ACTIVE); qh 1044 drivers/usb/host/uhci-q.c qh->dummy_td = td; qh 1052 drivers/usb/host/uhci-q.c uhci_remove_td_from_urbp(qh->dummy_td); qh 1057 drivers/usb/host/uhci-q.c struct uhci_qh *qh) qh 1065 drivers/usb/host/uhci-q.c if (qh->state != QH_STATE_ACTIVE) qh 1066 drivers/usb/host/uhci-q.c qh->skel = SKEL_BULK; qh 1067 drivers/usb/host/uhci-q.c ret = uhci_submit_common(uhci, urb, qh); qh 1074 drivers/usb/host/uhci-q.c struct uhci_qh *qh) qh 1083 drivers/usb/host/uhci-q.c if (!qh->bandwidth_reserved) { qh 1096 drivers/usb/host/uhci-q.c qh->period = 1 << exponent; qh 1097 drivers/usb/host/uhci-q.c qh->skel = SKEL_INDEX(exponent); qh 1102 drivers/usb/host/uhci-q.c qh->phase = (qh->period / 2) & (MAX_PHASE - 1); qh 1103 drivers/usb/host/uhci-q.c ret = uhci_check_bandwidth(uhci, qh); qh 1107 drivers/usb/host/uhci-q.c } else if (qh->period > urb->interval) qh 1110 drivers/usb/host/uhci-q.c ret = uhci_submit_common(uhci, urb, qh); qh 1112 drivers/usb/host/uhci-q.c urb->interval = qh->period; qh 1113 drivers/usb/host/uhci-q.c if (!qh->bandwidth_reserved) qh 1114 drivers/usb/host/uhci-q.c uhci_reserve_bandwidth(uhci, qh); qh 1123 drivers/usb/host/uhci-q.c struct uhci_qh *qh, struct urb_priv *urbp) qh 1130 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_CONTROL) { qh 1136 drivers/usb/host/uhci-q.c qh->element = LINK_TO_TD(uhci, td); qh 1145 drivers/usb/host/uhci-q.c qh->initial_toggle = qh 1146 drivers/usb/host/uhci-q.c uhci_toggle(td_token(uhci, qh->post_td)) ^ 1; qh 1147 drivers/usb/host/uhci-q.c uhci_fixup_toggles(uhci, qh, 1); qh 1150 drivers/usb/host/uhci-q.c td = qh->post_td; qh 1151 drivers/usb/host/uhci-q.c qh->element = td->link; qh 1173 drivers/usb/host/uhci-q.c struct uhci_qh *qh = urbp->qh; qh 1201 drivers/usb/host/uhci-q.c uhci_show_qh(uhci, urbp->qh, errbuf, qh 1212 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_CONTROL) { qh 1227 drivers/usb/host/uhci-q.c if (qh->post_td) qh 1228 drivers/usb/host/uhci-q.c uhci_free_td(uhci, qh->post_td); qh 1229 drivers/usb/host/uhci-q.c qh->post_td = td; qh 1240 drivers/usb/host/uhci-q.c qh->element = UHCI_PTR_TERM(uhci); qh 1241 drivers/usb/host/uhci-q.c qh->is_stopped = 1; qh 1242 drivers/usb/host/uhci-q.c qh->needs_fixup = (qh->type != USB_ENDPOINT_XFER_CONTROL); qh 1243 drivers/usb/host/uhci-q.c qh->initial_toggle = uhci_toggle(td_token(uhci, td)) ^ qh 1247 drivers/usb/host/uhci-q.c ret = uhci_fixup_short_transfer(uhci, qh, urbp); qh 1255 drivers/usb/host/uhci-q.c struct uhci_qh *qh) qh 1271 drivers/usb/host/uhci-q.c if (!qh->bandwidth_reserved) { qh 1272 drivers/usb/host/uhci-q.c qh->period = urb->interval; qh 1273 drivers/usb/host/uhci-q.c qh->phase = -1; /* Find the best phase */ qh 1274 drivers/usb/host/uhci-q.c i = uhci_check_bandwidth(uhci, qh); qh 1280 drivers/usb/host/uhci-q.c frame = qh->phase; qh 1283 drivers/usb/host/uhci-q.c frame += (next - frame + qh->period - 1) & -qh->period; qh 1285 drivers/usb/host/uhci-q.c } else if (qh->period != urb->interval) { qh 1292 drivers/usb/host/uhci-q.c if (list_empty(&qh->queue)) { qh 1293 drivers/usb/host/uhci-q.c frame = qh->iso_frame; qh 1297 drivers/usb/host/uhci-q.c lurb = list_entry(qh->queue.prev, qh 1309 drivers/usb/host/uhci-q.c frame += (next - frame + qh->period - 1) & qh 1310 drivers/usb/host/uhci-q.c -qh->period; qh 1318 drivers/usb/host/uhci-q.c qh->period)) qh 1322 drivers/usb/host/uhci-q.c qh->period, qh 1355 drivers/usb/host/uhci-q.c frame += qh->period; qh 1358 drivers/usb/host/uhci-q.c if (list_empty(&qh->queue)) { qh 1359 drivers/usb/host/uhci-q.c qh->iso_packet_desc = &urb->iso_frame_desc[0]; qh 1360 drivers/usb/host/uhci-q.c qh->iso_frame = urb->start_frame; qh 1363 drivers/usb/host/uhci-q.c qh->skel = SKEL_ISO; qh 1364 drivers/usb/host/uhci-q.c if (!qh->bandwidth_reserved) qh 1365 drivers/usb/host/uhci-q.c uhci_reserve_bandwidth(uhci, qh); qh 1373 drivers/usb/host/uhci-q.c struct uhci_qh *qh = urbp->qh; qh 1380 drivers/usb/host/uhci-q.c if (uhci_frame_before_eq(uhci->cur_iso_frame, qh->iso_frame)) qh 1383 drivers/usb/host/uhci-q.c uhci_remove_tds_from_frame(uhci, qh->iso_frame); qh 1394 drivers/usb/host/uhci-q.c qh->iso_packet_desc->actual_length = actlength; qh 1395 drivers/usb/host/uhci-q.c qh->iso_packet_desc->status = status; qh 1402 drivers/usb/host/uhci-q.c qh->iso_frame += qh->period; qh 1403 drivers/usb/host/uhci-q.c ++qh->iso_packet_desc; qh 1415 drivers/usb/host/uhci-q.c struct uhci_qh *qh; qh 1429 drivers/usb/host/uhci-q.c qh = urb->ep->hcpriv; qh 1431 drivers/usb/host/uhci-q.c qh = uhci_alloc_qh(uhci, urb->dev, urb->ep); qh 1432 drivers/usb/host/uhci-q.c if (!qh) qh 1435 drivers/usb/host/uhci-q.c urbp->qh = qh; qh 1437 drivers/usb/host/uhci-q.c switch (qh->type) { qh 1439 drivers/usb/host/uhci-q.c ret = uhci_submit_control(uhci, urb, qh); qh 1442 drivers/usb/host/uhci-q.c ret = uhci_submit_bulk(uhci, urb, qh); qh 1445 drivers/usb/host/uhci-q.c ret = uhci_submit_interrupt(uhci, urb, qh); qh 1449 drivers/usb/host/uhci-q.c ret = uhci_submit_isochronous(uhci, urb, qh); qh 1456 drivers/usb/host/uhci-q.c list_add_tail(&urbp->node, &qh->queue); qh 1462 drivers/usb/host/uhci-q.c if (qh->queue.next == &urbp->node && !qh->is_stopped) { qh 1463 drivers/usb/host/uhci-q.c uhci_activate_qh(uhci, qh); qh 1469 drivers/usb/host/uhci-q.c if (qh->state == QH_STATE_IDLE) qh 1470 drivers/usb/host/uhci-q.c uhci_make_qh_idle(uhci, qh); /* Reclaim unused QH */ qh 1485 drivers/usb/host/uhci-q.c struct uhci_qh *qh; qh 1493 drivers/usb/host/uhci-q.c qh = ((struct urb_priv *) urb->hcpriv)->qh; qh 1496 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_ISOC) { qh 1503 drivers/usb/host/uhci-q.c qh->unlink_frame = uhci->frame_number; qh 1506 drivers/usb/host/uhci-q.c uhci_unlink_qh(uhci, qh); qh 1516 drivers/usb/host/uhci-q.c static void uhci_giveback_urb(struct uhci_hcd *uhci, struct uhci_qh *qh, qh 1523 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_CONTROL) { qh 1533 drivers/usb/host/uhci-q.c else if (qh->type == USB_ENDPOINT_XFER_ISOC && qh 1534 drivers/usb/host/uhci-q.c urbp->node.prev == &qh->queue && qh 1535 drivers/usb/host/uhci-q.c urbp->node.next != &qh->queue) { qh 1539 drivers/usb/host/uhci-q.c qh->iso_packet_desc = &nurb->iso_frame_desc[0]; qh 1540 drivers/usb/host/uhci-q.c qh->iso_frame = nurb->start_frame; qh 1546 drivers/usb/host/uhci-q.c if (list_empty(&qh->queue) && qh->needs_fixup) { qh 1548 drivers/usb/host/uhci-q.c usb_pipeout(urb->pipe), qh->initial_toggle); qh 1549 drivers/usb/host/uhci-q.c qh->needs_fixup = 0; qh 1561 drivers/usb/host/uhci-q.c if (list_empty(&qh->queue)) { qh 1562 drivers/usb/host/uhci-q.c uhci_unlink_qh(uhci, qh); qh 1563 drivers/usb/host/uhci-q.c if (qh->bandwidth_reserved) qh 1564 drivers/usb/host/uhci-q.c uhci_release_bandwidth(uhci, qh); qh 1571 drivers/usb/host/uhci-q.c #define QH_FINISHED_UNLINKING(qh) \ qh 1572 drivers/usb/host/uhci-q.c (qh->state == QH_STATE_UNLINKING && \ qh 1573 drivers/usb/host/uhci-q.c uhci->frame_number + uhci->is_stopped != qh->unlink_frame) qh 1575 drivers/usb/host/uhci-q.c static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 1581 drivers/usb/host/uhci-q.c while (!list_empty(&qh->queue)) { qh 1582 drivers/usb/host/uhci-q.c urbp = list_entry(qh->queue.next, struct urb_priv, node); qh 1585 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_ISOC) qh 1595 drivers/usb/host/uhci-q.c if (QH_FINISHED_UNLINKING(qh)) qh 1596 drivers/usb/host/uhci-q.c qh->is_stopped = 1; qh 1597 drivers/usb/host/uhci-q.c else if (!qh->is_stopped) qh 1601 drivers/usb/host/uhci-q.c uhci_giveback_urb(uhci, qh, urb, status); qh 1608 drivers/usb/host/uhci-q.c if (QH_FINISHED_UNLINKING(qh)) qh 1609 drivers/usb/host/uhci-q.c qh->is_stopped = 1; qh 1610 drivers/usb/host/uhci-q.c else if (!qh->is_stopped) qh 1615 drivers/usb/host/uhci-q.c list_for_each_entry(urbp, &qh->queue, node) { qh 1622 drivers/usb/host/uhci-q.c if (!uhci_cleanup_queue(uhci, qh, urb)) { qh 1623 drivers/usb/host/uhci-q.c qh->is_stopped = 0; qh 1626 drivers/usb/host/uhci-q.c uhci_giveback_urb(uhci, qh, urb, 0); qh 1630 drivers/usb/host/uhci-q.c qh->is_stopped = 0; qh 1634 drivers/usb/host/uhci-q.c if (!list_empty(&qh->queue)) { qh 1635 drivers/usb/host/uhci-q.c if (qh->needs_fixup) qh 1636 drivers/usb/host/uhci-q.c uhci_fixup_toggles(uhci, qh, 0); qh 1641 drivers/usb/host/uhci-q.c urbp = list_entry(qh->queue.next, struct urb_priv, node); qh 1642 drivers/usb/host/uhci-q.c if (urbp->fsbr && qh->wait_expired) { qh 1649 drivers/usb/host/uhci-q.c uhci_activate_qh(uhci, qh); qh 1654 drivers/usb/host/uhci-q.c else if (QH_FINISHED_UNLINKING(qh)) qh 1655 drivers/usb/host/uhci-q.c uhci_make_qh_idle(uhci, qh); qh 1668 drivers/usb/host/uhci-q.c static int uhci_advance_check(struct uhci_hcd *uhci, struct uhci_qh *qh) qh 1675 drivers/usb/host/uhci-q.c if (qh->type == USB_ENDPOINT_XFER_ISOC) qh 1686 drivers/usb/host/uhci-q.c if (qh->state != QH_STATE_ACTIVE) { qh 1691 drivers/usb/host/uhci-q.c urbp = list_entry(qh->queue.next, struct urb_priv, node); qh 1697 drivers/usb/host/uhci-q.c qh->wait_expired = 0; qh 1698 drivers/usb/host/uhci-q.c qh->advance_jiffies = jiffies; qh 1705 drivers/usb/host/uhci-q.c if (qh->wait_expired) qh 1708 drivers/usb/host/uhci-q.c if (time_after(jiffies, qh->advance_jiffies + QH_WAIT_TIMEOUT)) { qh 1711 drivers/usb/host/uhci-q.c if (qh->post_td && qh_element(qh) == qh 1712 drivers/usb/host/uhci-q.c LINK_TO_TD(uhci, qh->post_td)) { qh 1713 drivers/usb/host/uhci-q.c qh->element = qh->post_td->link; qh 1714 drivers/usb/host/uhci-q.c qh->advance_jiffies = jiffies; qh 1719 drivers/usb/host/uhci-q.c qh->wait_expired = 1; qh 1726 drivers/usb/host/uhci-q.c uhci_unlink_qh(uhci, qh); qh 1744 drivers/usb/host/uhci-q.c struct uhci_qh *qh; qh 1764 drivers/usb/host/uhci-q.c while ((qh = uhci->next_qh) != uhci->skelqh[i]) { qh 1765 drivers/usb/host/uhci-q.c uhci->next_qh = list_entry(qh->node.next, qh 1768 drivers/usb/host/uhci-q.c if (uhci_advance_check(uhci, qh)) { qh 1769 drivers/usb/host/uhci-q.c uhci_scan_qh(uhci, qh); qh 1770 drivers/usb/host/uhci-q.c if (qh->state == QH_STATE_ACTIVE) { qh 1772 drivers/usb/host/uhci-q.c list_entry(qh->queue.next, struct urb_priv, node)); qh 38 drivers/usb/isp1760/isp1760-hcd.c typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh, qh 414 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh; qh 416 drivers/usb/isp1760/isp1760-hcd.c qh = kmem_cache_zalloc(qh_cachep, flags); qh 417 drivers/usb/isp1760/isp1760-hcd.c if (!qh) qh 420 drivers/usb/isp1760/isp1760-hcd.c INIT_LIST_HEAD(&qh->qh_list); qh 421 drivers/usb/isp1760/isp1760-hcd.c INIT_LIST_HEAD(&qh->qtd_list); qh 422 drivers/usb/isp1760/isp1760-hcd.c qh->slot = -1; qh 424 drivers/usb/isp1760/isp1760-hcd.c return qh; qh 427 drivers/usb/isp1760/isp1760-hcd.c static void qh_free(struct isp1760_qh *qh) qh 429 drivers/usb/isp1760/isp1760-hcd.c WARN_ON(!list_empty(&qh->qtd_list)); qh 430 drivers/usb/isp1760/isp1760-hcd.c WARN_ON(qh->slot > -1); qh 431 drivers/usb/isp1760/isp1760-hcd.c kmem_cache_free(qh_cachep, qh); qh 515 drivers/usb/isp1760/isp1760-hcd.c static int last_qtd_of_urb(struct isp1760_qtd *qtd, struct isp1760_qh *qh) qh 519 drivers/usb/isp1760/isp1760-hcd.c if (list_is_last(&qtd->qtd_list, &qh->qtd_list)) qh 535 drivers/usb/isp1760/isp1760-hcd.c static void create_ptd_atl(struct isp1760_qh *qh, qh 588 drivers/usb/isp1760/isp1760-hcd.c ptd->dw3 |= TO_DW3_PING(qh->ping); qh 597 drivers/usb/isp1760/isp1760-hcd.c ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle); qh 601 drivers/usb/isp1760/isp1760-hcd.c else if (last_qtd_of_urb(qtd, qh)) qh 610 drivers/usb/isp1760/isp1760-hcd.c static void transform_add_int(struct isp1760_qh *qh, qh 662 drivers/usb/isp1760/isp1760-hcd.c static void create_ptd_int(struct isp1760_qh *qh, qh 665 drivers/usb/isp1760/isp1760-hcd.c create_ptd_atl(qh, qtd, ptd); qh 666 drivers/usb/isp1760/isp1760-hcd.c transform_add_int(qh, qtd, ptd); qh 721 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qtd *qtd, struct isp1760_qh *qh, qh 730 drivers/usb/isp1760/isp1760-hcd.c WARN_ON(slots[slot].qh); qh 744 drivers/usb/isp1760/isp1760-hcd.c qh->slot = slot; qh 748 drivers/usb/isp1760/isp1760-hcd.c slots[slot].qh = qh; qh 753 drivers/usb/isp1760/isp1760-hcd.c skip_map &= ~(1 << qh->slot); qh 757 drivers/usb/isp1760/isp1760-hcd.c skip_map &= ~(1 << qh->slot); qh 768 drivers/usb/isp1760/isp1760-hcd.c static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh, qh 775 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry_safe(qtd, qtd_next, &qh->qtd_list, qtd_list) { qh 779 drivers/usb/isp1760/isp1760-hcd.c last_qtd = last_qtd_of_urb(qtd, qh); qh 831 drivers/usb/isp1760/isp1760-hcd.c static void enqueue_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh) qh 841 drivers/usb/isp1760/isp1760-hcd.c if (unlikely(list_empty(&qh->qtd_list))) { qh 847 drivers/usb/isp1760/isp1760-hcd.c if (qh->tt_buffer_dirty) qh 850 drivers/usb/isp1760/isp1760-hcd.c if (usb_pipeint(list_entry(qh->qtd_list.next, struct isp1760_qtd, qh 863 drivers/usb/isp1760/isp1760-hcd.c if (slots[curr_slot].qh == qh) qh 868 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list) { qh 894 drivers/usb/isp1760/isp1760-hcd.c create_ptd_int(qh, qtd, &ptd); qh 896 drivers/usb/isp1760/isp1760-hcd.c create_ptd_atl(qh, qtd, &ptd); qh 899 drivers/usb/isp1760/isp1760-hcd.c slots, qtd, qh, &ptd); qh 913 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh, *qh_next; qh 931 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list) { qh 932 drivers/usb/isp1760/isp1760-hcd.c collect_qtds(hcd, qh, &urb_list); qh 933 drivers/usb/isp1760/isp1760-hcd.c if (list_empty(&qh->qtd_list)) qh 934 drivers/usb/isp1760/isp1760-hcd.c list_del(&qh->qh_list); qh 970 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list) qh 971 drivers/usb/isp1760/isp1760-hcd.c enqueue_qtds(hcd, qh); qh 1072 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh; qh 1096 drivers/usb/isp1760/isp1760-hcd.c if (!slots[slot].qh) { qh 1111 drivers/usb/isp1760/isp1760-hcd.c if (!slots[slot].qh) { qh 1123 drivers/usb/isp1760/isp1760-hcd.c qh = slots[slot].qh; qh 1124 drivers/usb/isp1760/isp1760-hcd.c slots[slot].qh = NULL; qh 1125 drivers/usb/isp1760/isp1760-hcd.c qh->slot = -1; qh 1140 drivers/usb/isp1760/isp1760-hcd.c if (list_is_last(&qtd->qtd_list, &qh->qtd_list) || qh 1147 drivers/usb/isp1760/isp1760-hcd.c qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); qh 1148 drivers/usb/isp1760/isp1760-hcd.c qh->ping = FROM_DW3_PING(ptd.dw3); qh 1159 drivers/usb/isp1760/isp1760-hcd.c qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); qh 1160 drivers/usb/isp1760/isp1760-hcd.c qh->ping = FROM_DW3_PING(ptd.dw3); qh 1168 drivers/usb/isp1760/isp1760-hcd.c qh->tt_buffer_dirty = 1; qh 1172 drivers/usb/isp1760/isp1760-hcd.c qh->tt_buffer_dirty = 0; qh 1175 drivers/usb/isp1760/isp1760-hcd.c qh->toggle = 0; qh 1176 drivers/usb/isp1760/isp1760-hcd.c qh->ping = 0; qh 1191 drivers/usb/isp1760/isp1760-hcd.c create_ptd_int(qh, qtd, &ptd); qh 1194 drivers/usb/isp1760/isp1760-hcd.c create_ptd_atl(qh, qtd, &ptd); qh 1198 drivers/usb/isp1760/isp1760-hcd.c qh, &ptd); qh 1275 drivers/usb/isp1760/isp1760-hcd.c if (priv->atl_slots[slot].qh && time_after(jiffies, qh 1498 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh, *qhit; qh 1549 drivers/usb/isp1760/isp1760-hcd.c qh = urb->ep->hcpriv; qh 1550 drivers/usb/isp1760/isp1760-hcd.c if (qh) { qh 1553 drivers/usb/isp1760/isp1760-hcd.c if (qhit == qh) { qh 1559 drivers/usb/isp1760/isp1760-hcd.c list_add_tail(&qh->qh_list, ep_queue); qh 1561 drivers/usb/isp1760/isp1760-hcd.c qh = qh_alloc(GFP_ATOMIC); qh 1562 drivers/usb/isp1760/isp1760-hcd.c if (!qh) { qh 1568 drivers/usb/isp1760/isp1760-hcd.c list_add_tail(&qh->qh_list, ep_queue); qh 1569 drivers/usb/isp1760/isp1760-hcd.c urb->ep->hcpriv = qh; qh 1572 drivers/usb/isp1760/isp1760-hcd.c list_splice_tail(&new_qtds, &qh->qtd_list); qh 1581 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh) qh 1586 drivers/usb/isp1760/isp1760-hcd.c WARN_ON(qh->slot == -1); qh 1592 drivers/usb/isp1760/isp1760-hcd.c skip_map |= (1 << qh->slot); qh 1594 drivers/usb/isp1760/isp1760-hcd.c priv->atl_slots[qh->slot].qh = NULL; qh 1595 drivers/usb/isp1760/isp1760-hcd.c priv->atl_slots[qh->slot].qtd = NULL; qh 1598 drivers/usb/isp1760/isp1760-hcd.c skip_map |= (1 << qh->slot); qh 1600 drivers/usb/isp1760/isp1760-hcd.c priv->int_slots[qh->slot].qh = NULL; qh 1601 drivers/usb/isp1760/isp1760-hcd.c priv->int_slots[qh->slot].qtd = NULL; qh 1604 drivers/usb/isp1760/isp1760-hcd.c qh->slot = -1; qh 1611 drivers/usb/isp1760/isp1760-hcd.c static void dequeue_urb_from_qtd(struct usb_hcd *hcd, struct isp1760_qh *qh, qh 1619 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry_from(qtd, &qh->qtd_list, qtd_list) { qh 1625 drivers/usb/isp1760/isp1760-hcd.c if (last_qtd_of_urb(qtd, qh) && qh 1630 drivers/usb/isp1760/isp1760-hcd.c kill_transfer(hcd, urb, qh); qh 1635 drivers/usb/isp1760/isp1760-hcd.c qh->tt_buffer_dirty = 1; qh 1638 drivers/usb/isp1760/isp1760-hcd.c qh->tt_buffer_dirty = 0; qh 1647 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh; qh 1656 drivers/usb/isp1760/isp1760-hcd.c qh = urb->ep->hcpriv; qh 1657 drivers/usb/isp1760/isp1760-hcd.c if (!qh) { qh 1662 drivers/usb/isp1760/isp1760-hcd.c list_for_each_entry(qtd, &qh->qtd_list, qtd_list) qh 1664 drivers/usb/isp1760/isp1760-hcd.c dequeue_urb_from_qtd(hcd, qh, qtd); qh 1665 drivers/usb/isp1760/isp1760-hcd.c list_move(&qtd->qtd_list, &qh->qtd_list); qh 1682 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh, *qh_iter; qh 1687 drivers/usb/isp1760/isp1760-hcd.c qh = ep->hcpriv; qh 1688 drivers/usb/isp1760/isp1760-hcd.c if (!qh) qh 1691 drivers/usb/isp1760/isp1760-hcd.c WARN_ON(!list_empty(&qh->qtd_list)); qh 1695 drivers/usb/isp1760/isp1760-hcd.c if (qh_iter == qh) { qh 1700 drivers/usb/isp1760/isp1760-hcd.c qh_free(qh); qh 2123 drivers/usb/isp1760/isp1760-hcd.c struct isp1760_qh *qh = ep->hcpriv; qh 2126 drivers/usb/isp1760/isp1760-hcd.c if (!qh) qh 2130 drivers/usb/isp1760/isp1760-hcd.c qh->tt_buffer_dirty = 0; qh 31 drivers/usb/isp1760/isp1760-hcd.h struct isp1760_qh *qh; qh 176 drivers/usb/musb/musb_host.c static void musb_ep_set_qh(struct musb_hw_ep *ep, int is_in, struct musb_qh *qh) qh 179 drivers/usb/musb/musb_host.c ep->in_qh = qh; qh 181 drivers/usb/musb/musb_host.c ep->out_qh = qh; qh 196 drivers/usb/musb/musb_host.c musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) qh 200 drivers/usb/musb/musb_host.c struct urb *urb = next_urb(qh); qh 203 drivers/usb/musb/musb_host.c struct musb_hw_ep *hw_ep = qh->hw_ep; qh 207 drivers/usb/musb/musb_host.c qh->offset = 0; qh 208 drivers/usb/musb/musb_host.c qh->segsize = 0; qh 211 drivers/usb/musb/musb_host.c switch (qh->type) { qh 220 drivers/usb/musb/musb_host.c qh->iso_idx = 0; qh 221 drivers/usb/musb/musb_host.c qh->frame = 0; qh 234 drivers/usb/musb/musb_host.c musb_ep_set_qh(hw_ep, is_in, qh); qh 242 drivers/usb/musb/musb_host.c switch (qh->type) { qh 253 drivers/usb/musb/musb_host.c qh->frame = 0; qh 256 drivers/usb/musb/musb_host.c qh->frame = urb->start_frame; qh 290 drivers/usb/musb/musb_host.c static inline void musb_save_toggle(struct musb_qh *qh, int is_in, qh 293 drivers/usb/musb/musb_host.c void __iomem *epio = qh->hw_ep->regs; qh 306 drivers/usb/musb/musb_host.c usb_settoggle(urb->dev, qh->epnum, !is_in, csr ? 1 : 0); qh 319 drivers/usb/musb/musb_host.c struct musb_qh *qh = musb_ep_get_qh(hw_ep, is_in); qh 320 drivers/usb/musb/musb_host.c struct musb_hw_ep *ep = qh->hw_ep; qh 321 drivers/usb/musb/musb_host.c int ready = qh->is_ready; qh 327 drivers/usb/musb/musb_host.c switch (qh->type) { qh 330 drivers/usb/musb/musb_host.c musb_save_toggle(qh, is_in, urb); qh 338 drivers/usb/musb/musb_host.c qh->is_ready = 0; qh 340 drivers/usb/musb/musb_host.c qh->is_ready = ready; qh 345 drivers/usb/musb/musb_host.c if (list_empty(&qh->hep->urb_list)) { qh 365 drivers/usb/musb/musb_host.c qh->hep->hcpriv = NULL; qh 367 drivers/usb/musb/musb_host.c switch (qh->type) { qh 374 drivers/usb/musb/musb_host.c if (qh->mux == 1) { qh 375 drivers/usb/musb/musb_host.c head = qh->ring.prev; qh 376 drivers/usb/musb/musb_host.c list_del(&qh->ring); qh 377 drivers/usb/musb/musb_host.c kfree(qh); qh 378 drivers/usb/musb/musb_host.c qh = first_qh(head); qh 389 drivers/usb/musb/musb_host.c kfree(qh); qh 390 drivers/usb/musb/musb_host.c qh = NULL; qh 395 drivers/usb/musb/musb_host.c if (qh != NULL && qh->is_ready) { qh 397 drivers/usb/musb/musb_host.c hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh)); qh 398 drivers/usb/musb/musb_host.c musb_start_urb(musb, is_in, qh); qh 435 drivers/usb/musb/musb_host.c struct musb_qh *qh = hw_ep->in_qh; qh 442 drivers/usb/musb/musb_host.c urb->transfer_buffer, qh->offset, qh 455 drivers/usb/musb/musb_host.c d = urb->iso_frame_desc + qh->iso_idx; qh 473 drivers/usb/musb/musb_host.c done = (++qh->iso_idx >= urb->number_of_packets); qh 476 drivers/usb/musb/musb_host.c buf = buffer + qh->offset; qh 477 drivers/usb/musb/musb_host.c length = urb->transfer_buffer_length - qh->offset; qh 486 drivers/usb/musb/musb_host.c qh->offset += length; qh 490 drivers/usb/musb/musb_host.c || (rx_count < qh->maxpacket) qh 526 drivers/usb/musb/musb_host.c musb_rx_reinit(struct musb *musb, struct musb_qh *qh, u8 epnum) qh 565 drivers/usb/musb/musb_host.c musb_write_rxfunaddr(musb, epnum, qh->addr_reg); qh 566 drivers/usb/musb/musb_host.c musb_write_rxhubaddr(musb, epnum, qh->h_addr_reg); qh 567 drivers/usb/musb/musb_host.c musb_write_rxhubport(musb, epnum, qh->h_port_reg); qh 569 drivers/usb/musb/musb_host.c musb_writeb(musb->mregs, MUSB_FADDR, qh->addr_reg); qh 572 drivers/usb/musb/musb_host.c musb_writeb(ep->regs, MUSB_RXTYPE, qh->type_reg); qh 573 drivers/usb/musb/musb_host.c musb_writeb(ep->regs, MUSB_RXINTERVAL, qh->intv_reg); qh 579 drivers/usb/musb/musb_host.c qh->maxpacket | ((qh->hb_mult - 1) << 11)); qh 585 drivers/usb/musb/musb_host.c struct musb_hw_ep *hw_ep, struct musb_qh *qh, qh 591 drivers/usb/musb/musb_host.c u16 pkt_size = qh->maxpacket; qh 611 drivers/usb/musb/musb_host.c if (qh->hb_mult == 1 || (qh->hb_mult > 1 && qh 612 drivers/usb/musb/musb_host.c can_bulk_split(hw_ep->musb, qh->type))) qh 625 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 643 drivers/usb/musb/musb_host.c struct musb_hw_ep *hw_ep, struct musb_qh *qh, qh 647 drivers/usb/musb/musb_host.c u16 pkt_size = qh->maxpacket; qh 651 drivers/usb/musb/musb_host.c musb_tx_dma_set_mode_mentor(dma, hw_ep, qh, urb, offset, qh 654 drivers/usb/musb/musb_host.c musb_tx_dma_set_mode_cppi_tusb(dma, hw_ep, qh, urb, offset, qh 659 drivers/usb/musb/musb_host.c qh->segsize = length; qh 697 drivers/usb/musb/musb_host.c struct musb_qh *qh = musb_ep_get_qh(hw_ep, !is_out); qh 698 drivers/usb/musb/musb_host.c u16 packet_sz = qh->maxpacket; qh 706 drivers/usb/musb/musb_host.c qh->addr_reg, qh->epnum, is_out ? "out" : "in", qh 707 drivers/usb/musb/musb_host.c qh->h_addr_reg, qh->h_port_reg, qh 776 drivers/usb/musb/musb_host.c if (usb_gettoggle(urb->dev, qh->epnum, 1)) qh 795 drivers/usb/musb/musb_host.c musb_write_txfunaddr(musb, epnum, qh->addr_reg); qh 796 drivers/usb/musb/musb_host.c musb_write_txhubaddr(musb, epnum, qh->h_addr_reg); qh 797 drivers/usb/musb/musb_host.c musb_write_txhubport(musb, epnum, qh->h_port_reg); qh 800 drivers/usb/musb/musb_host.c musb_writeb(mbase, MUSB_FADDR, qh->addr_reg); qh 804 drivers/usb/musb/musb_host.c musb_writeb(epio, MUSB_TXTYPE, qh->type_reg); qh 805 drivers/usb/musb/musb_host.c if (can_bulk_split(musb, qh->type)) { qh 806 drivers/usb/musb/musb_host.c qh->hb_mult = hw_ep->max_packet_sz_tx qh 809 drivers/usb/musb/musb_host.c | ((qh->hb_mult) - 1) << 11); qh 812 drivers/usb/musb/musb_host.c qh->maxpacket | qh 813 drivers/usb/musb/musb_host.c ((qh->hb_mult - 1) << 11)); qh 815 drivers/usb/musb/musb_host.c musb_writeb(epio, MUSB_TXINTERVAL, qh->intv_reg); qh 817 drivers/usb/musb/musb_host.c musb_writeb(epio, MUSB_NAKLIMIT0, qh->intv_reg); qh 820 drivers/usb/musb/musb_host.c qh->type_reg); qh 823 drivers/usb/musb/musb_host.c if (can_bulk_split(musb, qh->type)) qh 830 drivers/usb/musb/musb_host.c hw_ep, qh, urb, offset, len)) qh 835 drivers/usb/musb/musb_host.c qh->segsize = load_count; qh 837 drivers/usb/musb/musb_host.c sg_miter_start(&qh->sg_miter, urb->sg, 1, qh 840 drivers/usb/musb/musb_host.c if (!sg_miter_next(&qh->sg_miter)) { qh 844 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 847 drivers/usb/musb/musb_host.c buf = qh->sg_miter.addr + urb->sg->offset + qh 850 drivers/usb/musb/musb_host.c qh->sg_miter.length); qh 852 drivers/usb/musb/musb_host.c qh->sg_miter.consumed = load_count; qh 853 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 866 drivers/usb/musb/musb_host.c musb_rx_reinit(musb, qh, epnum); qh 869 drivers/usb/musb/musb_host.c if (usb_gettoggle(urb->dev, qh->epnum, 0)) qh 874 drivers/usb/musb/musb_host.c if (qh->type == USB_ENDPOINT_XFER_INT) qh 895 drivers/usb/musb/musb_host.c qh->segsize = len; qh 909 drivers/usb/musb/musb_host.c qh->segsize); qh 1010 drivers/usb/musb/musb_host.c struct musb_qh *qh = hw_ep->in_qh; qh 1024 drivers/usb/musb/musb_host.c if (len < qh->maxpacket) { qh 1050 drivers/usb/musb/musb_host.c fifo_count = min_t(size_t, qh->maxpacket, qh 1088 drivers/usb/musb/musb_host.c struct musb_qh *qh = hw_ep->in_qh; qh 1093 drivers/usb/musb/musb_host.c urb = next_urb(qh); qh 1102 drivers/usb/musb/musb_host.c csr, qh, len, urb, musb->ep0_stage); qh 1230 drivers/usb/musb/musb_host.c struct musb_qh *qh = hw_ep->out_qh; qh 1231 drivers/usb/musb/musb_host.c struct urb *urb = next_urb(qh); qh 1267 drivers/usb/musb/musb_host.c if (USB_ENDPOINT_XFER_BULK == qh->type && qh->mux == 1 qh 1388 drivers/usb/musb/musb_host.c length = qh->segsize; qh 1389 drivers/usb/musb/musb_host.c qh->offset += length; qh 1394 drivers/usb/musb/musb_host.c d = urb->iso_frame_desc + qh->iso_idx; qh 1397 drivers/usb/musb/musb_host.c if (++qh->iso_idx >= urb->number_of_packets) { qh 1404 drivers/usb/musb/musb_host.c } else if (dma && urb->transfer_buffer_length == qh->offset) { qh 1408 drivers/usb/musb/musb_host.c if (qh->segsize < qh->maxpacket) qh 1410 drivers/usb/musb/musb_host.c else if (qh->offset == urb->transfer_buffer_length qh 1415 drivers/usb/musb/musb_host.c offset = qh->offset; qh 1434 drivers/usb/musb/musb_host.c urb->actual_length = qh->offset; qh 1438 drivers/usb/musb/musb_host.c if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb, qh 1456 drivers/usb/musb/musb_host.c if (length > qh->maxpacket) qh 1457 drivers/usb/musb/musb_host.c length = qh->maxpacket; qh 1467 drivers/usb/musb/musb_host.c if (!sg_miter_next(&qh->sg_miter)) { qh 1469 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 1473 drivers/usb/musb/musb_host.c length = min_t(u32, length, qh->sg_miter.length); qh 1474 drivers/usb/musb/musb_host.c musb_write_fifo(hw_ep, length, qh->sg_miter.addr); qh 1475 drivers/usb/musb/musb_host.c qh->sg_miter.consumed = length; qh 1476 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 1481 drivers/usb/musb/musb_host.c qh->segsize = length; qh 1492 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1502 drivers/usb/musb/musb_host.c buf = (void *)urb->iso_frame_desc[qh->iso_idx].offset + qh 1505 drivers/usb/musb/musb_host.c length = urb->iso_frame_desc[qh->iso_idx].length; qh 1511 drivers/usb/musb/musb_host.c return dma->channel_program(channel, qh->maxpacket, 0, qh 1517 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1563 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1578 drivers/usb/musb/musb_host.c d = urb->iso_frame_desc + qh->iso_idx; qh 1587 drivers/usb/musb/musb_host.c if (++qh->iso_idx >= urb->number_of_packets) { qh 1592 drivers/usb/musb/musb_host.c done = musb_rx_dma_iso_cppi41(dma, hw_ep, qh, qh 1601 drivers/usb/musb/musb_host.c || channel->actual_len < qh->maxpacket qh 1633 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1652 drivers/usb/musb/musb_host.c d = urb->iso_frame_desc + qh->iso_idx; qh 1683 drivers/usb/musb/musb_host.c > qh->maxpacket) qh 1704 drivers/usb/musb/musb_host.c if (qh->hb_mult == 1) qh 1713 drivers/usb/musb/musb_host.c done = dma->channel_program(channel, qh->maxpacket, qh 1733 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1742 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 1761 drivers/usb/musb/musb_host.c struct musb_qh *qh = hw_ep->in_qh; qh 1773 drivers/usb/musb/musb_host.c urb = next_urb(qh); qh 1813 drivers/usb/musb/musb_host.c if (USB_ENDPOINT_XFER_ISOC != qh->type) { qh 1825 drivers/usb/musb/musb_host.c && qh->mux == 1 qh 1907 drivers/usb/musb/musb_host.c done = musb_rx_dma_inventra_cppi41(c, hw_ep, qh, urb, xfer_len); qh 1941 drivers/usb/musb/musb_host.c qh->offset, qh 1944 drivers/usb/musb/musb_host.c if (musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh, urb, qh 1962 drivers/usb/musb/musb_host.c qh->use_sg = true; qh 1963 drivers/usb/musb/musb_host.c sg_miter_start(&qh->sg_miter, urb->sg, 1, qh 1967 drivers/usb/musb/musb_host.c if (qh->use_sg) { qh 1968 drivers/usb/musb/musb_host.c if (!sg_miter_next(&qh->sg_miter)) { qh 1970 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 1975 drivers/usb/musb/musb_host.c urb->transfer_buffer = qh->sg_miter.addr; qh 1977 drivers/usb/musb/musb_host.c qh->offset = 0x0; qh 1983 drivers/usb/musb/musb_host.c qh->sg_miter.consumed = received_len; qh 1984 drivers/usb/musb/musb_host.c sg_miter_stop(&qh->sg_miter); qh 1995 drivers/usb/musb/musb_host.c qh->offset += xfer_len; qh 1997 drivers/usb/musb/musb_host.c if (qh->use_sg) { qh 1998 drivers/usb/musb/musb_host.c qh->use_sg = false; qh 2015 drivers/usb/musb/musb_host.c struct musb_qh *qh, qh 2025 drivers/usb/musb/musb_host.c struct urb *urb = next_urb(qh); qh 2028 drivers/usb/musb/musb_host.c if (qh->type == USB_ENDPOINT_XFER_CONTROL) { qh 2061 drivers/usb/musb/musb_host.c diff -= (qh->maxpacket * qh->hb_mult); qh 2078 drivers/usb/musb/musb_host.c toggle = usb_gettoggle(urb->dev, qh->epnum, !is_in); qh 2081 drivers/usb/musb/musb_host.c if (!is_in && (qh->type == USB_ENDPOINT_XFER_BULK) && qh 2090 drivers/usb/musb/musb_host.c if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) { qh 2104 drivers/usb/musb/musb_host.c if (qh->dev) qh 2105 drivers/usb/musb/musb_host.c qh->intv_reg = qh 2106 drivers/usb/musb/musb_host.c (USB_SPEED_HIGH == qh->dev->speed) ? 8 : 4; qh 2111 drivers/usb/musb/musb_host.c musb_ep_xfertype_string(qh->type), qh 2112 drivers/usb/musb/musb_host.c qh->hb_mult, qh->maxpacket); qh 2117 drivers/usb/musb/musb_host.c qh->mux = 0; qh 2119 drivers/usb/musb/musb_host.c musb_dbg(musb, "qh %p periodic slot %d", qh, best_end); qh 2123 drivers/usb/musb/musb_host.c list_add_tail(&qh->ring, head); qh 2124 drivers/usb/musb/musb_host.c qh->mux = 1; qh 2126 drivers/usb/musb/musb_host.c qh->hw_ep = hw_ep; qh 2127 drivers/usb/musb/musb_host.c qh->hep->hcpriv = qh; qh 2129 drivers/usb/musb/musb_host.c musb_start_urb(musb, is_in, qh); qh 2141 drivers/usb/musb/musb_host.c struct musb_qh *qh; qh 2155 drivers/usb/musb/musb_host.c qh = ret ? NULL : hep->hcpriv; qh 2156 drivers/usb/musb/musb_host.c if (qh) qh 2157 drivers/usb/musb/musb_host.c urb->hcpriv = qh; qh 2168 drivers/usb/musb/musb_host.c if (qh || ret) qh 2177 drivers/usb/musb/musb_host.c qh = kzalloc(sizeof *qh, mem_flags); qh 2178 drivers/usb/musb/musb_host.c if (!qh) { qh 2185 drivers/usb/musb/musb_host.c qh->hep = hep; qh 2186 drivers/usb/musb/musb_host.c qh->dev = urb->dev; qh 2187 drivers/usb/musb/musb_host.c INIT_LIST_HEAD(&qh->ring); qh 2188 drivers/usb/musb/musb_host.c qh->is_ready = 1; qh 2190 drivers/usb/musb/musb_host.c qh->maxpacket = usb_endpoint_maxp(epd); qh 2191 drivers/usb/musb/musb_host.c qh->type = usb_endpoint_type(epd); qh 2197 drivers/usb/musb/musb_host.c qh->hb_mult = usb_endpoint_maxp_mult(epd); qh 2198 drivers/usb/musb/musb_host.c if (qh->hb_mult > 1) { qh 2199 drivers/usb/musb/musb_host.c int ok = (qh->type == USB_ENDPOINT_XFER_ISOC); qh 2207 drivers/usb/musb/musb_host.c musb_ep_xfertype_string(qh->type), qh 2208 drivers/usb/musb/musb_host.c qh->hb_mult, qh->maxpacket & 0x7ff); qh 2212 drivers/usb/musb/musb_host.c qh->maxpacket &= 0x7ff; qh 2215 drivers/usb/musb/musb_host.c qh->epnum = usb_endpoint_num(epd); qh 2218 drivers/usb/musb/musb_host.c qh->addr_reg = (u8) usb_pipedevice(urb->pipe); qh 2221 drivers/usb/musb/musb_host.c type_reg = (qh->type << 4) | qh->epnum; qh 2232 drivers/usb/musb/musb_host.c qh->type_reg = type_reg; qh 2235 drivers/usb/musb/musb_host.c switch (qh->type) { qh 2267 drivers/usb/musb/musb_host.c qh->intv_reg = interval; qh 2274 drivers/usb/musb/musb_host.c qh->h_addr_reg = (u8) parent->devnum; qh 2278 drivers/usb/musb/musb_host.c qh->h_port_reg = (u8) urb->dev->ttport; qh 2280 drivers/usb/musb/musb_host.c qh->h_addr_reg = qh 2283 drivers/usb/musb/musb_host.c qh->h_addr_reg |= 0x80; qh 2293 drivers/usb/musb/musb_host.c if (hep->hcpriv || !next_urb(qh)) { qh 2297 drivers/usb/musb/musb_host.c kfree(qh); qh 2298 drivers/usb/musb/musb_host.c qh = NULL; qh 2301 drivers/usb/musb/musb_host.c ret = musb_schedule(musb, qh, qh 2305 drivers/usb/musb/musb_host.c urb->hcpriv = qh; qh 2317 drivers/usb/musb/musb_host.c kfree(qh); qh 2328 drivers/usb/musb/musb_host.c static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh) qh 2330 drivers/usb/musb/musb_host.c struct musb_hw_ep *ep = qh->hw_ep; qh 2386 drivers/usb/musb/musb_host.c struct musb_qh *qh; qh 2398 drivers/usb/musb/musb_host.c qh = urb->hcpriv; qh 2399 drivers/usb/musb/musb_host.c if (!qh) qh 2414 drivers/usb/musb/musb_host.c if (!qh->is_ready qh 2415 drivers/usb/musb/musb_host.c || urb->urb_list.prev != &qh->hep->urb_list qh 2416 drivers/usb/musb/musb_host.c || musb_ep_get_qh(qh->hw_ep, is_in) != qh) { qh 2417 drivers/usb/musb/musb_host.c int ready = qh->is_ready; qh 2419 drivers/usb/musb/musb_host.c qh->is_ready = 0; qh 2421 drivers/usb/musb/musb_host.c qh->is_ready = ready; qh 2426 drivers/usb/musb/musb_host.c if (ready && list_empty(&qh->hep->urb_list)) { qh 2427 drivers/usb/musb/musb_host.c qh->hep->hcpriv = NULL; qh 2428 drivers/usb/musb/musb_host.c list_del(&qh->ring); qh 2429 drivers/usb/musb/musb_host.c kfree(qh); qh 2432 drivers/usb/musb/musb_host.c ret = musb_cleanup_urb(urb, qh); qh 2445 drivers/usb/musb/musb_host.c struct musb_qh *qh; qh 2450 drivers/usb/musb/musb_host.c qh = hep->hcpriv; qh 2451 drivers/usb/musb/musb_host.c if (qh == NULL) qh 2457 drivers/usb/musb/musb_host.c qh->is_ready = 0; qh 2458 drivers/usb/musb/musb_host.c if (musb_ep_get_qh(qh->hw_ep, is_in) == qh) { qh 2459 drivers/usb/musb/musb_host.c urb = next_urb(qh); qh 2466 drivers/usb/musb/musb_host.c musb_cleanup_urb(urb, qh); qh 2472 drivers/usb/musb/musb_host.c urb = next_urb(qh); qh 2474 drivers/usb/musb/musb_host.c musb_advance_schedule(musb, urb, qh->hw_ep, is_in); qh 2482 drivers/usb/musb/musb_host.c musb_giveback(musb, next_urb(qh), -ESHUTDOWN); qh 2485 drivers/usb/musb/musb_host.c list_del(&qh->ring); qh 2486 drivers/usb/musb/musb_host.c kfree(qh); qh 117 drivers/usb/musb/musb_host.h static inline struct urb *next_urb(struct musb_qh *qh) qh 121 drivers/usb/musb/musb_host.h if (!qh) qh 123 drivers/usb/musb/musb_host.h queue = &qh->hep->urb_list; qh 783 include/linux/vmw_vmci_defs.h struct vmci_queue_header *qh = (struct vmci_queue_header *)q_header; qh 784 include/linux/vmw_vmci_defs.h return vmci_q_read_pointer(&qh->producer_tail); qh 793 include/linux/vmw_vmci_defs.h struct vmci_queue_header *qh = (struct vmci_queue_header *)q_header; qh 794 include/linux/vmw_vmci_defs.h return vmci_q_read_pointer(&qh->consumer_head); qh 33 include/net/netfilter/nf_queue.h void nf_register_queue_handler(struct net *net, const struct nf_queue_handler *qh); qh 946 include/net/sch_generic.h static inline void qdisc_skb_head_init(struct qdisc_skb_head *qh) qh 948 include/net/sch_generic.h qh->head = NULL; qh 949 include/net/sch_generic.h qh->tail = NULL; qh 950 include/net/sch_generic.h qh->qlen = 0; qh 954 include/net/sch_generic.h struct qdisc_skb_head *qh) qh 956 include/net/sch_generic.h struct sk_buff *last = qh->tail; qh 961 include/net/sch_generic.h qh->tail = skb; qh 963 include/net/sch_generic.h qh->tail = skb; qh 964 include/net/sch_generic.h qh->head = skb; qh 966 include/net/sch_generic.h qh->qlen++; qh 977 include/net/sch_generic.h struct qdisc_skb_head *qh) qh 979 include/net/sch_generic.h skb->next = qh->head; qh 981 include/net/sch_generic.h if (!qh->head) qh 982 include/net/sch_generic.h qh->tail = skb; qh 983 include/net/sch_generic.h qh->head = skb; qh 984 include/net/sch_generic.h qh->qlen++; qh 987 include/net/sch_generic.h static inline struct sk_buff *__qdisc_dequeue_head(struct qdisc_skb_head *qh) qh 989 include/net/sch_generic.h struct sk_buff *skb = qh->head; qh 992 include/net/sch_generic.h qh->head = skb->next; qh 993 include/net/sch_generic.h qh->qlen--; qh 994 include/net/sch_generic.h if (qh->head == NULL) qh 995 include/net/sch_generic.h qh->tail = NULL; qh 1034 include/net/sch_generic.h struct qdisc_skb_head *qh, qh 1037 include/net/sch_generic.h struct sk_buff *skb = __qdisc_dequeue_head(qh); qh 1058 include/net/sch_generic.h const struct qdisc_skb_head *qh = &sch->q; qh 1060 include/net/sch_generic.h return qh->head; qh 1130 include/net/sch_generic.h static inline void __qdisc_reset_queue(struct qdisc_skb_head *qh) qh 1137 include/net/sch_generic.h if (qh->qlen) { qh 1138 include/net/sch_generic.h rtnl_kfree_skbs(qh->head, qh->tail); qh 1140 include/net/sch_generic.h qh->head = NULL; qh 1141 include/net/sch_generic.h qh->tail = NULL; qh 1142 include/net/sch_generic.h qh->qlen = 0; qh 34 net/netfilter/nf_queue.c void nf_register_queue_handler(struct net *net, const struct nf_queue_handler *qh) qh 38 net/netfilter/nf_queue.c rcu_assign_pointer(net->nf.queue_handler, qh); qh 119 net/netfilter/nf_queue.c const struct nf_queue_handler *qh; qh 122 net/netfilter/nf_queue.c qh = rcu_dereference(net->nf.queue_handler); qh 123 net/netfilter/nf_queue.c if (qh) qh 124 net/netfilter/nf_queue.c qh->nf_hook_drop(net); qh 163 net/netfilter/nf_queue.c const struct nf_queue_handler *qh; qh 168 net/netfilter/nf_queue.c qh = rcu_dereference(net->nf.queue_handler); qh 169 net/netfilter/nf_queue.c if (!qh) { qh 215 net/netfilter/nf_queue.c status = qh->outfn(entry, queuenum);