Lines Matching full:txs

184 	struct cas_txsoft *txs;  in cas_attach()  local
280 txs = &sc->sc_txsoft[i]; in cas_attach()
281 txs->txs_mbuf = NULL; in cas_attach()
282 txs->txs_ndescs = 0; in cas_attach()
284 &txs->txs_dmamap)) != 0) { in cas_attach()
290 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in cas_attach()
713 struct cas_txsoft *txs; in cas_stop() local
731 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) { in cas_stop()
733 if (txs->txs_ndescs != 0) { in cas_stop()
734 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in cas_stop()
736 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in cas_stop()
737 if (txs->txs_mbuf != NULL) { in cas_stop()
738 m_freem(txs->txs_mbuf); in cas_stop()
739 txs->txs_mbuf = NULL; in cas_stop()
742 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in cas_stop()
1176 struct cas_txsoft *txs; in cas_load_txmbuf() local
1185 if ((txs = STAILQ_FIRST(&sc->sc_txfreeq)) == NULL) { in cas_load_txmbuf()
1213 error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap, in cas_load_txmbuf()
1224 txs->txs_dmamap, *m_head, txsegs, &nsegs, in cas_load_txmbuf()
1249 txs->txs_ndescs = 0; in cas_load_txmbuf()
1250 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in cas_load_txmbuf()
1254 txs->txs_ndescs = nsegs; in cas_load_txmbuf()
1255 txs->txs_firstdesc = sc->sc_txnext; in cas_load_txmbuf()
1256 nexttx = txs->txs_firstdesc; in cas_load_txmbuf()
1271 txs->txs_lastdesc = nexttx; in cas_load_txmbuf()
1279 sc->sc_txdescs[txs->txs_lastdesc].cd_flags |= in cas_load_txmbuf()
1289 sc->sc_txdescs[txs->txs_firstdesc].cd_flags |= in cas_load_txmbuf()
1292 sc->sc_txdescs[txs->txs_firstdesc].cd_flags |= in cas_load_txmbuf()
1296 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in cas_load_txmbuf()
1301 __func__, txs->txs_firstdesc, txs->txs_lastdesc, in cas_load_txmbuf()
1302 txs->txs_ndescs); in cas_load_txmbuf()
1305 STAILQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q); in cas_load_txmbuf()
1306 txs->txs_mbuf = *m_head; in cas_load_txmbuf()
1308 sc->sc_txnext = CAS_NEXTTX(txs->txs_lastdesc); in cas_load_txmbuf()
1309 sc->sc_txfree -= txs->txs_ndescs; in cas_load_txmbuf()
1493 struct cas_txsoft *txs; in cas_tint() local
1510 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) { in cas_tint()
1513 printf(" txsoft %p transmit chain:\n", txs); in cas_tint()
1514 for (i = txs->txs_firstdesc;; i = CAS_NEXTTX(i)) { in cas_tint()
1522 if (i == txs->txs_lastdesc) in cas_tint()
1537 CTR4(KTR_CAS, "%s: txs->txs_firstdesc = %d, " in cas_tint()
1538 "txs->txs_lastdesc = %d, txlast = %d", in cas_tint()
1539 __func__, txs->txs_firstdesc, txs->txs_lastdesc, txlast); in cas_tint()
1541 if (txs->txs_firstdesc <= txs->txs_lastdesc) { in cas_tint()
1542 if ((txlast >= txs->txs_firstdesc) && in cas_tint()
1543 (txlast <= txs->txs_lastdesc)) in cas_tint()
1547 if ((txlast >= txs->txs_firstdesc) || in cas_tint()
1548 (txlast <= txs->txs_lastdesc)) in cas_tint()
1557 sc->sc_txfree += txs->txs_ndescs; in cas_tint()
1559 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, in cas_tint()
1561 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); in cas_tint()
1562 if (txs->txs_mbuf != NULL) { in cas_tint()
1563 m_freem(txs->txs_mbuf); in cas_tint()
1564 txs->txs_mbuf = NULL; in cas_tint()
1567 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); in cas_tint()