Lines Matching refs:txs

185 	struct cas_txsoft *txs;
289 txs = &sc->sc_txsoft[i];
290 txs->txs_mbuf = NULL;
291 txs->txs_ndescs = 0;
293 &txs->txs_dmamap)) != 0) {
299 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);
723 struct cas_txsoft *txs;
741 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) {
743 if (txs->txs_ndescs != 0) {
744 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
746 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
747 if (txs->txs_mbuf != NULL) {
748 m_freem(txs->txs_mbuf);
749 txs->txs_mbuf = NULL;
752 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);
1190 struct cas_txsoft *txs;
1199 if ((txs = STAILQ_FIRST(&sc->sc_txfreeq)) == NULL) {
1227 error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap,
1238 txs->txs_dmamap, *m_head, txsegs, &nsegs,
1263 txs->txs_ndescs = 0;
1264 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
1268 txs->txs_ndescs = nsegs;
1269 txs->txs_firstdesc = sc->sc_txnext;
1270 nexttx = txs->txs_firstdesc;
1285 txs->txs_lastdesc = nexttx;
1293 sc->sc_txdescs[txs->txs_lastdesc].cd_flags |=
1303 sc->sc_txdescs[txs->txs_firstdesc].cd_flags |=
1306 sc->sc_txdescs[txs->txs_firstdesc].cd_flags |=
1310 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
1315 __func__, txs->txs_firstdesc, txs->txs_lastdesc,
1316 txs->txs_ndescs);
1319 STAILQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q);
1320 txs->txs_mbuf = *m_head;
1322 sc->sc_txnext = CAS_NEXTTX(txs->txs_lastdesc);
1323 sc->sc_txfree -= txs->txs_ndescs;
1507 struct cas_txsoft *txs;
1524 while ((txs = STAILQ_FIRST(&sc->sc_txdirtyq)) != NULL) {
1527 printf(" txsoft %p transmit chain:\n", txs);
1528 for (i = txs->txs_firstdesc;; i = CAS_NEXTTX(i)) {
1536 if (i == txs->txs_lastdesc)
1551 CTR4(KTR_CAS, "%s: txs->txs_firstdesc = %d, "
1552 "txs->txs_lastdesc = %d, txlast = %d",
1553 __func__, txs->txs_firstdesc, txs->txs_lastdesc, txlast);
1555 if (txs->txs_firstdesc <= txs->txs_lastdesc) {
1556 if ((txlast >= txs->txs_firstdesc) &&
1557 (txlast <= txs->txs_lastdesc))
1561 if ((txlast >= txs->txs_firstdesc) ||
1562 (txlast <= txs->txs_lastdesc))
1571 sc->sc_txfree += txs->txs_ndescs;
1573 bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap,
1575 bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap);
1576 if (txs->txs_mbuf != NULL) {
1577 m_freem(txs->txs_mbuf);
1578 txs->txs_mbuf = NULL;
1581 STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);