Lines Matching refs:tpd

112 static struct tpd *
115 struct tpd *t;
128 KASSERT(t != NULL, ("tpd botch"));
136 bzero(&t->tpd, sizeof(t->tpd));
137 t->tpd.addr = t->no << HE_REGS_TPD_ADDR;
149 hatm_free_tpd(struct hatm_softc *sc, struct tpd *tpd)
151 if (tpd->mbuf != NULL) {
152 bus_dmamap_unload(sc->tx_tag, tpd->map);
154 m_freem(tpd->mbuf);
155 tpd->mbuf = NULL;
159 SLIST_INSERT_HEAD(&sc->tpd_free, tpd, link);
160 TPD_CLR_USED(sc, tpd->no);
169 hatm_queue_tpds(struct hatm_softc *sc, u_int count, struct tpd **list,
213 sc->tpdrq.tpdrq[sc->tpdrq.tail].tpd =
232 struct tpd *first;
254 struct tpd *tpd;
255 struct tpd *tpd_list[HE_CONFIG_MAX_TPD_PER_PACKET];
291 tpd = arg->first;
293 tpd_list[tpd_cnt++] = tpd;
296 if ((tpd = hatm_alloc_tpd(arg->sc, M_NOWAIT)) == NULL)
299 tpd->cid = arg->first->cid;
300 tpd->tpd.addr |= arg->pti;
301 tpd_list[tpd_cnt++] = tpd;
310 tpd->tpd.bufs[n].addr = segs[i].ds_addr;
311 tpd->tpd.bufs[n].len = segs[i].ds_len;
313 DBG(arg->sc, TX, ("seg[%u]=tpd[%u,%u]=%x/%u", i,
314 tpd_cnt, n, tpd->tpd.bufs[n].addr, tpd->tpd.bufs[n].len));
317 tpd->tpd.bufs[n].len |= HE_REGM_TPD_LST;
335 tpd_list[tpd_cnt - 1]->tpd.addr |= HE_REGM_TPD_INTR;
359 struct tpd *tpd;
452 if ((tpd = hatm_alloc_tpd(sc, M_NOWAIT)) == NULL) {
458 tpd->cid = cid;
459 tpd->tpd.addr |= arg.pti;
460 arg.first = tpd;
464 error = bus_dmamap_load_mbuf(sc->tx_tag, tpd->map, m,
472 tpd->mbuf = NULL;
474 hatm_free_tpd(sc, tpd);
479 error = bus_dmamap_load_mbuf(sc->tx_tag, tpd->map, m,
486 hatm_free_tpd(sc, tpd);
491 hatm_free_tpd(sc, tpd);
503 hatm_tx_complete(struct hatm_softc *sc, struct tpd *tpd, uint32_t flags)
505 struct hevcc *vcc = sc->vccs[tpd->cid];
507 DBG(sc, TX, ("tx_complete cid=%#x flags=%#x", tpd->cid, flags));
514 hatm_tx_vcc_closed(sc, tpd->cid);
516 hatm_vcc_closed(sc, tpd->cid);
522 hatm_free_tpd(sc, tpd);
533 HE_VPI(tpd->cid), HE_VCI(tpd->cid), 0);
782 struct tpd *tpd_list[1];
806 tpd_list[0]->tpd.addr |= HE_REGM_TPD_EOS | HE_REGM_TPD_INTR;