Lines Matching defs:txs

150 	struct gem_txsoft *txs;
244 txs = &sc->sc_txsoft[i];
245 txs->txs_mbuf = NULL;
246 txs->txs_ndescs = 0;
248 &txs->txs_dmamap)) != 0) {
254 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);
660 struct gem_txsoft *txs;
677 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) {
679 if (txs->txs_ndescs != 0) {
680 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
682 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
683 if (txs->txs_mbuf != NULL) {
684 m_freem(txs->txs_mbuf);
685 txs->txs_mbuf = NULL;
688 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);
1106 struct gem_txsoft *txs;
1115 if ((txs = STAILQ_FIRST(&sc->sc_txfreeq)) == NULL) {
1143 error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap,
1154 txs->txs_dmamap, *m_head, txsegs, &nsegs,
1179 txs->txs_ndescs = 0;
1180 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
1184 txs->txs_ndescs = nsegs;
1185 txs->txs_firstdesc = sc->sc_txnext;
1186 nexttx = txs->txs_firstdesc;
1202 txs->txs_lastdesc = nexttx;
1210 sc->sc_txdescs[txs->txs_lastdesc].gd_flags |=
1220 sc->sc_txdescs[txs->txs_firstdesc].gd_flags |=
1224 sc->sc_txdescs[txs->txs_firstdesc].gd_flags |=
1228 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
1233 __func__, txs->txs_firstdesc, txs->txs_lastdesc,
1234 txs->txs_ndescs);
1237 STAILQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q);
1238 txs->txs_mbuf = *m_head;
1240 sc->sc_txnext = GEM_NEXTTX(txs->txs_lastdesc);
1241 sc->sc_txfree -= txs->txs_ndescs;
1411 struct gem_txsoft *txs;
1428 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) {
1431 printf(" txsoft %p transmit chain:\n", txs);
1432 for (i = txs->txs_firstdesc;; i = GEM_NEXTTX(i)) {
1440 if (i == txs->txs_lastdesc)
1455 CTR4(KTR_GEM, "%s: txs->txs_firstdesc = %d, "
1456 "txs->txs_lastdesc = %d, txlast = %d",
1457 __func__, txs->txs_firstdesc, txs->txs_lastdesc, txlast);
1459 if (txs->txs_firstdesc <= txs->txs_lastdesc) {
1460 if ((txlast >= txs->txs_firstdesc) &&
1461 (txlast <= txs->txs_lastdesc))
1465 if ((txlast >= txs->txs_firstdesc) ||
1466 (txlast <= txs->txs_lastdesc))
1475 sc->sc_txfree += txs->txs_ndescs;
1477 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
1479 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
1480 if (txs->txs_mbuf != NULL) {
1481 m_freem(txs->txs_mbuf);
1482 txs->txs_mbuf = NULL;
1485 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);