Lines Matching defs:tpd

111 static struct tpd *
114 struct tpd *t;
127 KASSERT(t != NULL, ("tpd botch"));
135 bzero(&t->tpd, sizeof(t->tpd));
136 t->tpd.addr = t->no << HE_REGS_TPD_ADDR;
148 hatm_free_tpd(struct hatm_softc *sc, struct tpd *tpd)
150 if (tpd->mbuf != NULL) {
151 bus_dmamap_unload(sc->tx_tag, tpd->map);
153 m_freem(tpd->mbuf);
154 tpd->mbuf = NULL;
158 SLIST_INSERT_HEAD(&sc->tpd_free, tpd, link);
159 TPD_CLR_USED(sc, tpd->no);
168 hatm_queue_tpds(struct hatm_softc *sc, u_int count, struct tpd **list,
212 sc->tpdrq.tpdrq[sc->tpdrq.tail].tpd =
231 struct tpd *first;
253 struct tpd *tpd;
254 struct tpd *tpd_list[HE_CONFIG_MAX_TPD_PER_PACKET];
290 tpd = arg->first;
292 tpd_list[tpd_cnt++] = tpd;
295 if ((tpd = hatm_alloc_tpd(arg->sc, M_NOWAIT)) == NULL)
298 tpd->cid = arg->first->cid;
299 tpd->tpd.addr |= arg->pti;
300 tpd_list[tpd_cnt++] = tpd;
309 tpd->tpd.bufs[n].addr = segs[i].ds_addr;
310 tpd->tpd.bufs[n].len = segs[i].ds_len;
312 DBG(arg->sc, TX, ("seg[%u]=tpd[%u,%u]=%x/%u", i,
313 tpd_cnt, n, tpd->tpd.bufs[n].addr, tpd->tpd.bufs[n].len));
316 tpd->tpd.bufs[n].len |= HE_REGM_TPD_LST;
334 tpd_list[tpd_cnt - 1]->tpd.addr |= HE_REGM_TPD_INTR;
358 struct tpd *tpd;
451 if ((tpd = hatm_alloc_tpd(sc, M_NOWAIT)) == NULL) {
457 tpd->cid = cid;
458 tpd->tpd.addr |= arg.pti;
459 arg.first = tpd;
463 error = bus_dmamap_load_mbuf(sc->tx_tag, tpd->map, m,
471 tpd->mbuf = NULL;
473 hatm_free_tpd(sc, tpd);
478 error = bus_dmamap_load_mbuf(sc->tx_tag, tpd->map, m,
485 hatm_free_tpd(sc, tpd);
490 hatm_free_tpd(sc, tpd);
502 hatm_tx_complete(struct hatm_softc *sc, struct tpd *tpd, uint32_t flags)
504 struct hevcc *vcc = sc->vccs[tpd->cid];
506 DBG(sc, TX, ("tx_complete cid=%#x flags=%#x", tpd->cid, flags));
513 hatm_tx_vcc_closed(sc, tpd->cid);
515 hatm_vcc_closed(sc, tpd->cid);
521 hatm_free_tpd(sc, tpd);
532 HE_VPI(tpd->cid), HE_VCI(tpd->cid), 0);
781 struct tpd *tpd_list[1];
805 tpd_list[0]->tpd.addr |= HE_REGM_TPD_EOS | HE_REGM_TPD_INTR;