Lines Matching refs:tpd

1630 	struct he_tpd *tpd;  in __alloc_tpd()  local
1633 tpd = pci_pool_alloc(he_dev->tpd_pool, GFP_ATOMIC|GFP_DMA, &mapping); in __alloc_tpd()
1634 if (tpd == NULL) in __alloc_tpd()
1637 tpd->status = TPD_ADDR(mapping); in __alloc_tpd()
1638 tpd->reserved = 0; in __alloc_tpd()
1639 tpd->iovec[0].addr = 0; tpd->iovec[0].len = 0; in __alloc_tpd()
1640 tpd->iovec[1].addr = 0; tpd->iovec[1].len = 0; in __alloc_tpd()
1641 tpd->iovec[2].addr = 0; tpd->iovec[2].len = 0; in __alloc_tpd()
1643 return tpd; in __alloc_tpd()
1826 struct he_tpd *tpd; in he_service_tbrq() local
1840 tpd = NULL; in he_service_tbrq()
1843 tpd = __tpd; in he_service_tbrq()
1849 if (tpd == NULL) { in he_service_tbrq()
1857 he_mkcid(he_dev, tpd->vcc->vpi, tpd->vcc->vci)); in he_service_tbrq()
1858 if (tpd->vcc) in he_service_tbrq()
1859 wake_up(&HE_VCC(tpd->vcc)->tx_waitq); in he_service_tbrq()
1865 if (tpd->iovec[slot].addr) in he_service_tbrq()
1867 tpd->iovec[slot].addr, in he_service_tbrq()
1868 tpd->iovec[slot].len & TPD_LEN_MASK, in he_service_tbrq()
1870 if (tpd->iovec[slot].len & TPD_LST) in he_service_tbrq()
1875 if (tpd->skb) { /* && !TBRQ_MULTIPLE(he_dev->tbrq_head) */ in he_service_tbrq()
1876 if (tpd->vcc && tpd->vcc->pop) in he_service_tbrq()
1877 tpd->vcc->pop(tpd->vcc, tpd->skb); in he_service_tbrq()
1879 dev_kfree_skb_any(tpd->skb); in he_service_tbrq()
1883 if (tpd) in he_service_tbrq()
1884 pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status)); in he_service_tbrq()
2072 __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid) in __enqueue_tpd() argument
2077 tpd, cid, he_dev->tpdrq_tail); in __enqueue_tpd()
2106 if (tpd->iovec[slot].addr) in __enqueue_tpd()
2108 tpd->iovec[slot].addr, in __enqueue_tpd()
2109 tpd->iovec[slot].len & TPD_LEN_MASK, in __enqueue_tpd()
2112 if (tpd->skb) { in __enqueue_tpd()
2113 if (tpd->vcc->pop) in __enqueue_tpd()
2114 tpd->vcc->pop(tpd->vcc, tpd->skb); in __enqueue_tpd()
2116 dev_kfree_skb_any(tpd->skb); in __enqueue_tpd()
2117 atomic_inc(&tpd->vcc->stats->tx_err); in __enqueue_tpd()
2119 pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status)); in __enqueue_tpd()
2125 list_add_tail(&tpd->entry, &he_dev->outstanding_tpds); in __enqueue_tpd()
2126 he_dev->tpdrq_tail->tpd = TPD_ADDR(tpd->status); in __enqueue_tpd()
2355 struct he_tpd *tpd; in he_close() local
2446 tpd = __alloc_tpd(he_dev); in he_close()
2447 if (tpd == NULL) { in he_close()
2451 tpd->status |= TPD_EOS | TPD_INT; in he_close()
2452 tpd->skb = NULL; in he_close()
2453 tpd->vcc = vcc; in he_close()
2458 __enqueue_tpd(he_dev, tpd, cid); in he_close()
2513 struct he_tpd *tpd; in he_send() local
2546 tpd = __alloc_tpd(he_dev); in he_send()
2547 if (tpd == NULL) { in he_send()
2558 tpd->status |= TPD_CELLTYPE(TPD_USERCELL); in he_send()
2565 tpd->status |= TPD_CELLTYPE(pti); in he_send()
2567 tpd->status |= TPD_CLP; in he_send()
2573 tpd->iovec[slot].addr = pci_map_single(he_dev->pci_dev, skb->data, in he_send()
2575 tpd->iovec[slot].len = skb_headlen(skb); in he_send()
2582 tpd->vcc = vcc; in he_send()
2583 tpd->skb = NULL; /* not the last fragment in he_send()
2587 __enqueue_tpd(he_dev, tpd, cid); in he_send()
2588 tpd = __alloc_tpd(he_dev); in he_send()
2589 if (tpd == NULL) { in he_send()
2598 tpd->status |= TPD_USERCELL; in he_send()
2602 tpd->iovec[slot].addr = pci_map_single(he_dev->pci_dev, in he_send()
2605 tpd->iovec[slot].len = frag->size; in he_send()
2610 tpd->iovec[slot - 1].len |= TPD_LST; in he_send()
2612 tpd->address0 = pci_map_single(he_dev->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); in he_send()
2613 tpd->length0 = skb->len | TPD_LST; in he_send()
2615 tpd->status |= TPD_INT; in he_send()
2617 tpd->vcc = vcc; in he_send()
2618 tpd->skb = skb; in he_send()
2622 __enqueue_tpd(he_dev, tpd, cid); in he_send()