Lines Matching full:txs
145 struct gem_txsoft *txs; in gem_attach() local
236 txs = &sc->sc_txsoft[i]; in gem_attach()
237 txs->txs_mbuf = NULL; in gem_attach()
238 txs->txs_ndescs = 0; in gem_attach()
240 &txs->txs_dmamap)) != 0) { in gem_attach()
246 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in gem_attach()
636 struct gem_txsoft *txs; in gem_stop() local
653 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) { in gem_stop()
655 if (txs->txs_ndescs != 0) { in gem_stop()
656 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in gem_stop()
658 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in gem_stop()
659 if (txs->txs_mbuf != NULL) { in gem_stop()
660 m_freem(txs->txs_mbuf); in gem_stop()
661 txs->txs_mbuf = NULL; in gem_stop()
664 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in gem_stop()
1074 struct gem_txsoft *txs; in gem_load_txmbuf() local
1083 if ((txs = STAILQ_FIRST(&sc->sc_txfreeq)) == NULL) { in gem_load_txmbuf()
1111 error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap, in gem_load_txmbuf()
1122 txs->txs_dmamap, *m_head, txsegs, &nsegs, in gem_load_txmbuf()
1147 txs->txs_ndescs = 0; in gem_load_txmbuf()
1148 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in gem_load_txmbuf()
1152 txs->txs_ndescs = nsegs; in gem_load_txmbuf()
1153 txs->txs_firstdesc = sc->sc_txnext; in gem_load_txmbuf()
1154 nexttx = txs->txs_firstdesc; in gem_load_txmbuf()
1167 txs->txs_lastdesc = nexttx; in gem_load_txmbuf()
1175 sc->sc_txdescs[txs->txs_lastdesc].gd_flags |= in gem_load_txmbuf()
1185 sc->sc_txdescs[txs->txs_firstdesc].gd_flags |= in gem_load_txmbuf()
1188 sc->sc_txdescs[txs->txs_firstdesc].gd_flags |= in gem_load_txmbuf()
1192 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in gem_load_txmbuf()
1197 __func__, txs->txs_firstdesc, txs->txs_lastdesc, in gem_load_txmbuf()
1198 txs->txs_ndescs); in gem_load_txmbuf()
1201 STAILQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q); in gem_load_txmbuf()
1202 txs->txs_mbuf = *m_head; in gem_load_txmbuf()
1204 sc->sc_txnext = GEM_NEXTTX(txs->txs_lastdesc); in gem_load_txmbuf()
1205 sc->sc_txfree -= txs->txs_ndescs; in gem_load_txmbuf()
1375 struct gem_txsoft *txs; in gem_tint() local
1392 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) { in gem_tint()
1395 printf(" txsoft %p transmit chain:\n", txs); in gem_tint()
1396 for (i = txs->txs_firstdesc;; i = GEM_NEXTTX(i)) { in gem_tint()
1404 if (i == txs->txs_lastdesc) in gem_tint()
1419 CTR4(KTR_GEM, "%s: txs->txs_firstdesc = %d, " in gem_tint()
1420 "txs->txs_lastdesc = %d, txlast = %d", in gem_tint()
1421 __func__, txs->txs_firstdesc, txs->txs_lastdesc, txlast); in gem_tint()
1423 if (txs->txs_firstdesc <= txs->txs_lastdesc) { in gem_tint()
1424 if ((txlast >= txs->txs_firstdesc) && in gem_tint()
1425 (txlast <= txs->txs_lastdesc)) in gem_tint()
1429 if ((txlast >= txs->txs_firstdesc) || in gem_tint()
1430 (txlast <= txs->txs_lastdesc)) in gem_tint()
1439 sc->sc_txfree += txs->txs_ndescs; in gem_tint()
1441 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in gem_tint()
1443 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in gem_tint()
1444 if (txs->txs_mbuf != NULL) { in gem_tint()
1445 m_freem(txs->txs_mbuf); in gem_tint()
1446 txs->txs_mbuf = NULL; in gem_tint()
1449 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in gem_tint()