Lines Matching refs:qh

39 typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh,
412 struct isp1760_qh *qh;
414 qh = kmem_cache_zalloc(qh_cachep, flags);
415 if (!qh)
418 INIT_LIST_HEAD(&qh->qh_list);
419 INIT_LIST_HEAD(&qh->qtd_list);
420 qh->slot = -1;
422 return qh;
425 static void qh_free(struct isp1760_qh *qh)
427 WARN_ON(!list_empty(&qh->qtd_list));
428 WARN_ON(qh->slot > -1);
429 kmem_cache_free(qh_cachep, qh);
513 static int last_qtd_of_urb(struct isp1760_qtd *qtd, struct isp1760_qh *qh)
517 if (list_is_last(&qtd->qtd_list, &qh->qtd_list))
533 static void create_ptd_atl(struct isp1760_qh *qh,
586 ptd->dw3 |= TO_DW3_PING(qh->ping);
595 ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle);
599 else if (last_qtd_of_urb(qtd, qh))
608 static void transform_add_int(struct isp1760_qh *qh,
660 static void create_ptd_int(struct isp1760_qh *qh,
663 create_ptd_atl(qh, qtd, ptd);
664 transform_add_int(qh, qtd, ptd);
719 struct isp1760_qtd *qtd, struct isp1760_qh *qh,
728 WARN_ON(slots[slot].qh);
742 qh->slot = slot;
746 slots[slot].qh = qh;
751 skip_map &= ~(1 << qh->slot);
755 skip_map &= ~(1 << qh->slot);
766 static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh,
773 list_for_each_entry_safe(qtd, qtd_next, &qh->qtd_list, qtd_list) {
777 last_qtd = last_qtd_of_urb(qtd, qh);
829 static void enqueue_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh)
839 if (unlikely(list_empty(&qh->qtd_list))) {
845 if (qh->tt_buffer_dirty)
848 if (usb_pipeint(list_entry(qh->qtd_list.next, struct isp1760_qtd,
861 if (slots[curr_slot].qh == qh)
866 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) {
892 create_ptd_int(qh, qtd, &ptd);
894 create_ptd_atl(qh, qtd, &ptd);
897 slots, qtd, qh, &ptd);
911 struct isp1760_qh *qh, *qh_next;
929 list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list) {
930 collect_qtds(hcd, qh, &urb_list);
931 if (list_empty(&qh->qtd_list))
932 list_del(&qh->qh_list);
968 list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list)
969 enqueue_qtds(hcd, qh);
1068 struct isp1760_qh *qh;
1092 if (!slots[slot].qh) {
1107 if (!slots[slot].qh) {
1119 qh = slots[slot].qh;
1120 slots[slot].qh = NULL;
1121 qh->slot = -1;
1136 if (list_is_last(&qtd->qtd_list, &qh->qtd_list) ||
1143 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3);
1144 qh->ping = FROM_DW3_PING(ptd.dw3);
1155 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3);
1156 qh->ping = FROM_DW3_PING(ptd.dw3);
1164 qh->tt_buffer_dirty = 1;
1168 qh->tt_buffer_dirty = 0;
1171 qh->toggle = 0;
1172 qh->ping = 0;
1187 create_ptd_int(qh, qtd, &ptd);
1190 create_ptd_atl(qh, qtd, &ptd);
1194 qh, &ptd);
1271 if (priv->atl_slots[slot].qh && time_after(jiffies,
1494 struct isp1760_qh *qh, *qhit;
1545 qh = urb->ep->hcpriv;
1546 if (qh) {
1549 if (qhit == qh) {
1555 list_add_tail(&qh->qh_list, ep_queue);
1557 qh = qh_alloc(GFP_ATOMIC);
1558 if (!qh) {
1564 list_add_tail(&qh->qh_list, ep_queue);
1565 urb->ep->hcpriv = qh;
1568 list_splice_tail(&new_qtds, &qh->qtd_list);
1577 struct isp1760_qh *qh)
1582 WARN_ON(qh->slot == -1);
1588 skip_map |= (1 << qh->slot);
1590 priv->atl_slots[qh->slot].qh = NULL;
1591 priv->atl_slots[qh->slot].qtd = NULL;
1594 skip_map |= (1 << qh->slot);
1596 priv->int_slots[qh->slot].qh = NULL;
1597 priv->int_slots[qh->slot].qtd = NULL;
1600 qh->slot = -1;
1607 static void dequeue_urb_from_qtd(struct usb_hcd *hcd, struct isp1760_qh *qh,
1615 list_for_each_entry_from(qtd, &qh->qtd_list, qtd_list) {
1621 if (last_qtd_of_urb(qtd, qh) &&
1626 kill_transfer(hcd, urb, qh);
1631 qh->tt_buffer_dirty = 1;
1634 qh->tt_buffer_dirty = 0;
1643 struct isp1760_qh *qh;
1652 qh = urb->ep->hcpriv;
1653 if (!qh) {
1658 list_for_each_entry(qtd, &qh->qtd_list, qtd_list)
1660 dequeue_urb_from_qtd(hcd, qh, qtd);
1661 list_move(&qtd->qtd_list, &qh->qtd_list);
1678 struct isp1760_qh *qh, *qh_iter;
1683 qh = ep->hcpriv;
1684 if (!qh)
1687 WARN_ON(!list_empty(&qh->qtd_list));
1691 if (qh_iter == qh) {
1696 qh_free(qh);
2119 struct isp1760_qh *qh = ep->hcpriv;
2122 if (!qh)
2126 qh->tt_buffer_dirty = 0;