Lines Matching refs:qh
41 typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh,
661 struct isp1760_qh *qh;
663 qh = kmem_cache_zalloc(qh_cachep, flags);
664 if (!qh)
667 INIT_LIST_HEAD(&qh->qh_list);
668 INIT_LIST_HEAD(&qh->qtd_list);
669 qh->slot = -1;
671 return qh;
674 static void qh_free(struct isp1760_qh *qh)
676 WARN_ON(!list_empty(&qh->qtd_list));
677 WARN_ON(qh->slot > -1);
678 kmem_cache_free(qh_cachep, qh);
797 static int last_qtd_of_urb(struct isp1760_qtd *qtd, struct isp1760_qh *qh)
801 if (list_is_last(&qtd->qtd_list, &qh->qtd_list))
817 static void create_ptd_atl(struct isp1760_qh *qh,
869 ptd->dw3 |= TO_DW3_PING(qh->ping);
878 ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle);
882 else if (last_qtd_of_urb(qtd, qh))
891 static void transform_add_int(struct isp1760_qh *qh,
943 static void create_ptd_int(struct isp1760_qh *qh,
946 create_ptd_atl(qh, qtd, ptd);
947 transform_add_int(qh, qtd, ptd);
1002 struct isp1760_qtd *qtd, struct isp1760_qh *qh,
1012 WARN_ON(slots[slot].qh);
1034 qh->slot = slot;
1038 slots[slot].qh = qh;
1053 static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh,
1060 list_for_each_entry_safe(qtd, qtd_next, &qh->qtd_list, qtd_list) {
1064 last_qtd = last_qtd_of_urb(qtd, qh);
1116 static void enqueue_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh)
1128 if (unlikely(list_empty(&qh->qtd_list))) {
1134 if (qh->tt_buffer_dirty)
1137 if (usb_pipeint(list_entry(qh->qtd_list.next, struct isp1760_qtd,
1150 if (slots[curr_slot].qh == qh)
1155 list_for_each_entry(qtd, &qh->qtd_list, qtd_list) {
1180 create_ptd_int(qh, qtd, &ptd);
1182 create_ptd_atl(qh, qtd, &ptd);
1185 slots, qtd, qh, &ptd);
1199 struct isp1760_qh *qh, *qh_next;
1217 list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list) {
1218 collect_qtds(hcd, qh, &urb_list);
1219 if (list_empty(&qh->qtd_list))
1220 list_del(&qh->qh_list);
1256 list_for_each_entry_safe(qh, qh_next, ep_queue, qh_list)
1257 enqueue_qtds(hcd, qh);
1356 struct isp1760_qh *qh;
1380 if (!slots[slot].qh) {
1395 if (!slots[slot].qh) {
1407 qh = slots[slot].qh;
1408 slots[slot].qh = NULL;
1409 qh->slot = -1;
1424 if (list_is_last(&qtd->qtd_list, &qh->qtd_list) ||
1431 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3);
1432 qh->ping = FROM_DW3_PING(ptd.dw3);
1443 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3);
1444 qh->ping = FROM_DW3_PING(ptd.dw3);
1452 qh->tt_buffer_dirty = 1;
1456 qh->tt_buffer_dirty = 0;
1459 qh->toggle = 0;
1460 qh->ping = 0;
1475 create_ptd_int(qh, qtd, &ptd);
1478 create_ptd_atl(qh, qtd, &ptd);
1482 qh, &ptd);
1565 if (priv->atl_slots[slot].qh && time_after(jiffies,
1883 struct isp1760_qh *qh, *qhit;
1933 qh = urb->ep->hcpriv;
1934 if (qh) {
1937 if (qhit == qh) {
1943 list_add_tail(&qh->qh_list, ep_queue);
1945 qh = qh_alloc(GFP_ATOMIC);
1946 if (!qh) {
1952 list_add_tail(&qh->qh_list, ep_queue);
1953 urb->ep->hcpriv = qh;
1956 list_splice_tail(&new_qtds, &qh->qtd_list);
1965 struct isp1760_qh *qh)
1970 WARN_ON(qh->slot == -1);
1975 if (qh->slot != -1) {
1977 skip_map |= (1 << qh->slot);
1981 priv->atl_slots[qh->slot].qh = NULL;
1982 priv->atl_slots[qh->slot].qtd = NULL;
1984 if (qh->slot != -1) {
1986 skip_map |= (1 << qh->slot);
1989 priv->int_slots[qh->slot].qh = NULL;
1990 priv->int_slots[qh->slot].qtd = NULL;
1993 qh->slot = -1;
2000 static void dequeue_urb_from_qtd(struct usb_hcd *hcd, struct isp1760_qh *qh,
2008 list_for_each_entry_from(qtd, &qh->qtd_list, qtd_list) {
2014 if (last_qtd_of_urb(qtd, qh) &&
2019 kill_transfer(hcd, urb, qh);
2024 qh->tt_buffer_dirty = 1;
2027 qh->tt_buffer_dirty = 0;
2036 struct isp1760_qh *qh;
2045 qh = urb->ep->hcpriv;
2046 if (!qh) {
2051 list_for_each_entry(qtd, &qh->qtd_list, qtd_list)
2053 dequeue_urb_from_qtd(hcd, qh, qtd);
2054 list_move(&qtd->qtd_list, &qh->qtd_list);
2071 struct isp1760_qh *qh, *qh_iter;
2076 qh = ep->hcpriv;
2077 if (!qh)
2080 WARN_ON(!list_empty(&qh->qtd_list));
2084 if (qh_iter == qh) {
2089 qh_free(qh);
2489 struct isp1760_qh *qh = ep->hcpriv;
2492 if (!qh)
2496 qh->tt_buffer_dirty = 0;