Index: if_tht.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_tht.c,v retrieving revision 1.143 diff -u -p -r1.143 if_tht.c --- if_tht.c 17 Dec 2020 23:36:47 -0000 1.143 +++ if_tht.c 18 Mar 2021 01:35:32 -0000 @@ -1109,23 +1109,22 @@ tht_start(struct ifnet *ifp) tht_fifo_pre(sc, &sc->sc_txt); do { - m = ifq_deq_begin(&ifp->if_snd); - if (m == NULL) - break; - pkt = tht_pkt_get(&sc->sc_tx_list); if (pkt == NULL) { - ifq_deq_rollback(&ifp->if_snd, m); ifq_set_oactive(&ifp->if_snd); break; } + m = ifq_dequeue(&ifp->if_snd); + if (m == NULL) { + tht_pkt_put(&sc->sc_tx_list, pkt); + break; + } - ifq_deq_commit(&ifp->if_snd, m); if (tht_load_pkt(sc, pkt, m) != 0) { - m_freem(m); tht_pkt_put(&sc->sc_tx_list, pkt); + m_freem(m); ifp->if_oerrors++; - break; + continue; } /* thou shalt not use m after this point, only pkt->tp_m */ @@ -1230,7 +1229,8 @@ tht_txf(struct tht_softc *sc) } while (sc->sc_txf.tf_ready >= sizeof(txf)); - ifq_clr_oactive(&ifp->if_snd); + if (ifq_is_oactive(&ifp->if_snd)) + ifq_restart(&ifp->if_snd); tht_fifo_post(sc, &sc->sc_txf); }