Index: rtl81x9reg.h =================================================================== RCS file: /cvs/src/sys/dev/ic/rtl81x9reg.h,v retrieving revision 1.98 diff -u -p -r1.98 rtl81x9reg.h --- rtl81x9reg.h 20 Apr 2016 12:15:24 -0000 1.98 +++ rtl81x9reg.h 4 Nov 2016 10:25:50 -0000 @@ -888,6 +888,7 @@ struct rl_softc { struct mbuf *rl_tail; u_int32_t rl_rxlenmask; struct timeout timer_handle; + struct task rl_start; int rl_txstart; u_int32_t rl_flags; Index: re.c =================================================================== RCS file: /cvs/src/sys/dev/ic/re.c,v retrieving revision 1.193 diff -u -p -r1.193 re.c --- re.c 10 Aug 2016 14:27:17 -0000 1.193 +++ re.c 4 Nov 2016 10:25:50 -0000 @@ -162,6 +162,7 @@ int re_rxeof(struct rl_softc *); int re_txeof(struct rl_softc *); void re_tick(void *); void re_start(struct ifnet *); +void re_txstart(void *); int re_ioctl(struct ifnet *, u_long, caddr_t); void re_watchdog(struct ifnet *); int re_ifmedia_upd(struct ifnet *); @@ -1041,6 +1042,7 @@ re_attach(struct rl_softc *sc, const cha re_wol(ifp, 0); #endif timeout_set(&sc->timer_handle, re_tick, sc); + task_set(&sc->rl_start, re_txstart, sc); /* Take PHY out of power down mode. */ if (sc->rl_flags & RL_FLAG_PHYWAKE_PM) { @@ -1466,7 +1468,7 @@ re_txeof(struct rl_softc *sc) if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); else if (tx_free < sc->rl_ldata.rl_tx_desc_cnt) - CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); + ifq_serialize(&ifp->if_snd, &sc->rl_start); else ifp->if_timer = 0; @@ -1789,6 +1791,14 @@ fail_unload: return (error); } +void +re_txstart(void *xsc) +{ + struct rl_softc *sc = xsc; + + CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); +} + /* * Main transmit routine for C+ and gigE NICs. */ @@ -1852,7 +1862,7 @@ re_start(struct ifnet *ifp) sc->rl_ldata.rl_txq_prodidx = idx; - CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); + ifq_serialize(&ifp->if_snd, &sc->rl_start); } int