From: Vitaliy Makkoveev Subject: ifnet: Introduce if_watchdog*() API instead of manual `if_timer' handrolling To: tech@openbsd.org, Alexander Bluhm Date: Tue, 6 Jan 2026 04:20:05 +0300 This time the driver should manually set ifp->if_timer value to enable or disable interface watchdog timeout. This is unsigned short integer protected with kernel lock, so we need to bring it to the unlocked path if we want to make driver mp-safe. I want to rework it for a little and make the interface watchdog control mp-safe. I want to replace manual ifp->if_timer modifications with new if_watchdog_schedule() and if_wathdog_disable() routines. For this time these routines are dummy "ifp->if_timer = timeout" and "ifp->if_timer = 0" respectively, but they removes interface descriptor internals from driver side. This diff is mostly automatic replacement with some manual modifications. I performed build test with i386, amd64 and arm64, but I need help with other architectures like armv7, macppc and sparc64. Index: sys/arch/armv7/omap/if_cpsw.c =================================================================== RCS file: /cvs/src/sys/arch/armv7/omap/if_cpsw.c,v retrieving revision 1.53 diff -u -p -r1.53 if_cpsw.c --- sys/arch/armv7/omap/if_cpsw.c 10 Nov 2023 15:51:19 -0000 1.53 +++ sys/arch/armv7/omap/if_cpsw.c 6 Jan 2026 00:38:40 -0000 @@ -609,7 +609,7 @@ cpsw_start(struct ifnet *ifp) } if (txstart >= 0) { - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); /* terminate the new chain */ KASSERT(eopi == TXDESC_PREV(sc->sc_txnext)); cpsw_set_txdesc_next(sc, TXDESC_PREV(sc->sc_txnext), 0); @@ -1006,7 +1006,7 @@ cpsw_stop(struct ifnet *ifp) } ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); /* XXX Not sure what this is doing calling disable here @@ -1226,7 +1226,7 @@ next: } if (handled && sc->sc_txnext == sc->sc_txhead) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (handled) cpsw_start(ifp); Index: sys/arch/armv7/sunxi/sxie.c =================================================================== RCS file: /cvs/src/sys/arch/armv7/sunxi/sxie.c,v retrieving revision 1.34 diff -u -p -r1.34 sxie.c --- sys/arch/armv7/sunxi/sxie.c 10 Nov 2023 15:51:19 -0000 1.34 +++ sys/arch/armv7/sunxi/sxie.c 6 Jan 2026 00:38:40 -0000 @@ -451,9 +451,9 @@ sxie_intr(void *arg) if (pending & (SXIE_TX_FIFO0 | SXIE_TX_FIFO1)) { sc->txf_inuse &= ~pending; if (sc->txf_inuse == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); else - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); @@ -526,7 +526,7 @@ sxie_start(struct ifnet *ifp) /* transmit to PHY from fifo */ SXISET4(sc, SXIE_TXCR0 + (fifo * 4), 1); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); m_freem(m); } @@ -540,7 +540,7 @@ sxie_stop(struct sxie_softc *sc) sxie_reset(sc); ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); } @@ -559,7 +559,7 @@ sxie_watchdog(struct ifnet *ifp) { struct sxie_softc *sc = ifp->if_softc; if (sc->pauseframe) { - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); return; } printf("%s: watchdog tx timeout\n", sc->sc_dev.dv_xname); Index: sys/arch/macppc/dev/if_bm.c =================================================================== RCS file: /cvs/src/sys/arch/macppc/dev/if_bm.c,v retrieving revision 1.44 diff -u -p -r1.44 if_bm.c --- sys/arch/macppc/dev/if_bm.c 13 Mar 2022 12:33:01 -0000 1.44 +++ sys/arch/macppc/dev/if_bm.c 6 Jan 2026 00:38:42 -0000 @@ -421,7 +421,7 @@ bmac_init(struct bmac_softc *sc) ifp->if_flags |= IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); data = sc->sc_txbuf; eh = (struct ether_header *)data; @@ -483,7 +483,7 @@ bmac_intr(void *v) if (stat & IntFrameSent) { ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); bmac_start(ifp); } @@ -596,7 +596,7 @@ bmac_stop(struct bmac_softc *sc) dbdma_stop(sc->sc_rxdma); ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); splx(s); } @@ -631,7 +631,7 @@ bmac_start(struct ifnet *ifp) tlen = bmac_put(sc, sc->sc_txbuf, m); /* 5 seconds to watch for failing to transmit */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); bmac_transmit_packet(sc, sc->sc_txbuf_pa, tlen); } Index: sys/arch/macppc/dev/if_mc.c =================================================================== RCS file: /cvs/src/sys/arch/macppc/dev/if_mc.c,v retrieving revision 1.35 diff -u -p -r1.35 if_mc.c --- sys/arch/macppc/dev/if_mc.c 6 Sep 2024 10:54:08 -0000 1.35 +++ sys/arch/macppc/dev/if_mc.c 6 Jan 2026 00:38:42 -0000 @@ -456,7 +456,7 @@ mc_attach(struct device *parent, struct ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_watchdog = mc_watchdog; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if_attach(ifp); ether_ifattach(ifp); @@ -663,7 +663,7 @@ mc_stop(struct mc_softc *sc) NIC_PUT(sc, MACE_BIUCC, SWRST); DELAY(100); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -772,7 +772,7 @@ mc_tint(struct mc_softc *sc) } ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); mc_start(ifp); } @@ -857,7 +857,7 @@ maceput(struct mc_softc *sc, struct mbuf /* 5 seconds to watch for failing to transmit */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); mc_putpacket(sc, totlen); return (totlen); } Index: sys/arch/macppc/dev/if_wi_obio.c =================================================================== RCS file: /cvs/src/sys/arch/macppc/dev/if_wi_obio.c,v retrieving revision 1.22 diff -u -p -r1.22 if_wi_obio.c --- sys/arch/macppc/dev/if_wi_obio.c 28 Aug 2024 03:54:54 -0000 1.22 +++ sys/arch/macppc/dev/if_wi_obio.c 6 Jan 2026 00:38:42 -0000 @@ -158,7 +158,7 @@ wi_obio_activate(struct device *dev, int switch (act) { case DVACT_DEACTIVATE: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) wi_stop(sc); wi_obio_disable(sc); Index: sys/arch/octeon/dev/if_cnmac.c =================================================================== RCS file: /cvs/src/sys/arch/octeon/dev/if_cnmac.c,v retrieving revision 1.86 diff -u -p -r1.86 if_cnmac.c --- sys/arch/octeon/dev/if_cnmac.c 20 May 2024 23:13:33 -0000 1.86 +++ sys/arch/octeon/dev/if_cnmac.c 6 Jan 2026 00:38:42 -0000 @@ -972,7 +972,7 @@ cnmac_watchdog(struct ifnet *ifp) cnmac_configure(sc); SET(ifp->if_flags, IFF_RUNNING); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_restart(&ifp->if_snd); } @@ -1030,7 +1030,7 @@ cnmac_stop(struct ifnet *ifp, int disabl ifq_barrier(&ifp->if_snd); ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); return 0; } Index: sys/arch/sparc64/dev/vnet.c =================================================================== RCS file: /cvs/src/sys/arch/sparc64/dev/vnet.c,v retrieving revision 1.67 diff -u -p -r1.67 vnet.c --- sys/arch/sparc64/dev/vnet.c 9 Mar 2023 10:29:04 -0000 1.67 +++ sys/arch/sparc64/dev/vnet.c 6 Jan 2026 00:38:43 -0000 @@ -909,7 +909,7 @@ vnet_rx_vio_dring_data(struct vnet_softc if (count < (sc->sc_vd->vd_nentries - 1)) ifq_clr_oactive(&ifp->if_snd); if (count == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); vnet_start(ifp); KERNEL_UNLOCK(); @@ -1191,7 +1191,7 @@ vnet_start(struct ifnet *ifp) sc->sc_vd->vd_desc[start].hdr.dstate = VIO_DESC_READY; if (sc->sc_peer_state != VIO_DP_ACTIVE) { vnet_send_dring_data(sc, start); - ifp->if_timer = 10; + if_watchdog_schedule(ifp, 10); } } } @@ -1464,7 +1464,7 @@ vnet_stop(struct ifnet *ifp) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); cbus_intr_setenabled(sc->sc_bustag, sc->sc_tx_ino, INTR_DISABLED); cbus_intr_setenabled(sc->sc_bustag, sc->sc_rx_ino, INTR_DISABLED); Index: sys/dev/fdt/if_cad.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/if_cad.c,v retrieving revision 1.16 diff -u -p -r1.16 if_cad.c --- sys/dev/fdt/if_cad.c 17 Sep 2025 09:17:12 -0000 1.16 +++ sys/dev/fdt/if_cad.c 6 Jan 2026 00:38:44 -0000 @@ -983,7 +983,7 @@ cad_down(struct cad_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Avoid lock order issues with barriers. */ NET_UNLOCK(); @@ -1161,7 +1161,7 @@ cad_start(struct ifqueue *ifq) bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); KASSERT(free >= used); free -= used; @@ -1175,7 +1175,7 @@ cad_watchdog(struct ifnet *ifp) { struct cad_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((ifp->if_flags & IFF_RUNNING) == 0) return; Index: sys/dev/fdt/if_dwge.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/if_dwge.c,v retrieving revision 1.22 diff -u -p -r1.22 if_dwge.c --- sys/dev/fdt/if_dwge.c 8 Feb 2024 20:50:34 -0000 1.22 +++ sys/dev/fdt/if_dwge.c 6 Jan 2026 00:38:44 -0000 @@ -768,7 +768,7 @@ dwge_start(struct ifqueue *ifq) sc->sc_tx_prod = idx; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); dwge_write(sc, GMAC_TX_POLL_DEMAND, 0xffffffff); } @@ -1057,7 +1057,7 @@ dwge_tx_proc(struct dwge_softc *sc) } if (sc->sc_tx_cons == sc->sc_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (txfree) { if (ifq_is_oactive(&ifp->if_snd)) @@ -1251,7 +1251,7 @@ dwge_down(struct dwge_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); dwge_stop_dma(sc); Index: sys/dev/fdt/if_dwxe.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/if_dwxe.c,v retrieving revision 1.24 diff -u -p -r1.24 if_dwxe.c --- sys/dev/fdt/if_dwxe.c 27 Feb 2024 10:47:20 -0000 1.24 +++ sys/dev/fdt/if_dwxe.c 6 Jan 2026 00:38:44 -0000 @@ -680,7 +680,7 @@ dwxe_start(struct ifqueue *ifq) sc->sc_tx_prod = idx; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); dwxe_write(sc, DWXE_TX_CTL1, dwxe_read(sc, DWXE_TX_CTL1) | DWXE_TX_CTL1_TX_DMA_START); @@ -958,7 +958,7 @@ dwxe_tx_proc(struct dwxe_softc *sc) } if (sc->sc_tx_cons == sc->sc_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (txfree) { if (ifq_is_oactive(&ifp->if_snd)) @@ -1136,7 +1136,7 @@ dwxe_down(struct dwxe_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); dwxe_stop_dma(sc); Index: sys/dev/fdt/if_fec.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/if_fec.c,v retrieving revision 1.14 diff -u -p -r1.14 if_fec.c --- sys/dev/fdt/if_fec.c 9 Jan 2022 05:42:37 -0000 1.14 +++ sys/dev/fdt/if_fec.c 6 Jan 2026 00:38:44 -0000 @@ -738,7 +738,7 @@ fec_stop(struct fec_softc *sc) * Mark the interface down and cancel the watchdog timer. */ ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); timeout_del(&sc->sc_tick); @@ -901,7 +901,7 @@ fec_start(struct ifnet *ifp) sc->sc_tx_prod = idx; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1076,7 +1076,7 @@ fec_tx_proc(struct fec_softc *sc) } if (sc->sc_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); else /* ERR006358 */ HWRITE4(sc, ENET_TDAR, ENET_TDAR_TDAR); } Index: sys/dev/ic/acx.c =================================================================== RCS file: /cvs/src/sys/dev/ic/acx.c,v retrieving revision 1.128 diff -u -p -r1.128 acx.c --- sys/dev/ic/acx.c 10 Nov 2023 15:51:20 -0000 1.128 +++ sys/dev/ic/acx.c 6 Jan 2026 00:38:44 -0000 @@ -608,7 +608,7 @@ acx_stop(struct acx_softc *sc) bzero(rd->rx_ring, ACX_RX_RING_SIZE); sc->sc_txtimer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); ieee80211_new_state(&sc->sc_ic, IEEE80211_S_INIT, -1); @@ -1059,7 +1059,7 @@ encapped: if (trans && sc->sc_txtimer == 0) sc->sc_txtimer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } void @@ -1067,7 +1067,7 @@ acx_watchdog(struct ifnet *ifp) { struct acx_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((ifp->if_flags & IFF_RUNNING) == 0) return; @@ -1079,7 +1079,7 @@ acx_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } else - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); Index: sys/dev/ic/aic6915.c =================================================================== RCS file: /cvs/src/sys/dev/ic/aic6915.c,v retrieving revision 1.25 diff -u -p -r1.25 aic6915.c --- sys/dev/ic/aic6915.c 10 Nov 2023 15:51:20 -0000 1.25 +++ sys/dev/ic/aic6915.c 6 Jan 2026 00:38:45 -0000 @@ -478,7 +478,7 @@ sf_start(struct ifnet *ifp) TDQPI_HiPrTxProducerIndex(SF_TXDINDEX_TO_CHIP(producer))); /* Set a watchdog timer in case the chip flakes out. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -692,7 +692,7 @@ sf_txintr(struct sf_softc *sc) /* If all packets are done, cancel the watchdog timer. */ if (sc->sc_txpending == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Update the consumer index. */ sf_funcreg_write(sc, SF_CompletionQueueConsumerIndex, @@ -1109,7 +1109,7 @@ sf_init(struct ifnet *ifp) if (error) { ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); printf("%s: interface not running\n", sc->sc_dev.dv_xname); } return (error); @@ -1181,7 +1181,7 @@ sf_stop(struct ifnet *ifp, int disable) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* Index: sys/dev/ic/am7990.c =================================================================== RCS file: /cvs/src/sys/dev/ic/am7990.c,v retrieving revision 1.54 diff -u -p -r1.54 am7990.c --- sys/dev/ic/am7990.c 10 Jul 2020 13:22:19 -0000 1.54 +++ sys/dev/ic/am7990.c 6 Jan 2026 00:38:45 -0000 @@ -368,7 +368,7 @@ am7990_tint(struct lance_softc *sc) am7990_start(ifp); if (sc->sc_no_td == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -506,7 +506,7 @@ am7990_start(struct ifnet *ifp) printf("packet length %d\n", len); #endif - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); /* * Init transmit registers, and set transmit start flag. Index: sys/dev/ic/am79900.c =================================================================== RCS file: /cvs/src/sys/dev/ic/am79900.c,v retrieving revision 1.8 diff -u -p -r1.8 am79900.c --- sys/dev/ic/am79900.c 10 Jul 2020 13:22:19 -0000 1.8 +++ sys/dev/ic/am79900.c 6 Jan 2026 00:38:45 -0000 @@ -395,7 +395,7 @@ am79900_tint(struct lance_softc *sc) am79900_start(ifp); if (sc->sc_no_td == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -529,7 +529,7 @@ am79900_start(struct ifnet *ifp) printf("packet length %d\n", len); #endif - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); /* * Init transmit registers, and set transmit start flag. Index: sys/dev/ic/an.c =================================================================== RCS file: /cvs/src/sys/dev/ic/an.c,v retrieving revision 1.80 diff -u -p -r1.80 an.c --- sys/dev/ic/an.c 13 Apr 2024 23:44:11 -0000 1.80 +++ sys/dev/ic/an.c 6 Jan 2026 00:38:45 -0000 @@ -1210,7 +1210,7 @@ an_start(struct ifnet *ifp) continue; } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); AN_INC(cur, AN_TX_RING_CNT); sc->sc_txnext = cur; } @@ -1239,7 +1239,7 @@ an_stop(struct ifnet *ifp, int disable) } sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -1266,7 +1266,7 @@ an_watchdog(struct ifnet *ifp) an_init(ifp); return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } Index: sys/dev/ic/ath.c =================================================================== RCS file: /cvs/src/sys/dev/ic/ath.c,v retrieving revision 1.126 diff -u -p -r1.126 ath.c --- sys/dev/ic/ath.c 1 Aug 2025 20:39:26 -0000 1.126 +++ sys/dev/ic/ath.c 6 Jan 2026 00:38:45 -0000 @@ -716,7 +716,7 @@ ath_stop(struct ifnet *ifp) * hardware is gone (invalid). */ ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (!sc->sc_invalid) ath_hal_set_intr(ah, 0); ath_draintxq(sc); @@ -890,7 +890,7 @@ ath_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -914,7 +914,7 @@ ath_watchdog(struct ifnet *ifp) { struct ath_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((ifp->if_flags & IFF_RUNNING) == 0 || sc->sc_invalid) return; if (sc->sc_tx_timer) { @@ -925,7 +925,7 @@ ath_watchdog(struct ifnet *ifp) sc->sc_stats.ast_watchdog++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); Index: sys/dev/ic/athn.c =================================================================== RCS file: /cvs/src/sys/dev/ic/athn.c,v retrieving revision 1.111 diff -u -p -r1.111 athn.c --- sys/dev/ic/athn.c 15 Apr 2021 18:25:43 -0000 1.111 +++ sys/dev/ic/athn.c 6 Jan 2026 00:38:45 -0000 @@ -2861,7 +2861,7 @@ athn_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -2870,7 +2870,7 @@ athn_watchdog(struct ifnet *ifp) { struct athn_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -2880,7 +2880,7 @@ athn_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -3095,7 +3095,8 @@ athn_stop(struct ifnet *ifp, int disable struct ieee80211com *ic = &sc->sc_ic; int qid, i; - ifp->if_timer = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/atw.c =================================================================== RCS file: /cvs/src/sys/dev/ic/atw.c,v retrieving revision 1.102 diff -u -p -r1.102 atw.c --- sys/dev/ic/atw.c 6 Oct 2024 01:12:15 -0000 1.102 +++ sys/dev/ic/atw.c 6 Jan 2026 00:38:45 -0000 @@ -1439,7 +1439,7 @@ atw_init(struct ifnet *ifp) if (error) { ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); printf("%s: interface not running\n", sc->sc_dev.dv_xname); } #ifdef ATW_DEBUG @@ -2640,7 +2640,7 @@ atw_stop(struct ifnet *ifp, int disable) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Disable interrupts. */ ATW_WRITE(sc, ATW_IER, 0); @@ -3000,7 +3000,7 @@ atw_linkintr(struct atw_softc *sc, u_int if (ic->ic_opmode != IEEE80211_M_STA) return; sc->sc_rescan_timer = 3; - ic->ic_if.if_timer = 1; + if_watchdog_schedule(&ic->ic_if, 1); } } @@ -3312,7 +3312,7 @@ atw_watchdog(struct ifnet *ifp) struct ieee80211com *ic = &sc->sc_ic; uint32_t test1, rra, rwa; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ATW_IS_ENABLED(sc) == 0) return; @@ -3330,7 +3330,7 @@ atw_watchdog(struct ifnet *ifp) } } if (sc->sc_tx_timer != 0 || sc->sc_rescan_timer != 0) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); /* * ADM8211B seems to stall every so often, check for this. @@ -3954,7 +3954,7 @@ atw_start(struct ifnet *ifp) /* Set a watchdog timer in case the chip flakes out. */ sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } Index: sys/dev/ic/bwfm.c =================================================================== RCS file: /cvs/src/sys/dev/ic/bwfm.c,v retrieving revision 1.113 diff -u -p -r1.113 bwfm.c --- sys/dev/ic/bwfm.c 21 Aug 2025 17:03:58 -0000 1.113 +++ sys/dev/ic/bwfm.c 6 Jan 2026 00:38:45 -0000 @@ -584,7 +584,7 @@ bwfm_stop(struct ifnet *ifp) struct bwfm_join_params join; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -645,7 +645,7 @@ bwfm_watchdog(struct ifnet *ifp) { struct bwfm_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -653,7 +653,7 @@ bwfm_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } Index: sys/dev/ic/bwi.c =================================================================== RCS file: /cvs/src/sys/dev/ic/bwi.c,v retrieving revision 1.135 diff -u -p -r1.135 bwi.c --- sys/dev/ic/bwi.c 13 Apr 2024 23:44:11 -0000 1.135 +++ sys/dev/ic/bwi.c 6 Jan 2026 00:38:45 -0000 @@ -7256,7 +7256,7 @@ bwi_start(struct ifnet *ifp) if (trans) sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } void @@ -7264,7 +7264,7 @@ bwi_watchdog(struct ifnet *ifp) { struct bwi_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((ifp->if_flags & IFF_RUNNING) == 0) return; @@ -7276,7 +7276,7 @@ bwi_watchdog(struct ifnet *ifp) ifp->if_oerrors++; /* TODO */ } else - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -7339,7 +7339,7 @@ bwi_stop(struct bwi_softc *sc, int state bwi_bbp_power_off(sc); sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/dc.c =================================================================== RCS file: /cvs/src/sys/dev/ic/dc.c,v retrieving revision 1.159 diff -u -p -r1.159 dc.c --- sys/dev/ic/dc.c 5 Nov 2024 18:58:59 -0000 1.159 +++ sys/dev/ic/dc.c 6 Jan 2026 00:38:45 -0000 @@ -965,7 +965,7 @@ dc_setfilt_21143(struct dc_softc *sc) */ DELAY(10000); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1141,7 +1141,7 @@ dc_setfilt_xircom(struct dc_softc *sc) */ DELAY(1000); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -2286,7 +2286,7 @@ dc_txeof(struct dc_softc *sc) if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt > 5) ifq_clr_oactive(&ifp->if_snd); if (sc->dc_cdata.dc_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -2656,7 +2656,7 @@ dc_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -2973,7 +2973,7 @@ dc_stop(struct dc_softc *sc, int softonl int i; ifp = &sc->sc_arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->dc_tick_tmo); Index: sys/dev/ic/dp8390.c =================================================================== RCS file: /cvs/src/sys/dev/ic/dp8390.c,v retrieving revision 1.63 diff -u -p -r1.63 dp8390.c --- sys/dev/ic/dp8390.c 9 Jan 2022 05:42:38 -0000 1.63 +++ sys/dev/ic/dp8390.c 6 Jan 2026 00:38:45 -0000 @@ -244,7 +244,7 @@ dp8390_init(struct dp8390_softc *sc) */ /* Reset transmitter flags. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->txb_inuse = 0; sc->txb_new = 0; @@ -407,7 +407,7 @@ dp8390_xmit(struct dp8390_softc *sc) sc->txb_next_tx = 0; /* Set a timer just in case we never hear from the board again. */ - ifp->if_timer = 2; + if_watchdog_schedule(ifp, 2); } /* @@ -695,7 +695,7 @@ dp8390_intr(void *arg) } /* Clear watchdog timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); /* Index: sys/dev/ic/dwqe.c =================================================================== RCS file: /cvs/src/sys/dev/ic/dwqe.c,v retrieving revision 1.23 diff -u -p -r1.23 dwqe.c --- sys/dev/ic/dwqe.c 29 Dec 2025 22:53:32 -0000 1.23 +++ sys/dev/ic/dwqe.c 6 Jan 2026 00:38:45 -0000 @@ -410,7 +410,7 @@ dwqe_start(struct ifqueue *ifq) sc->sc_tx_prod = idx; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); /* * Start the transmit process after the last in-use Tx @@ -701,7 +701,7 @@ dwqe_tx_proc(struct dwqe_softc *sc) } if (sc->sc_tx_cons == sc->sc_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (txfree) { if (ifq_is_oactive(&ifp->if_snd)) @@ -1031,7 +1031,7 @@ dwqe_down(struct dwqe_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Disable receiver */ reg = dwqe_read(sc, GMAC_MAC_CONF); Index: sys/dev/ic/fxp.c =================================================================== RCS file: /cvs/src/sys/dev/ic/fxp.c,v retrieving revision 1.135 diff -u -p -r1.135 fxp.c --- sys/dev/ic/fxp.c 31 Aug 2024 16:23:09 -0000 1.135 +++ sys/dev/ic/fxp.c 6 Jan 2026 00:38:45 -0000 @@ -732,7 +732,7 @@ fxp_start(struct ifnet *ifp) if (cnt != sc->sc_cbt_cnt) { /* We enqueued at least one. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); txs = sc->sc_cbt_prod; txs = txs->tx_next; @@ -827,7 +827,10 @@ fxp_intr(void *arg) /* Did we transmit any packets? */ if (sc->sc_cbt_cons != txs) ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = sc->sc_cbt_cnt ? 5 : 0; + if (sc->sc_cbt_cnt) + if_watchdog_schedule(ifp, 5); + else + if_watchdog_disable(ifp); sc->sc_cbt_cons = txs; if (!ifq_empty(&ifp->if_snd)) { @@ -1052,7 +1055,7 @@ fxp_stop(struct fxp_softc *sc, int drain * Turn down interface (done early to avoid bad interactions * between panics, and the watchdog timer) */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/gem.c =================================================================== RCS file: /cvs/src/sys/dev/ic/gem.c,v retrieving revision 1.128 diff -u -p -r1.128 gem.c --- sys/dev/ic/gem.c 10 Nov 2023 15:51:20 -0000 1.128 +++ sys/dev/ic/gem.c 6 Jan 2026 00:38:45 -0000 @@ -543,7 +543,7 @@ gem_stop(struct ifnet *ifp, int softonly */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (!softonly) { mii_down(&sc->sc_mii); @@ -1674,7 +1674,7 @@ gem_tint(struct gem_softc *sc, u_int32_t sc->sc_tx_cons = cons; if (sc->sc_tx_prod == cons) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); @@ -1799,5 +1799,5 @@ gem_start(struct ifqueue *ifq) bus_space_write_4(sc->sc_bustag, sc->sc_h1, GEM_TX_KICK, prod); /* Set timeout in case hardware has problems transmitting. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } Index: sys/dev/ic/hme.c =================================================================== RCS file: /cvs/src/sys/dev/ic/hme.c,v retrieving revision 1.83 diff -u -p -r1.83 hme.c --- sys/dev/ic/hme.c 12 Dec 2020 11:48:52 -0000 1.83 +++ sys/dev/ic/hme.c 6 Jan 2026 00:38:45 -0000 @@ -383,7 +383,7 @@ hme_stop(struct hme_softc *sc, int softo */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (!softonly) { mii_down(&sc->sc_mii); @@ -726,7 +726,7 @@ hme_start(struct ifnet *ifp) HME_ETX_TP_DMAWAKEUP); sc->sc_tx_prod = frag; - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } return; @@ -781,7 +781,10 @@ hme_tint(struct hme_softc *sc) } sc->sc_tx_cnt = cnt; - ifp->if_timer = cnt > 0 ? 5 : 0; + if (cnt > 0) + if_watchdog_schedule(ifp, 5); + else + if_watchdog_disable(ifp); /* Update ring */ sc->sc_tx_cons = ri; Index: sys/dev/ic/i82596.c =================================================================== RCS file: /cvs/src/sys/dev/ic/i82596.c,v retrieving revision 1.56 diff -u -p -r1.56 i82596.c --- sys/dev/ic/i82596.c 6 Apr 2025 00:37:07 -0000 1.56 +++ sys/dev/ic/i82596.c 6 Jan 2026 00:38:45 -0000 @@ -710,7 +710,7 @@ i82596_tint(struct ie_softc *sc, int scb register struct ifnet *ifp = &sc->sc_arpcom.ac_if; register int off, status; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); #ifdef I82596_DEBUG @@ -1168,7 +1168,7 @@ i82596_xmit(struct ie_softc *sc) } } - sc->sc_arpcom.ac_if.if_timer = 5; + if_watchdog_schedule(&sc->sc_arpcom.ac_if, 5); } @@ -1323,7 +1323,7 @@ i82596_reset(struct ie_softc *sc, int ha #endif /* Clear OACTIVE in case we're called from watchdog (frozen xmit). */ - sc->sc_arpcom.ac_if.if_timer = 0; + if_watchdog_disable(&sc->sc_arpcom.ac_if); ifq_clr_oactive(&sc->sc_arpcom.ac_if.if_snd); /* Index: sys/dev/ic/if_wi.c =================================================================== RCS file: /cvs/src/sys/dev/ic/if_wi.c,v retrieving revision 1.177 diff -u -p -r1.177 if_wi.c --- sys/dev/ic/if_wi.c 14 Jul 2022 13:46:24 -0000 1.177 +++ sys/dev/ic/if_wi.c 6 Jan 2026 00:38:45 -0000 @@ -831,7 +831,7 @@ wi_txeof(struct wi_softc *sc, int status ifp = &sc->sc_ic.ic_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status & WI_EV_TX_EXC) @@ -2463,7 +2463,7 @@ nextpkt: /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); if (wi_cmd(sc, WI_CMD_TX|WI_RECLAIM, id, 0, 0)) printf(WI_PRT_FMT ": wi_start: xmit failed\n", WI_PRT_ARG(sc)); @@ -2535,7 +2535,7 @@ wi_stop(struct wi_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); return; } Index: sys/dev/ic/lance.c =================================================================== RCS file: /cvs/src/sys/dev/ic/lance.c,v retrieving revision 1.13 diff -u -p -r1.13 lance.c --- sys/dev/ic/lance.c 13 Apr 2016 10:49:26 -0000 1.13 +++ sys/dev/ic/lance.c 6 Jan 2026 00:38:45 -0000 @@ -309,7 +309,7 @@ lance_init(struct lance_softc *sc) (*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_INEA | LE_C0_STRT); ifp->if_flags |= IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); (*sc->sc_start)(ifp); } else printf("%s: controller failed to initialize\n", Index: sys/dev/ic/mtd8xx.c =================================================================== RCS file: /cvs/src/sys/dev/ic/mtd8xx.c,v retrieving revision 1.36 diff -u -p -r1.36 mtd8xx.c --- sys/dev/ic/mtd8xx.c 5 Nov 2024 18:58:59 -0000 1.36 +++ sys/dev/ic/mtd8xx.c 6 Jan 2026 00:38:45 -0000 @@ -729,7 +729,7 @@ mtd_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } @@ -739,7 +739,7 @@ mtd_stop(struct ifnet *ifp) struct mtd_softc *sc = ifp->if_softc; int i; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -990,7 +990,7 @@ mtd_txeof(struct mtd_softc *sc) int idx; /* Clear the timeout timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* * Go through our tx list and free mbufs for those @@ -1053,7 +1053,7 @@ mtd_txeof(struct mtd_softc *sc) htole32(TSW_UNSENT)) { sc->mtd_ldata->mtd_tx_list[idx].td_tsw = htole32(TSW_OWN); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); CSR_WRITE_4(MTD_TXPDR, 0xffffffff); } } Index: sys/dev/ic/pgt.c =================================================================== RCS file: /cvs/src/sys/dev/ic/pgt.c,v retrieving revision 1.104 diff -u -p -r1.104 pgt.c --- sys/dev/ic/pgt.c 10 Nov 2023 15:51:20 -0000 1.104 +++ sys/dev/ic/pgt.c 6 Jan 2026 00:38:46 -0000 @@ -744,7 +744,7 @@ pgt_update_intr(struct pgt_softc *sc, in */ if (qdirty > npend) { if (pgt_queue_is_data(pqs[i])) { - sc->sc_ic.ic_if.if_timer = 0; + if_watchdog_disable(&sc->sc_ic.ic_if); ifq_clr_oactive( &sc->sc_ic.ic_if.if_snd); } @@ -2182,7 +2182,7 @@ pgt_start(struct ifnet *ifp) if (ifp->if_bpf != NULL) bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); sc->sc_txtimer = 5; ni = ieee80211_find_txnode(&sc->sc_ic, mtod(m, struct ether_header *)->ether_dhost); @@ -2446,7 +2446,7 @@ pgt_watchdog(struct ifnet *ifp) if (sc->sc_dirtyq_count[PGT_QUEUE_DATA_LOW_TX] != 0) { int count; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); if (sc->sc_txtimer && --sc->sc_txtimer == 0) { count = pgt_drain_tx_queue(sc, PGT_QUEUE_DATA_LOW_TX); if (sc->sc_debug & SC_DEBUG_UNEXPECTED) @@ -2488,7 +2488,7 @@ pgt_watchdog(struct ifnet *ifp) } #endif ieee80211_watchdog(ifp); - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } int @@ -2931,14 +2931,14 @@ pgt_newstate(struct ieee80211com *ic, en switch (nstate) { case IEEE80211_S_INIT: if (sc->sc_dirtyq_count[PGT_QUEUE_DATA_LOW_TX] == 0) - ic->ic_if.if_timer = 0; + if_watchdog_disable(&ic->ic_if); ic->ic_mgt_timer = 0; ic->ic_flags &= ~IEEE80211_F_SIBSS; ieee80211_free_allnodes(ic, 1); ieee80211_set_link_state(ic, LINK_STATE_DOWN); break; case IEEE80211_S_SCAN: - ic->ic_if.if_timer = 1; + if_watchdog_schedule(&ic->ic_if, 1); ic->ic_mgt_timer = 0; ieee80211_node_cleanup(ic, ic->ic_bss); ieee80211_set_link_state(ic, LINK_STATE_DOWN); @@ -2949,7 +2949,7 @@ pgt_newstate(struct ieee80211com *ic, en #endif break; case IEEE80211_S_RUN: - ic->ic_if.if_timer = 1; + if_watchdog_schedule(&ic->ic_if, 1); break; default: break; Index: sys/dev/ic/qwx.c =================================================================== RCS file: /cvs/src/sys/dev/ic/qwx.c,v retrieving revision 1.97 diff -u -p -r1.97 qwx.c --- sys/dev/ic/qwx.c 5 Jan 2026 21:07:12 -0000 1.97 +++ sys/dev/ic/qwx.c 6 Jan 2026 00:38:46 -0000 @@ -426,7 +426,8 @@ qwx_stop(struct ifnet *ifp) qwx_setkey_clear(sc); - ifp->if_timer = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -638,7 +639,7 @@ qwx_start(struct ifnet *ifp) } if (ifp->if_flags & IFF_UP) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -647,7 +648,7 @@ qwx_watchdog(struct ifnet *ifp) { struct qwx_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -657,7 +658,7 @@ qwx_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); Index: sys/dev/ic/qwz.c =================================================================== RCS file: /cvs/src/sys/dev/ic/qwz.c,v retrieving revision 1.21 diff -u -p -r1.21 qwz.c --- sys/dev/ic/qwz.c 17 Apr 2025 09:51:55 -0000 1.21 +++ sys/dev/ic/qwz.c 6 Jan 2026 00:38:46 -0000 @@ -336,7 +336,8 @@ qwz_stop(struct ifnet *ifp) clear_bit(ATH12K_FLAG_CRASH_FLUSH, sc->sc_flags); - ifp->if_timer = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -501,7 +502,7 @@ qwz_start(struct ifnet *ifp) } if (ifp->if_flags & IFF_UP) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -510,7 +511,7 @@ qwz_watchdog(struct ifnet *ifp) { struct qwz_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -520,7 +521,7 @@ qwz_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); Index: sys/dev/ic/re.c =================================================================== RCS file: /cvs/src/sys/dev/ic/re.c,v retrieving revision 1.220 diff -u -p -r1.220 re.c --- sys/dev/ic/re.c 10 May 2025 11:08:26 -0000 1.220 +++ sys/dev/ic/re.c 6 Jan 2026 00:38:46 -0000 @@ -1502,7 +1502,7 @@ re_txeof(struct rl_softc *sc) else if (free == 2) ifq_serialize(&ifp->if_snd, &sc->rl_start); else - ifp->if_timer = 0; + if_watchdog_disable(ifp); return (1); } @@ -1867,7 +1867,7 @@ re_start(struct ifqueue *ifq) if (post == 0) return; - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); sc->rl_ldata.rl_txq_prodidx = idx; ifq_serialize(ifq, &sc->rl_start); } @@ -2128,7 +2128,7 @@ re_stop(struct ifnet *ifp) sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->rl_flags &= ~RL_FLAG_LINK; sc->rl_timerintr = 0; Index: sys/dev/ic/rt2560.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rt2560.c,v retrieving revision 1.90 diff -u -p -r1.90 rt2560.c --- sys/dev/ic/rt2560.c 21 Apr 2022 21:03:02 -0000 1.90 +++ sys/dev/ic/rt2560.c 6 Jan 2026 00:38:46 -0000 @@ -1966,7 +1966,7 @@ rt2560_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1975,7 +1975,7 @@ rt2560_watchdog(struct ifnet *ifp) { struct rt2560_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1984,7 +1984,7 @@ rt2560_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2671,7 +2671,7 @@ rt2560_stop(struct ifnet *ifp, int disab sc->sc_tx_timer = 0; sc->sc_flags &= ~(RT2560_PRIO_OACTIVE|RT2560_DATA_OACTIVE); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/rt2661.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rt2661.c,v retrieving revision 1.100 diff -u -p -r1.100 rt2661.c --- sys/dev/ic/rt2661.c 14 Apr 2024 03:26:25 -0000 1.100 +++ sys/dev/ic/rt2661.c 6 Jan 2026 00:38:46 -0000 @@ -1960,7 +1960,7 @@ rt2661_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1969,7 +1969,7 @@ rt2661_watchdog(struct ifnet *ifp) { struct rt2661_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1978,7 +1978,7 @@ rt2661_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2695,7 +2695,7 @@ rt2661_stop(struct ifnet *ifp, int disab int ac; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/rt2860.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rt2860.c,v retrieving revision 1.104 diff -u -p -r1.104 rt2860.c --- sys/dev/ic/rt2860.c 20 Sep 2024 02:00:46 -0000 1.104 +++ sys/dev/ic/rt2860.c 6 Jan 2026 00:38:46 -0000 @@ -1791,7 +1791,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1800,7 +1800,7 @@ rt2860_watchdog(struct ifnet *ifp) { struct rt2860_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1810,7 +1810,7 @@ rt2860_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -3963,7 +3963,7 @@ rt2860_stop(struct ifnet *ifp, int disab rt2860_set_leds(sc, 0); /* turn all LEDs off */ sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/rtl81x9.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rtl81x9.c,v retrieving revision 1.100 diff -u -p -r1.100 rtl81x9.c --- sys/dev/ic/rtl81x9.c 5 Nov 2024 18:58:59 -0000 1.100 +++ sys/dev/ic/rtl81x9.c 6 Jan 2026 00:38:46 -0000 @@ -737,9 +737,9 @@ rl_txeof(struct rl_softc *sc) } while (sc->rl_cdata.last_tx != sc->rl_cdata.cur_tx); if (RL_LAST_TXMBUF(sc) == NULL) - ifp->if_timer = 0; - else if (ifp->if_timer == 0) - ifp->if_timer = 5; + if_watchdog_disable(ifp); + else + if_watchdog_schedule(ifp, 5); } int @@ -882,7 +882,7 @@ rl_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } if (pkts == 0) @@ -1068,7 +1068,7 @@ rl_stop(struct rl_softc *sc) struct ifnet *ifp = &sc->sc_arpcom.ac_if; int i; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->sc_tick_tmo); Index: sys/dev/ic/rtw.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rtw.c,v retrieving revision 1.103 diff -u -p -r1.103 rtw.c --- sys/dev/ic/rtw.c 21 Apr 2022 21:03:02 -0000 1.103 +++ sys/dev/ic/rtw.c 6 Jan 2026 00:38:46 -0000 @@ -1906,7 +1906,7 @@ rtw_stop(struct ifnet *ifp, int disable) /* Mark the interface as not running. Cancel the watchdog timer. */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); return; } @@ -2692,7 +2692,7 @@ rtw_80211_dequeue(struct rtw_softc *sc, DPRINTF(sc, RTW_DEBUG_XMIT_RSRC, ("%s: no ring %d descriptor\n", __func__, pri)); ifq_set_oactive(&sc->sc_if.if_snd); - sc->sc_if.if_timer = 1; + if_watchdog_schedule(&sc->sc_if, 1); return NULL; } m = mq_dequeue(ifq); @@ -2765,7 +2765,7 @@ rtw_dequeue(struct ifnet *ifp, struct rt DPRINTF(sc, RTW_DEBUG_XMIT, ("%s: no descriptor\n", __func__)); ifq_deq_rollback(&ifp->if_snd, m0); ifq_set_oactive(&ifp->if_snd); - sc->sc_if.if_timer = 1; + if_watchdog_schedule(&sc->sc_if, 1); return 0; } @@ -3267,7 +3267,7 @@ rtw_start(struct ifnet *ifp) if (tsb != &sc->sc_txsoft_blk[RTW_TXPRIBCN]) sc->sc_led_state.ls_event |= RTW_LED_S_TX; tsb->tsb_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); tppoll = RTW_READ8(&sc->sc_regs, RTW_TPPOLL); tppoll &= ~RTW_TPPOLL_SALL; tppoll |= tsb->tsb_poll & RTW_TPPOLL_ALL; @@ -3311,7 +3311,7 @@ rtw_watchdog(struct ifnet *ifp) sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((sc->sc_flags & RTW_F_ENABLED) == 0) return; @@ -3330,7 +3330,7 @@ rtw_watchdog(struct ifnet *ifp) ifp->if_oerrors++; tx_timeouts++; } else - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } if (tx_timeouts > 0) { Index: sys/dev/ic/rtwn.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rtwn.c,v retrieving revision 1.61 diff -u -p -r1.61 rtwn.c --- sys/dev/ic/rtwn.c 20 Aug 2025 14:24:05 -0000 1.61 +++ sys/dev/ic/rtwn.c 6 Jan 2026 00:38:46 -0000 @@ -1591,7 +1591,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1600,7 +1600,7 @@ rtwn_watchdog(struct ifnet *ifp) { struct rtwn_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1609,7 +1609,7 @@ rtwn_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } @@ -3401,7 +3401,7 @@ rtwn_stop(struct ifnet *ifp) int s; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/ic/smc83c170.c =================================================================== RCS file: /cvs/src/sys/dev/ic/smc83c170.c,v retrieving revision 1.32 diff -u -p -r1.32 smc83c170.c --- sys/dev/ic/smc83c170.c 5 Nov 2024 18:58:59 -0000 1.32 +++ sys/dev/ic/smc83c170.c 6 Jan 2026 00:38:46 -0000 @@ -499,7 +499,7 @@ epic_start(struct ifnet *ifp) COMMAND_TXQUEUED); /* Set a watchdog timer in case the chip flakes out. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -770,7 +770,7 @@ epic_intr(void *arg) * transmissions. */ if (sc->sc_txpending == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* * Kick the transmitter after a DMA underrun. @@ -1071,7 +1071,7 @@ epic_stop(struct ifnet *ifp, int disable */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Down the MII. */ mii_down(&sc->sc_mii); Index: sys/dev/ic/smc91cxx.c =================================================================== RCS file: /cvs/src/sys/dev/ic/smc91cxx.c,v retrieving revision 1.54 diff -u -p -r1.54 smc91cxx.c --- sys/dev/ic/smc91cxx.c 25 Jun 2025 20:28:09 -0000 1.54 +++ sys/dev/ic/smc91cxx.c 6 Jan 2026 00:38:46 -0000 @@ -594,7 +594,7 @@ smc91cxx_start(struct ifnet *ifp) bus_space_write_1(bst, bsh, INTR_MASK_REG_B, bus_space_read_1(bst, bsh, INTR_MASK_REG_B) | IM_ALLOC_INT); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); ifq_deq_rollback(&ifp->if_snd, m); ifq_set_oactive(&ifp->if_snd); return; @@ -668,7 +668,7 @@ smc91cxx_start(struct ifnet *ifp) bus_space_write_2(bst, bsh, MMU_CMD_REG_W, MMUCR_ENQUEUE); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); #if NBPFILTER > 0 if (ifp->if_bpf) @@ -766,7 +766,7 @@ smc91cxx_intr(void *arg) bus_space_write_2(bst, bsh, MMU_CMD_REG_W, MMUCR_FREEPKT); ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -826,7 +826,7 @@ smc91cxx_intr(void *arg) /* XXX bound this loop! */ ; bus_space_write_2(bst, bsh, MMU_CMD_REG_W, MMUCR_FREEPKT); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -850,7 +850,7 @@ smc91cxx_intr(void *arg) SMC_SELECT_BANK(sc, 2); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -1106,7 +1106,7 @@ smc91cxx_stop(struct smc91cxx_softc *sc) /* * Cancel watchdog timer. */ - sc->sc_arpcom.ac_if.if_timer = 0; + if_watchdog_disable(&sc->sc_arpcom.ac_if); } /* Index: sys/dev/ic/ti.c =================================================================== RCS file: /cvs/src/sys/dev/ic/ti.c,v retrieving revision 1.31 diff -u -p -r1.31 ti.c --- sys/dev/ic/ti.c 20 Sep 2024 02:00:46 -0000 1.31 +++ sys/dev/ic/ti.c 6 Jan 2026 00:38:46 -0000 @@ -1653,7 +1653,7 @@ ti_txeof_tigon1(struct ti_softc *sc) } sc->ti_txcnt--; TI_INC(sc->ti_tx_saved_considx, TI_TX_RING_CNT); - ifp->if_timer = 0; + if_watchdog_disable(ifp); active = 0; } @@ -1697,7 +1697,7 @@ ti_txeof_tigon2(struct ti_softc *sc) } sc->ti_txcnt--; TI_INC(sc->ti_tx_saved_considx, TI_TX_RING_CNT); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } if (cur_tx != NULL) @@ -1991,7 +1991,7 @@ ti_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void Index: sys/dev/ic/xl.c =================================================================== RCS file: /cvs/src/sys/dev/ic/xl.c,v retrieving revision 1.141 diff -u -p -r1.141 xl.c --- sys/dev/ic/xl.c 5 Nov 2024 18:58:59 -0000 1.141 +++ sys/dev/ic/xl.c 6 Jan 2026 00:38:46 -0000 @@ -1284,7 +1284,7 @@ xl_txeof(struct xl_softc *sc) if (sc->xl_cdata.xl_tx_head == NULL) { ifq_clr_oactive(&ifp->if_snd); /* Clear the timeout timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->xl_cdata.xl_tx_tail = NULL; } else { if (CSR_READ_4(sc, XL_DMACTL) & XL_DMACTL_DOWN_STALLED || @@ -1336,7 +1336,7 @@ xl_txeof_90xB(struct xl_softc *sc) if (cur_tx != NULL) ifq_clr_oactive(&ifp->if_snd); if (sc->xl_cdata.xl_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -1742,7 +1742,7 @@ xl_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); /* * XXX Under certain conditions, usually on slower machines @@ -1841,7 +1841,7 @@ xl_start_90xB(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -2289,7 +2289,7 @@ xl_stop(struct xl_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_DISABLE); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_DISABLE); Index: sys/dev/isa/if_ef_isapnp.c =================================================================== RCS file: /cvs/src/sys/dev/isa/if_ef_isapnp.c,v retrieving revision 1.42 diff -u -p -r1.42 if_ef_isapnp.c --- sys/dev/isa/if_ef_isapnp.c 11 Sep 2023 08:41:26 -0000 1.42 +++ sys/dev/isa/if_ef_isapnp.c 6 Jan 2026 00:38:46 -0000 @@ -452,7 +452,7 @@ efstop(struct ef_softc *sc) bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/isa/if_ex.c =================================================================== RCS file: /cvs/src/sys/dev/isa/if_ex.c,v retrieving revision 1.50 diff -u -p -r1.50 if_ex.c --- sys/dev/isa/if_ex.c 22 Jun 2024 10:22:29 -0000 1.50 +++ sys/dev/isa/if_ex.c 6 Jan 2026 00:38:46 -0000 @@ -293,7 +293,7 @@ ex_init(struct ex_softc *sc) DODEBUG(Start_End, printf("ex_init: start\n");); s = splnet(); - sc->arpcom.ac_if.if_timer = 0; + if_watchdog_disable(&sc->arpcom.ac_if); /* * Load the ethernet address into the card. @@ -514,7 +514,7 @@ ex_start(struct ifnet *ifp) bpf_mtap(ifp->if_bpf, opkt, BPF_DIRECTION_OUT); #endif - ifp->if_timer = 2; + if_watchdog_schedule(ifp, 2); m_freem(opkt); } else { ifq_deq_rollback(&ifp->if_snd, opkt); @@ -613,7 +613,7 @@ ex_tx_intr(struct ex_softc *sc) * - Advance chain pointer to next queued packet. * - Update statistics. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); while (sc->tx_head != sc->tx_tail) { CSR_WRITE_2(sc, HOST_ADDR_REG, sc->tx_head); if (!(CSR_READ_2(sc, IO_PORT_REG) & Done_bit)) Index: sys/dev/isa/if_ie.c =================================================================== RCS file: /cvs/src/sys/dev/isa/if_ie.c,v retrieving revision 1.59 diff -u -p -r1.59 if_ie.c --- sys/dev/isa/if_ie.c 6 Apr 2022 18:59:28 -0000 1.59 +++ sys/dev/isa/if_ie.c 6 Jan 2026 00:38:47 -0000 @@ -913,7 +913,7 @@ ietint(struct ie_softc *sc) struct ifnet *ifp = &sc->sc_arpcom.ac_if; int status; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); status = sc->xmit_cmds[sc->xctail]->ie_xmit_status; @@ -1109,7 +1109,7 @@ iexmit(struct ie_softc *sc) sc->scb->ie_command_list = MK_16(MEM, sc->xmit_cmds[sc->xctail]); command_and_wait(sc, IE_CU_START, 0, 0); - sc->sc_arpcom.ac_if.if_timer = 5; + if_watchdog_schedule(&sc->sc_arpcom.ac_if, 5); } /* Index: sys/dev/pci/if_age.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_age.c,v retrieving revision 1.40 diff -u -p -r1.40 if_age.c --- sys/dev/pci/if_age.c 24 May 2024 06:02:53 -0000 1.40 +++ sys/dev/pci/if_age.c 6 Jan 2026 00:38:47 -0000 @@ -998,7 +998,7 @@ age_start(struct ifnet *ifp) /* Update mbox. */ AGE_COMMIT_MBOX(sc); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = AGE_TX_TIMEOUT; + if_watchdog_schedule(ifp, AGE_TX_TIMEOUT); } } @@ -1249,7 +1249,7 @@ age_txintr(struct age_softc *sc, int tpd * Tx descriptors in queue. */ if (sc->age_cdata.age_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); bus_dmamap_sync(sc->sc_dmat, sc->age_cdata.age_tx_ring_map, 0, sc->age_cdata.age_tx_ring_map->dm_mapsize, @@ -1795,7 +1795,7 @@ age_stop(struct age_softc *sc) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->age_flags &= ~AGE_FLAG_LINK; timeout_del(&sc->age_tick_ch); Index: sys/dev/pci/if_alc.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_alc.c,v retrieving revision 1.59 diff -u -p -r1.59 if_alc.c --- sys/dev/pci/if_alc.c 31 Aug 2024 16:23:09 -0000 1.59 +++ sys/dev/pci/if_alc.c 6 Jan 2026 00:38:47 -0000 @@ -1944,7 +1944,7 @@ alc_start(struct ifnet *ifp) MBOX_TD_PROD_LO_IDX_SHIFT) & MBOX_TD_PROD_LO_IDX_MASK); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = ALC_TX_TIMEOUT; + if_watchdog_schedule(ifp, ALC_TX_TIMEOUT); } } @@ -2308,7 +2308,7 @@ alc_txeof(struct alc_softc *sc) * frames in Tx queue. */ if (sc->alc_cdata.alc_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } int @@ -3076,7 +3076,7 @@ alc_stop(struct alc_softc *sc) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->alc_tick_ch); sc->alc_flags &= ~ALC_FLAG_LINK; Index: sys/dev/pci/if_ale.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ale.c,v retrieving revision 1.52 diff -u -p -r1.52 if_ale.c --- sys/dev/pci/if_ale.c 31 Aug 2024 16:23:09 -0000 1.52 +++ sys/dev/pci/if_ale.c 6 Jan 2026 00:38:47 -0000 @@ -1023,7 +1023,7 @@ ale_start(struct ifnet *ifp) sc->ale_cdata.ale_tx_prod); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = ALE_TX_TIMEOUT; + if_watchdog_schedule(ifp, ALE_TX_TIMEOUT); } } @@ -1326,7 +1326,7 @@ ale_txeof(struct ale_softc *sc) * Tx descriptors in queue. */ if (sc->ale_cdata.ale_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } } @@ -1830,7 +1830,7 @@ ale_stop(struct ale_softc *sc) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->ale_tick_ch); sc->ale_flags &= ~ALE_FLAG_LINK; Index: sys/dev/pci/if_bce.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_bce.c,v retrieving revision 1.60 diff -u -p -r1.60 if_bce.c --- sys/dev/pci/if_bce.c 4 Sep 2025 15:45:56 -0000 1.60 +++ sys/dev/pci/if_bce.c 6 Jan 2026 00:38:47 -0000 @@ -587,7 +587,7 @@ bce_start(struct ifnet *ifp) } if (newpkts) { /* Set a watchdog timer in case the chip flakes out. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -776,7 +776,7 @@ bce_txintr(struct bce_softc *sc) * timer */ if (sc->bce_txsnext == sc->bce_txin) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* initialize the interface */ @@ -965,7 +965,7 @@ bce_stop(struct ifnet *ifp) /* Mark the interface down and cancel the watchdog timer. */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Down the MII. */ mii_down(&sc->bce_mii); Index: sys/dev/pci/if_bge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_bge.c,v retrieving revision 1.408 diff -u -p -r1.408 if_bge.c --- sys/dev/pci/if_bge.c 15 Jul 2025 13:40:02 -0000 1.408 +++ sys/dev/pci/if_bge.c 6 Jan 2026 00:38:47 -0000 @@ -3742,7 +3742,7 @@ bge_txeof(struct bge_softc *sc) if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); else if (txcnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } int @@ -4255,7 +4255,7 @@ bge_start(struct ifqueue *ifq) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -4671,7 +4671,7 @@ bge_stop(struct bge_softc *sc, int softo timeout_del(&sc->bge_rxtimeout_jumbo); ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (!softonly) { /* Index: sys/dev/pci/if_bnx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_bnx.c,v retrieving revision 1.134 diff -u -p -r1.134 if_bnx.c --- sys/dev/pci/if_bnx.c 19 Aug 2024 03:08:27 -0000 1.134 +++ sys/dev/pci/if_bnx.c 6 Jan 2026 00:38:47 -0000 @@ -3297,7 +3297,7 @@ bnx_stop(struct bnx_softc *sc) ifm->ifm_media = mtmp; ifp->if_flags = itmp; - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->bnx_link = 0; @@ -4577,7 +4577,7 @@ bnx_tx_intr(struct bnx_softc *sc) /* Clear the TX timeout timer. */ if (used == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); @@ -4942,7 +4942,7 @@ bnx_start(struct ifqueue *ifq) REG_WR(sc, MB_TX_CID_ADDR + BNX_L2CTX_TX_HOST_BSEQ, sc->tx_prod_bseq); /* Set the tx timeout. */ - ifp->if_timer = BNX_TX_TIMEOUT; + if_watchdog_schedule(ifp, BNX_TX_TIMEOUT); bnx_start_exit: return; Index: sys/dev/pci/if_cas.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_cas.c,v retrieving revision 1.56 diff -u -p -r1.56 if_cas.c --- sys/dev/pci/if_cas.c 24 May 2024 06:02:53 -0000 1.56 +++ sys/dev/pci/if_cas.c 6 Jan 2026 00:38:47 -0000 @@ -717,7 +717,7 @@ cas_stop(struct ifnet *ifp, int disable) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); mii_down(&sc->sc_mii); @@ -1068,7 +1068,7 @@ cas_init(struct ifnet *ifp) ifp->if_flags |= IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); splx(s); return (0); @@ -1853,7 +1853,7 @@ cas_tint(struct cas_softc *sc, u_int32_t if (used < CAS_NTXDESC - 2) ifq_clr_oactive(&ifp->if_snd); if (used == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (!ifq_empty(&ifp->if_snd)) { KERNEL_LOCK(); @@ -1897,7 +1897,7 @@ cas_start(struct ifnet *ifp) } if (used != 0) { - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); sc->sc_tx_prod = (sc->sc_tx_prod + used) % CAS_NTXDESC; atomic_add_int(&sc->sc_tx_cnt, used); } Index: sys/dev/pci/if_de.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_de.c,v retrieving revision 1.144 diff -u -p -r1.144 if_de.c --- sys/dev/pci/if_de.c 20 Nov 2024 02:26:53 -0000 1.144 +++ sys/dev/pci/if_de.c 6 Jan 2026 00:38:47 -0000 @@ -4123,7 +4123,7 @@ tulip_ifwatchdog(struct ifnet *ifp) sc->tulip_dbg.dbg_last_rxintrs = sc->tulip_dbg.dbg_rxintrs; #endif /* TULIP_DEBUG */ - sc->tulip_if.if_timer = 1; + if_watchdog_schedule(&sc->tulip_if, 1); /* * These should be rare so do a bulk test up front so we can just skip * them if needed. @@ -4520,7 +4520,7 @@ tulip_attach(struct device * const paren ifp->if_ioctl = tulip_ifioctl; ifp->if_start = tulip_ifstart; ifp->if_watchdog = tulip_ifwatchdog; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); (*sc->tulip_boardsw->bd_media_probe)(sc); ifmedia_init(&sc->tulip_ifmedia, 0, Index: sys/dev/pci/if_em.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_em.c,v retrieving revision 1.379 diff -u -p -r1.379 if_em.c --- sys/dev/pci/if_em.c 14 Jul 2025 11:52:43 -0000 1.379 +++ sys/dev/pci/if_em.c 6 Jan 2026 00:38:47 -0000 @@ -692,7 +692,7 @@ em_start(struct ifqueue *ifq) #endif /* Set timeout in case hardware has problems transmitting */ - ifp->if_timer = EM_TX_TIMEOUT; + if_watchdog_schedule(ifp, EM_TX_TIMEOUT); if (sc->hw.mac_type == em_82547) { int len = m->m_pkthdr.len; @@ -829,7 +829,7 @@ em_watchdog(struct ifnet *ifp) * don't reset the hardware. */ if (E1000_READ_REG(&sc->hw, STATUS) & E1000_STATUS_TXOFF) { - ifp->if_timer = EM_TX_TIMEOUT; + if_watchdog_schedule(ifp, EM_TX_TIMEOUT); return; } printf("%s: watchdog: head %u tail %u TDH %u TDT %u\n", @@ -1629,7 +1629,7 @@ em_stop(void *arg, int softonly) KASSERT((ifp->if_flags & IFF_RUNNING) == 0); ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); em_free_transmit_structures(sc); em_free_receive_structures(sc); @@ -2690,7 +2690,7 @@ em_txeof(struct em_queue *que) if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); else if (tail == head) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /********************************************************************* Index: sys/dev/pci/if_et.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_et.c,v retrieving revision 1.45 diff -u -p -r1.45 if_et.c --- sys/dev/pci/if_et.c 14 Jul 2025 23:49:08 -0000 1.45 +++ sys/dev/pci/if_et.c 6 Jan 2026 00:38:48 -0000 @@ -463,7 +463,7 @@ et_stop(struct et_softc *sc) sc->sc_tx = 0; sc->sc_tx_intr = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); } @@ -1091,7 +1091,7 @@ et_start(struct ifnet *ifp) if (trans) { timeout_add_sec(&sc->sc_txtick, 1); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1912,7 +1912,7 @@ et_txeof(struct et_softc *sc) if (tbd->tbd_used == 0) { timeout_del(&sc->sc_txtick); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } if (tbd->tbd_used + ET_NSEG_SPARE <= ET_TX_NDESC) ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_igc.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_igc.c,v retrieving revision 1.30 diff -u -p -r1.30 if_igc.c --- sys/dev/pci/if_igc.c 17 Dec 2025 01:14:42 -0000 1.30 +++ sys/dev/pci/if_igc.c 6 Jan 2026 00:38:48 -0000 @@ -1963,7 +1963,7 @@ igc_initialize_transmit_unit(struct igc_ IGC_WRITE_REG(hw, IGC_TXDCTL(i), txdctl); } - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Program the Transmit Control Register */ tctl = IGC_READ_REG(&sc->hw, IGC_TCTL); Index: sys/dev/pci/if_ipw.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ipw.c,v retrieving revision 1.134 diff -u -p -r1.134 if_ipw.c --- sys/dev/pci/if_ipw.c 14 Apr 2024 03:26:25 -0000 1.134 +++ sys/dev/pci/if_ipw.c 6 Jan 2026 00:38:48 -0000 @@ -1322,7 +1322,7 @@ ipw_start(struct ifnet *ifp) /* start watchdog timer */ sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1331,7 +1331,7 @@ ipw_watchdog(struct ifnet *ifp) { struct ipw_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1340,7 +1340,7 @@ ipw_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2022,7 +2022,7 @@ ipw_stop(struct ifnet *ifp, int disable) ipw_stop_master(sc); CSR_WRITE_4(sc, IPW_CSR_RST, IPW_RST_SW_RESET); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_iwi.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwi.c,v retrieving revision 1.149 diff -u -p -r1.149 if_iwi.c --- sys/dev/pci/if_iwi.c 24 May 2024 06:02:53 -0000 1.149 +++ sys/dev/pci/if_iwi.c 6 Jan 2026 00:38:48 -0000 @@ -1418,7 +1418,7 @@ iwi_start(struct ifnet *ifp) /* start watchdog timer */ sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1427,7 +1427,7 @@ iwi_watchdog(struct ifnet *ifp) { struct iwi_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1436,7 +1436,7 @@ iwi_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2288,7 +2288,7 @@ iwi_stop(struct ifnet *ifp, int disable) int ac; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_iwm.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v retrieving revision 1.419 diff -u -p -r1.419 if_iwm.c --- sys/dev/pci/if_iwm.c 1 Dec 2025 16:30:46 -0000 1.419 +++ sys/dev/pci/if_iwm.c 6 Jan 2026 00:38:48 -0000 @@ -10496,7 +10496,7 @@ iwm_start(struct ifnet *ifp) } if (ifp->if_flags & IFF_UP) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } return; @@ -10620,7 +10620,7 @@ iwm_stop(struct ifnet *ifp) } iwm_led_blink_stop(sc); memset(sc->sc_tx_timer, 0, sizeof(sc->sc_tx_timer)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); splx(s); } @@ -10631,7 +10631,7 @@ iwm_watchdog(struct ifnet *ifp) struct iwm_softc *sc = ifp->if_softc; int i; - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* * We maintain a separate timer for each Tx queue because @@ -10651,7 +10651,7 @@ iwm_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } Index: sys/dev/pci/if_iwn.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v retrieving revision 1.264 diff -u -p -r1.264 if_iwn.c --- sys/dev/pci/if_iwn.c 4 Feb 2025 09:15:04 -0000 1.264 +++ sys/dev/pci/if_iwn.c 6 Jan 2026 00:38:48 -0000 @@ -3704,7 +3704,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -3713,7 +3713,7 @@ iwn_watchdog(struct ifnet *ifp) { struct iwn_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -3722,7 +3722,7 @@ iwn_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -7227,7 +7227,8 @@ iwn_stop(struct ifnet *ifp) struct ieee80211com *ic = &sc->sc_ic; timeout_del(&sc->calib_to); - ifp->if_timer = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_iwx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwx.c,v retrieving revision 1.194 diff -u -p -r1.194 if_iwx.c --- sys/dev/pci/if_iwx.c 1 Dec 2025 16:44:13 -0000 1.194 +++ sys/dev/pci/if_iwx.c 6 Jan 2026 00:38:48 -0000 @@ -9766,7 +9766,7 @@ iwx_start(struct ifnet *ifp) } if (ifp->if_flags & IFF_UP) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } return; @@ -9890,7 +9890,7 @@ iwx_stop(struct ifnet *ifp) iwx_clear_reorder_buffer(sc, rxba); } memset(sc->sc_tx_timer, 0, sizeof(sc->sc_tx_timer)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); splx(s); } @@ -9901,7 +9901,7 @@ iwx_watchdog(struct ifnet *ifp) struct iwx_softc *sc = ifp->if_softc; int i; - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* * We maintain a separate timer for each Tx queue because @@ -9921,7 +9921,7 @@ iwx_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } Index: sys/dev/pci/if_ix.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ix.c,v retrieving revision 1.222 diff -u -p -r1.222 if_ix.c --- sys/dev/pci/if_ix.c 11 Nov 2025 17:43:18 -0000 1.222 +++ sys/dev/pci/if_ix.c 6 Jan 2026 00:38:48 -0000 @@ -496,7 +496,7 @@ ixgbe_start(struct ifqueue *ifq) /* Set timeout in case hardware has problems transmitting */ txr->watchdog_timer = IXGBE_TX_TIMEOUT; - ifp->if_timer = IXGBE_TX_TIMEOUT; + if_watchdog_schedule(ifp, IXGBE_TX_TIMEOUT); post = 1; } @@ -711,7 +711,7 @@ ixgbe_watchdog(struct ifnet * ifp) if (!(IXGBE_READ_REG(hw, IXGBE_TFCS) & IXGBE_TFCS_TXON)) { for (i = 0; i < sc->num_queues; i++, txr++) txr->watchdog_timer = IXGBE_TX_TIMEOUT; - ifp->if_timer = IXGBE_TX_TIMEOUT; + if_watchdog_schedule(ifp, IXGBE_TX_TIMEOUT); return; } @@ -1651,7 +1651,7 @@ ixgbe_stop(void *arg) #if NKSTAT > 0 timeout_del(&sc->sc_kstat_tmo); #endif - ifp->if_timer = 0; + if_watchdog_disable(ifp); INIT_DEBUGOUT("ixgbe_stop: begin\n"); ixgbe_disable_intr(sc); @@ -1932,7 +1932,7 @@ ixgbe_setup_interface(struct ix_softc *s ifp->if_xflags = IFXF_MPSAFE; ifp->if_ioctl = ixgbe_ioctl; ifp->if_qstart = ixgbe_start; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_watchdog = ixgbe_watchdog; ifp->if_hardmtu = IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN; @@ -2423,7 +2423,7 @@ ixgbe_initialize_transmit_units(struct i break; } } - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (hw->mac.type != ixgbe_mac_82598EB) { uint32_t dmatxctl, rttdcs; @@ -2684,7 +2684,7 @@ ixgbe_txeof(struct ix_txring *txr) tail = 0; if (head == tail) { /* All clean, turn off the timer */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); break; } } Index: sys/dev/pci/if_ixgb.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ixgb.c,v retrieving revision 1.77 diff -u -p -r1.77 if_ixgb.c --- sys/dev/pci/if_ixgb.c 29 Jun 2025 19:32:08 -0000 1.77 +++ sys/dev/pci/if_ixgb.c 6 Jan 2026 00:38:48 -0000 @@ -302,7 +302,7 @@ ixgb_start(struct ifnet *ifp) #endif /* Set timeout in case hardware has problems transmitting */ - ifp->if_timer = IXGB_TX_TIMEOUT; + if_watchdog_schedule(ifp, IXGB_TX_TIMEOUT); post = 1; } @@ -409,7 +409,7 @@ ixgb_watchdog(struct ifnet * ifp) * reset the hardware. */ if (IXGB_READ_REG(&sc->hw, STATUS) & IXGB_STATUS_TXOFF) { - ifp->if_timer = IXGB_TX_TIMEOUT; + if_watchdog_schedule(ifp, IXGB_TX_TIMEOUT); return; } @@ -1416,10 +1416,10 @@ ixgb_txeof(struct ixgb_softc *sc) /* All clean, turn off the timer */ if (num_avail == sc->num_tx_desc) - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Some cleaned, reset the timer */ else if (num_avail != sc->num_tx_desc_avail) - ifp->if_timer = IXGB_TX_TIMEOUT; + if_watchdog_schedule(ifp, IXGB_TX_TIMEOUT); sc->num_tx_desc_avail = num_avail; } Index: sys/dev/pci/if_ixv.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ixv.c,v retrieving revision 1.2 diff -u -p -r1.2 if_ixv.c --- sys/dev/pci/if_ixv.c 14 Jul 2025 23:49:08 -0000 1.2 +++ sys/dev/pci/if_ixv.c 6 Jan 2026 00:38:48 -0000 @@ -771,7 +771,7 @@ ixv_setup_interface(struct device *dev, ifp->if_xflags = IFXF_MPSAFE; ifp->if_ioctl = ixv_ioctl; ifp->if_qstart = ixgbe_start; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_watchdog = ixv_watchdog; ifp->if_hardmtu = IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN; @@ -871,7 +871,7 @@ ixv_initialize_transmit_units(struct ix_ txdctl |= IXGBE_TXDCTL_ENABLE; IXGBE_WRITE_REG(hw, IXGBE_VFTXDCTL(i), txdctl); } - ifp->if_timer = 0; + if_watchdog_disable(ifp); return; } /* ixv_initialize_transmit_units */ Index: sys/dev/pci/if_jme.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_jme.c,v retrieving revision 1.58 diff -u -p -r1.58 if_jme.c --- sys/dev/pci/if_jme.c 24 May 2024 06:02:53 -0000 1.58 +++ sys/dev/pci/if_jme.c 6 Jan 2026 00:38:48 -0000 @@ -247,7 +247,7 @@ jme_miibus_statchg(struct device *dev) /* Stop driver */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->jme_tick_ch); /* Stop receiver/transmitter. */ @@ -1253,7 +1253,7 @@ jme_start(struct ifnet *ifp) CSR_WRITE_4(sc, JME_TXCSR, sc->jme_txcsr | TXCSR_TX_ENB | TXCSR_TXQ_N_START(TXCSR_TXQ0)); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = JME_TX_TIMEOUT; + if_watchdog_schedule(ifp, JME_TX_TIMEOUT); } } @@ -1554,7 +1554,7 @@ jme_txeof(struct jme_softc *sc) sc->jme_cdata.jme_tx_cons = cons; if (sc->jme_cdata.jme_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->jme_cdata.jme_tx_cnt + JME_TXD_RSVD <= JME_TX_RING_CNT - JME_TXD_RSVD) @@ -2015,7 +2015,7 @@ jme_stop(struct jme_softc *sc) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->jme_tick_ch); sc->jme_flags &= ~JME_FLAG_LINK; Index: sys/dev/pci/if_lge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_lge.c,v retrieving revision 1.82 diff -u -p -r1.82 if_lge.c --- sys/dev/pci/if_lge.c 6 Sep 2024 10:54:08 -0000 1.82 +++ sys/dev/pci/if_lge.c 6 Jan 2026 00:38:48 -0000 @@ -761,7 +761,7 @@ lge_txeof(struct lge_softc *sc) ifp = &sc->arpcom.ac_if; /* Clear the timeout timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* * Go through our tx list and free mbufs for those @@ -781,7 +781,7 @@ lge_txeof(struct lge_softc *sc) txdone--; LGE_INC(idx, LGE_TX_LIST_CNT); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } sc->lge_cdata.lge_tx_cons = idx; @@ -980,7 +980,7 @@ lge_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1238,7 +1238,7 @@ lge_stop(struct lge_softc *sc) struct ifnet *ifp; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->lge_timeout); ifp->if_flags &= ~IFF_RUNNING; Index: sys/dev/pci/if_lii.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_lii.c,v retrieving revision 1.48 diff -u -p -r1.48 if_lii.c --- sys/dev/pci/if_lii.c 31 Aug 2024 16:23:09 -0000 1.48 +++ sys/dev/pci/if_lii.c 6 Jan 2026 00:38:48 -0000 @@ -827,7 +827,7 @@ lii_stop(struct ifnet *ifp) timeout_del(&sc->sc_tick); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_msk.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_msk.c,v retrieving revision 1.145 diff -u -p -r1.145 if_msk.c --- sys/dev/pci/if_msk.c 31 Aug 2024 16:23:09 -0000 1.145 +++ sys/dev/pci/if_msk.c 6 Jan 2026 00:38:48 -0000 @@ -1679,7 +1679,7 @@ msk_start(struct ifnet *ifp) SK_IF_WRITE_2(sc_if, 1, SK_TXQA1_Y2_PREF_PUTIDX, prod); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = MSK_TX_TIMEOUT; + if_watchdog_schedule(ifp, MSK_TX_TIMEOUT); } void @@ -1797,7 +1797,7 @@ msk_txeof(struct sk_if_softc *sc_if, uns SK_INC(cons, MSK_TX_RING_CNT); } if (cons == sc_if->sk_cdata.sk_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc_if->sk_cdata.sk_tx_cons = cons; Index: sys/dev/pci/if_mwx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_mwx.c,v retrieving revision 1.7 diff -u -p -r1.7 if_mwx.c --- sys/dev/pci/if_mwx.c 1 Aug 2025 14:37:06 -0000 1.7 +++ sys/dev/pci/if_mwx.c 6 Jan 2026 00:38:48 -0000 @@ -639,7 +639,7 @@ mwx_stop(struct ifnet *ifp) task_del(systq, &sc->sc_reset_task); task_del(systq, &sc->sc_scan_task); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -656,7 +656,7 @@ mwx_stop(struct ifnet *ifp) void mwx_watchdog(struct ifnet *ifp) { - ifp->if_timer = 0; + if_watchdog_disable(ifp); ieee80211_watchdog(ifp); } @@ -717,7 +717,7 @@ mwx_start(struct ifnet *ifp) } if (ifp->if_flags & IFF_UP) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } Index: sys/dev/pci/if_nep.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_nep.c,v retrieving revision 1.35 diff -u -p -r1.35 if_nep.c --- sys/dev/pci/if_nep.c 24 May 2024 06:02:56 -0000 1.35 +++ sys/dev/pci/if_nep.c 6 Jan 2026 00:38:48 -0000 @@ -1103,7 +1103,7 @@ nep_tx_proc(struct nep_softc *sc) } if (sc->sc_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -1652,7 +1652,7 @@ nep_up(struct nep_softc *sc) ifp->if_flags |= IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Enable interrupts. */ nep_write(sc, LD_IM1(LDN_MAC(sc->sc_port)), 0); @@ -1690,7 +1690,7 @@ nep_down(struct nep_softc *sc) ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); nep_disable_rx_mac(sc); @@ -1906,7 +1906,7 @@ nep_start(struct ifnet *ifp) sc->sc_tx_prod = idx; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } Index: sys/dev/pci/if_nfe.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_nfe.c,v retrieving revision 1.127 diff -u -p -r1.127 if_nfe.c --- sys/dev/pci/if_nfe.c 31 Aug 2024 16:23:09 -0000 1.127 +++ sys/dev/pci/if_nfe.c 6 Jan 2026 00:38:48 -0000 @@ -834,7 +834,7 @@ nfe_txeof(struct nfe_softc *sc) m_freem(data->m); data->m = NULL; - ifp->if_timer = 0; + if_watchdog_disable(ifp); skip: sc->txq.queued--; sc->txq.next = (sc->txq.next + 1) % NFE_TX_RING_COUNT; @@ -994,7 +994,7 @@ nfe_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1121,7 +1121,7 @@ nfe_stop(struct ifnet *ifp, int disable) timeout_del(&sc->sc_tick_ch); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_ngbe.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ngbe.c,v retrieving revision 1.8 diff -u -p -r1.8 if_ngbe.c --- sys/dev/pci/if_ngbe.c 11 Nov 2025 17:43:18 -0000 1.8 +++ sys/dev/pci/if_ngbe.c 6 Jan 2026 00:38:48 -0000 @@ -734,7 +734,7 @@ ngbe_start(struct ifqueue *ifq) /* Set timeout in case hardware has problems transmitting */ txr->watchdog_timer = NGBE_TX_TIMEOUT; - ifp->if_timer = NGBE_TX_TIMEOUT; + if_watchdog_schedule(ifp, NGBE_TX_TIMEOUT); post = 1; } @@ -757,7 +757,7 @@ ngbe_stop(struct ngbe_softc *sc) /* Tell the stack that the interface is no longer active. */ ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ngbe_disable_pcie_master(sc); /* Disable receives */ @@ -1753,7 +1753,7 @@ ngbe_initialize_transmit_unit(struct ngb } } - ifp->if_timer = 0; + if_watchdog_disable(ifp); NGBE_WRITE_REG_MASK(hw, NGBE_TSEC_BUF_AE, 0x3ff, 0x10); NGBE_WRITE_REG_MASK(hw, NGBE_TSEC_CTL, 0x2, 0); @@ -4497,7 +4497,7 @@ ngbe_txeof(struct tx_ring *txr) cons = 0; if (prod == cons) { /* All clean, turn off the timer */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); break; } } Index: sys/dev/pci/if_nge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_nge.c,v retrieving revision 1.99 diff -u -p -r1.99 if_nge.c --- sys/dev/pci/if_nge.c 24 May 2024 06:02:56 -0000 1.99 +++ sys/dev/pci/if_nge.c 6 Jan 2026 00:38:48 -0000 @@ -1152,7 +1152,7 @@ nge_txeof(struct nge_softc *sc) sc->nge_cdata.nge_tx_cons = idx; if (idx == sc->nge_cdata.nge_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -1434,7 +1434,7 @@ nge_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1861,7 +1861,7 @@ nge_stop(struct nge_softc *sc) struct mii_data *mii; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->nge_tbi) { mii = NULL; } else { Index: sys/dev/pci/if_oce.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_oce.c,v retrieving revision 1.109 diff -u -p -r1.109 if_oce.c --- sys/dev/pci/if_oce.c 24 May 2024 06:02:56 -0000 1.109 +++ sys/dev/pci/if_oce.c 6 Jan 2026 00:38:48 -0000 @@ -1192,7 +1192,7 @@ oce_start(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch */ if (pkts) - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } int @@ -1446,7 +1446,7 @@ oce_intr_wq(void *arg) } } if (wq->ring->nused == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ncqe) oce_arm_cq(cq, ncqe, FALSE); Index: sys/dev/pci/if_pcn.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_pcn.c,v retrieving revision 1.50 diff -u -p -r1.50 if_pcn.c --- sys/dev/pci/if_pcn.c 24 May 2024 06:02:56 -0000 1.50 +++ sys/dev/pci/if_pcn.c 6 Jan 2026 00:38:48 -0000 @@ -953,7 +953,7 @@ pcn_start(struct ifnet *ifp) if (sc->sc_txfree != ofree) { /* Set a watchdog timer in case the chip flakes out. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1229,7 +1229,7 @@ pcn_txintr(struct pcn_softc *sc) * timer. */ if (sc->sc_txsfree == PCN_TXQUEUELEN) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); @@ -1683,7 +1683,7 @@ pcn_stop(struct ifnet *ifp, int disable) /* Mark the interface as down and cancel the watchdog timer. */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Stop the chip. */ pcn_csr_write(sc, LE_CSR0, LE_C0_STOP); Index: sys/dev/pci/if_rge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_rge.c,v retrieving revision 1.41 diff -u -p -r1.41 if_rge.c --- sys/dev/pci/if_rge.c 17 Nov 2025 08:59:22 -0000 1.41 +++ sys/dev/pci/if_rge.c 6 Jan 2026 00:38:48 -0000 @@ -652,7 +652,7 @@ rge_start(struct ifqueue *ifq) return; /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); q->q_tx.rge_txq_prodidx = idx; ifq_serialize(ifq, &sc->sc_task); @@ -917,7 +917,7 @@ rge_stop(struct ifnet *ifp) timeout_del(&sc->sc_timeout); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; sc->rge_timerintr = 0; @@ -1508,7 +1508,7 @@ rge_txeof(struct rge_queues *q) else if (free == 2) ifq_serialize(&ifp->if_snd, &sc->sc_task); else - ifp->if_timer = 0; + if_watchdog_disable(ifp); return (1); } Index: sys/dev/pci/if_se.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_se.c,v retrieving revision 1.27 diff -u -p -r1.27 if_se.c --- sys/dev/pci/if_se.c 5 Nov 2024 18:58:59 -0000 1.27 +++ sys/dev/pci/if_se.c 6 Jan 2026 00:38:48 -0000 @@ -1015,7 +1015,7 @@ se_txeof(struct se_softc *sc) cd->se_tx_cons = i; if (cd->se_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -1232,7 +1232,7 @@ se_start(struct ifnet *ifp) /* Transmit */ cd->se_tx_prod = i; CSR_WRITE_4(sc, TX_CTL, 0x1a00 | TX_CTL_ENB | TX_CTL_POLL); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1407,7 +1407,7 @@ se_stop(struct se_softc *sc) { struct ifnet *ifp = &sc->sc_ac.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); timeout_del(&sc->sc_tick_tmo); Index: sys/dev/pci/if_sis.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_sis.c,v retrieving revision 1.146 diff -u -p -r1.146 if_sis.c --- sys/dev/pci/if_sis.c 31 Aug 2024 16:23:09 -0000 1.146 +++ sys/dev/pci/if_sis.c 6 Jan 2026 00:38:48 -0000 @@ -1509,7 +1509,10 @@ sis_txeof(struct sis_softc *sc) ifq_clr_oactive(&ifp->if_snd); } - ifp->if_timer = (sc->sis_cdata.sis_tx_cnt == 0) ? 0 : 5; + if (sc->sis_cdata.sis_tx_cnt == 0) + if_watchdog_disable(ifp); + else + if_watchdog_schedule(ifp, 5); } void @@ -1710,7 +1713,7 @@ sis_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1977,7 +1980,7 @@ sis_stop(struct sis_softc *sc) return; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->sis_timeout); Index: sys/dev/pci/if_sk.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_sk.c,v retrieving revision 1.200 diff -u -p -r1.200 if_sk.c --- sys/dev/pci/if_sk.c 5 Nov 2024 18:58:59 -0000 1.200 +++ sys/dev/pci/if_sk.c 6 Jan 2026 00:38:48 -0000 @@ -1527,7 +1527,7 @@ sk_start(struct ifnet *ifp) CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = SK_TX_TIMEOUT; + if_watchdog_schedule(ifp, SK_TX_TIMEOUT); } @@ -1685,7 +1685,10 @@ sk_txeof(struct sk_if_softc *sc_if) sc_if->sk_cdata.sk_tx_cnt--; SK_INC(idx, SK_TX_RING_CNT); } - ifp->if_timer = sc_if->sk_cdata.sk_tx_cnt > 0 ? SK_TX_TIMEOUT : 0; + if (sc_if->sk_cdata.sk_tx_cnt > 0) + if_watchdog_schedule(ifp, SK_TX_TIMEOUT); + else + if_watchdog_disable(ifp); if (sc_if->sk_cdata.sk_tx_cnt < SK_TX_RING_CNT - 2) ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pci/if_ste.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ste.c,v retrieving revision 1.71 diff -u -p -r1.71 if_ste.c --- sys/dev/pci/if_ste.c 24 May 2024 06:02:57 -0000 1.71 +++ sys/dev/pci/if_ste.c 6 Jan 2026 00:38:48 -0000 @@ -752,7 +752,7 @@ ste_txeof(struct ste_softc *sc) sc->ste_cdata.ste_tx_cons = idx; if (idx == sc->ste_cdata.ste_tx_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -1366,7 +1366,7 @@ ste_start(struct ifnet *ifp) #endif STE_INC(idx, STE_TX_LIST_CNT); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } sc->ste_cdata.ste_tx_prod = idx; } Index: sys/dev/pci/if_stge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_stge.c,v retrieving revision 1.74 diff -u -p -r1.74 if_stge.c --- sys/dev/pci/if_stge.c 24 May 2024 06:02:57 -0000 1.74 +++ sys/dev/pci/if_stge.c 6 Jan 2026 00:38:48 -0000 @@ -616,7 +616,7 @@ stge_start(struct ifnet *ifp) sc->sc_txdirty = firsttx; /* Set a watchdog timer in case the chip flakes out. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -829,7 +829,7 @@ stge_txintr(struct stge_softc *sc) * timer. */ if (sc->sc_txpending == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -1335,7 +1335,7 @@ stge_stop(struct ifnet *ifp, int disable */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Down the MII. */ mii_down(&sc->sc_mii); Index: sys/dev/pci/if_tl.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_tl.c,v retrieving revision 1.80 diff -u -p -r1.80 if_tl.c --- sys/dev/pci/if_tl.c 15 Jul 2025 13:40:02 -0000 1.80 +++ sys/dev/pci/if_tl.c 6 Jan 2026 00:38:48 -0000 @@ -1170,7 +1170,7 @@ tl_intvec_txeoc(void *xsc, u_int32_t typ ifp = &sc->arpcom.ac_if; /* Clear the timeout timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->tl_cdata.tl_tx_head == NULL) { ifq_clr_oactive(&ifp->if_snd); @@ -1526,7 +1526,7 @@ tl_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 10; + if_watchdog_schedule(ifp, 10); } void Index: sys/dev/pci/if_txp.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_txp.c,v retrieving revision 1.131 diff -u -p -r1.131 if_txp.c --- sys/dev/pci/if_txp.c 24 May 2024 06:02:57 -0000 1.131 +++ sys/dev/pci/if_txp.c 6 Jan 2026 00:38:48 -0000 @@ -836,7 +836,7 @@ txp_tx_reclaim(struct txp_softc *sc, str r->r_cons = cons; r->r_cnt = cnt; if (cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } int @@ -1358,7 +1358,7 @@ txp_start(struct ifnet *ifp) } - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); #if NBPFILTER > 0 if (ifp->if_bpf) @@ -1609,7 +1609,7 @@ txp_stop(struct txp_softc *sc) /* Mark the interface as down and cancel the watchdog timer. */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); txp_command(sc, TXP_CMD_TX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); txp_command(sc, TXP_CMD_RX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); Index: sys/dev/pci/if_vge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_vge.c,v retrieving revision 1.78 diff -u -p -r1.78 if_vge.c --- sys/dev/pci/if_vge.c 24 May 2024 06:02:57 -0000 1.78 +++ sys/dev/pci/if_vge.c 6 Jan 2026 00:38:48 -0000 @@ -1188,7 +1188,7 @@ vge_txeof(struct vge_softc *sc) if (idx != sc->vge_ldata.vge_tx_considx) { sc->vge_ldata.vge_tx_considx = idx; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); } /* @@ -1480,7 +1480,7 @@ vge_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } int @@ -1799,7 +1799,7 @@ vge_stop(struct vge_softc *sc) struct ifnet *ifp; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->timer_handle); Index: sys/dev/pci/if_vmx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_vmx.c,v retrieving revision 1.94 diff -u -p -r1.94 if_vmx.c --- sys/dev/pci/if_vmx.c 11 Nov 2025 17:43:18 -0000 1.94 +++ sys/dev/pci/if_vmx.c 6 Jan 2026 00:38:49 -0000 @@ -1366,7 +1366,7 @@ vmxnet3_stop(struct ifnet *ifp) int queue; ifp->if_flags &= ~IFF_RUNNING; - ifp->if_timer = 0; + if_watchdog_disable(ifp); vmxnet3_disable_all_intrs(sc); Index: sys/dev/pci/if_vr.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_vr.c,v retrieving revision 1.162 diff -u -p -r1.162 if_vr.c --- sys/dev/pci/if_vr.c 31 Aug 2024 16:23:09 -0000 1.162 +++ sys/dev/pci/if_vr.c 6 Jan 2026 00:38:49 -0000 @@ -1040,7 +1040,7 @@ next: sc->vr_cdata.vr_tx_cons = cur_tx; if (sc->vr_cdata.vr_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } void @@ -1348,7 +1348,7 @@ vr_start(struct ifnet *ifp) VR_SETBIT16(sc, VR_COMMAND, /*VR_CMD_TX_ON|*/VR_CMD_TX_GO); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -1593,7 +1593,7 @@ vr_stop(struct vr_softc *sc) bus_dmamap_t map; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->sc_to); timeout_del(&sc->sc_rxto); Index: sys/dev/pci/if_vte.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_vte.c,v retrieving revision 1.28 diff -u -p -r1.28 if_vte.c --- sys/dev/pci/if_vte.c 24 May 2024 06:02:57 -0000 1.28 +++ sys/dev/pci/if_vte.c 6 Jan 2026 00:38:49 -0000 @@ -693,7 +693,7 @@ vte_start(struct ifnet *ifp) sc->vte_cdata.vte_tx_ring_map->dm_mapsize, BUS_DMASYNC_PREWRITE); CSR_WRITE_2(sc, VTE_TX_POLL, TX_POLL_START); - ifp->if_timer = VTE_TX_TIMEOUT; + if_watchdog_schedule(ifp, VTE_TX_TIMEOUT); } } @@ -921,7 +921,7 @@ vte_txeof(struct vte_softc *sc) * frames in TX queue. */ if (sc->vte_cdata.vte_tx_cnt == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); } } @@ -1247,7 +1247,7 @@ vte_stop(struct vte_softc *sc) */ ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); sc->vte_flags &= ~VTE_FLAG_LINK; timeout_del(&sc->vte_tick_ch); vte_stats_update(sc); Index: sys/dev/pci/if_wb.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_wb.c,v retrieving revision 1.78 diff -u -p -r1.78 if_wb.c --- sys/dev/pci/if_wb.c 6 Sep 2024 10:54:08 -0000 1.78 +++ sys/dev/pci/if_wb.c 6 Jan 2026 00:38:49 -0000 @@ -973,7 +973,7 @@ wb_txeof(struct wb_softc *sc) ifp = &sc->arpcom.ac_if; /* Clear the timeout timer. */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->wb_cdata.wb_tx_head == NULL) return; @@ -1026,7 +1026,7 @@ wb_txeoc(struct wb_softc *sc) ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->wb_cdata.wb_tx_head == NULL) { ifq_clr_oactive(&ifp->if_snd); @@ -1034,7 +1034,7 @@ wb_txeoc(struct wb_softc *sc) } else { if (WB_TXOWN(sc->wb_cdata.wb_tx_head) == WB_UNSENT) { WB_TXOWN(sc->wb_cdata.wb_tx_head) = WB_TXSTAT_OWN; - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); CSR_WRITE_4(sc, WB_TXSTART, 0xFFFFFFFF); } } @@ -1317,7 +1317,7 @@ wb_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); return; } @@ -1544,7 +1544,7 @@ wb_stop(struct wb_softc *sc) struct ifnet *ifp; ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); timeout_del(&sc->wb_tick_tmo); Index: sys/dev/pci/if_wpi.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_wpi.c,v retrieving revision 1.158 diff -u -p -r1.158 if_wpi.c --- sys/dev/pci/if_wpi.c 24 May 2024 06:02:57 -0000 1.158 +++ sys/dev/pci/if_wpi.c 6 Jan 2026 00:38:49 -0000 @@ -1926,7 +1926,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1935,7 +1935,7 @@ wpi_watchdog(struct ifnet *ifp) { struct wpi_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1944,7 +1944,7 @@ wpi_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -3298,7 +3298,8 @@ wpi_stop(struct ifnet *ifp, int disable) struct wpi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - ifp->if_timer = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/pcmcia/if_an_pcmcia.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_an_pcmcia.c,v retrieving revision 1.28 diff -u -p -r1.28 if_an_pcmcia.c --- sys/dev/pcmcia/if_an_pcmcia.c 26 May 2024 08:46:28 -0000 1.28 +++ sys/dev/pcmcia/if_an_pcmcia.c 6 Jan 2026 00:39:00 -0000 @@ -172,7 +172,7 @@ an_pcmcia_activate(struct device *dev, i switch (act) { case DVACT_DEACTIVATE: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) an_stop(ifp, 1); if (sc->sc_ih) Index: sys/dev/pcmcia/if_ep_pcmcia.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_ep_pcmcia.c,v retrieving revision 1.52 diff -u -p -r1.52 if_ep_pcmcia.c --- sys/dev/pcmcia/if_ep_pcmcia.c 26 May 2024 08:46:28 -0000 1.52 +++ sys/dev/pcmcia/if_ep_pcmcia.c 6 Jan 2026 00:39:00 -0000 @@ -375,7 +375,7 @@ ep_pcmcia_activate(struct device *dev, i switch (act) { case DVACT_SUSPEND: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) epstop(esc); if (sc->sc_ep.sc_ih) Index: sys/dev/pcmcia/if_malo.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_malo.c,v retrieving revision 1.100 diff -u -p -r1.100 if_malo.c --- sys/dev/pcmcia/if_malo.c 26 May 2024 08:46:28 -0000 1.100 +++ sys/dev/pcmcia/if_malo.c 6 Jan 2026 00:39:00 -0000 @@ -729,7 +729,7 @@ cmalo_stop(struct malo_softc *sc) /* reset device */ cmalo_cmd_set_reset(sc); sc->sc_flags &= ~MALO_FW_LOADED; - ifp->if_timer = 0; + if_watchdog_disable(ifp); DPRINTF(1, "%s: device down\n", sc->sc_dev.dv_xname); } @@ -1034,7 +1034,7 @@ cmalo_tx(struct malo_softc *sc, struct m MALO_WRITE_2(sc, MALO_REG_CARD_INTR_CAUSE, MALO_VAL_TX_DL_OVER); ifq_set_oactive(&ifp->if_snd); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); DPRINTF(2, "%s: TX status=%d, pkglen=%d, pkgoffset=%d\n", sc->sc_dev.dv_xname, txdesc->status, letoh16(txdesc->pkglen), @@ -1053,7 +1053,7 @@ cmalo_tx_done(struct malo_softc *sc) DPRINTF(2, "%s: TX done\n", sc->sc_dev.dv_xname); ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); cmalo_start(ifp); } Index: sys/dev/pcmcia/if_ne_pcmcia.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_ne_pcmcia.c,v retrieving revision 1.103 diff -u -p -r1.103 if_ne_pcmcia.c --- sys/dev/pcmcia/if_ne_pcmcia.c 26 May 2024 08:46:28 -0000 1.103 +++ sys/dev/pcmcia/if_ne_pcmcia.c 6 Jan 2026 00:39:00 -0000 @@ -858,7 +858,7 @@ ne_pcmcia_activate(struct device *dev, i switch (act) { case DVACT_SUSPEND: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) { dp8390_stop(esc); ifp->if_flags &= ~IFF_RUNNING; @@ -877,7 +877,7 @@ ne_pcmcia_activate(struct device *dev, i dp8390_init(esc); break; case DVACT_DEACTIVATE: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) { dp8390_stop(esc); ifp->if_flags &= ~IFF_RUNNING; Index: sys/dev/pcmcia/if_sm_pcmcia.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_sm_pcmcia.c,v retrieving revision 1.41 diff -u -p -r1.41 if_sm_pcmcia.c --- sys/dev/pcmcia/if_sm_pcmcia.c 26 May 2024 08:46:28 -0000 1.41 +++ sys/dev/pcmcia/if_sm_pcmcia.c 6 Jan 2026 00:39:00 -0000 @@ -225,7 +225,7 @@ sm_pcmcia_activate(struct device *dev, i switch (act) { case DVACT_DEACTIVATE: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) smc91cxx_stop(&sc->sc_smc); if (sc->sc_ih) Index: sys/dev/pcmcia/if_wi_pcmcia.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_wi_pcmcia.c,v retrieving revision 1.77 diff -u -p -r1.77 if_wi_pcmcia.c --- sys/dev/pcmcia/if_wi_pcmcia.c 26 May 2024 08:46:28 -0000 1.77 +++ sys/dev/pcmcia/if_wi_pcmcia.c 6 Jan 2026 00:39:00 -0000 @@ -470,7 +470,7 @@ wi_pcmcia_activate(struct device *dev, i switch (act) { case DVACT_SUSPEND: - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifp->if_flags & IFF_RUNNING) wi_stop(sc); sc->wi_flags &= ~WI_FLAGS_INITIALIZED; Index: sys/dev/pcmcia/if_xe.c =================================================================== RCS file: /cvs/src/sys/dev/pcmcia/if_xe.c,v retrieving revision 1.64 diff -u -p -r1.64 if_xe.c --- sys/dev/pcmcia/if_xe.c 26 May 2024 08:46:28 -0000 1.64 +++ sys/dev/pcmcia/if_xe.c 6 Jan 2026 00:39:00 -0000 @@ -464,7 +464,7 @@ xe_pcmcia_activate(struct device *dev, i xe_stop(&sc->sc_xe); break; case DVACT_DEACTIVATE: - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; if (sc->sc_xe.sc_ih) pcmcia_intr_disestablish(sc->sc_pf, sc->sc_xe.sc_ih); @@ -615,7 +615,7 @@ xe_intr(void *arg) u_int8_t esr, rsr, isr, rx_status, savedpage; u_int16_t tx_status, recvcount = 0, tempint; - ifp->if_timer = 0; /* turn watchdog timer off */ + if_watchdog_disable(ifp); /* turn watchdog timer off */ if (sc->sc_flags & XEF_MOHAWK) { /* Disable interrupt (Linux does it). */ @@ -1003,7 +1003,7 @@ xe_stop(struct xe_softc *sc) DELAY(40000); /* Cancel watchdog timer. */ - sc->sc_arpcom.ac_if.if_timer = 0; + if_watchdog_disable(&sc->sc_arpcom.ac_if); } void @@ -1106,7 +1106,7 @@ xe_start(struct ifnet *ifp) splx(s); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } int Index: sys/dev/pv/if_xnf.c =================================================================== RCS file: /cvs/src/sys/dev/pv/if_xnf.c,v retrieving revision 1.70 diff -u -p -r1.70 if_xnf.c --- sys/dev/pv/if_xnf.c 24 May 2024 10:05:55 -0000 1.70 +++ sys/dev/pv/if_xnf.c 6 Jan 2026 00:39:00 -0000 @@ -467,7 +467,7 @@ xnf_stop(struct xnf_softc *sc) xen_intr_mask(sc->sc_xih); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_barrier(&ifp->if_snd); xen_intr_barrier(sc->sc_xih); @@ -529,7 +529,7 @@ xnf_start(struct ifqueue *ifq) BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (prod - txr->txr_prod_event < prod - oprod) xen_intr_signal(sc->sc_xih); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -735,7 +735,7 @@ xnf_txeof(struct xnf_softc *sc) atomic_add_int(&sc->sc_tx_avail, done); if (sc->sc_tx_cons == txr->txr_prod) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); } Index: sys/dev/sbus/be.c =================================================================== RCS file: /cvs/src/sys/dev/sbus/be.c,v retrieving revision 1.45 diff -u -p -r1.45 be.c --- sys/dev/sbus/be.c 13 May 2024 01:15:53 -0000 1.45 +++ sys/dev/sbus/be.c 6 Jan 2026 00:39:00 -0000 @@ -861,7 +861,7 @@ betint(struct be_softc *sc) bestart(ifp); if (sc->sc_rb.rb_td_nbusy == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); return (1); } Index: sys/dev/sbus/qe.c =================================================================== RCS file: /cvs/src/sys/dev/sbus/qe.c,v retrieving revision 1.43 diff -u -p -r1.43 qe.c --- sys/dev/sbus/qe.c 16 Oct 2022 01:22:40 -0000 1.43 +++ sys/dev/sbus/qe.c 6 Jan 2026 00:39:00 -0000 @@ -617,7 +617,7 @@ qe_tint(struct qe_softc *sc) } if (sc->sc_rb.rb_td_nbusy == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_rb.rb_tdtail != bix) { sc->sc_rb.rb_tdtail = bix; Index: sys/dev/usb/if_athn_usb.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_athn_usb.c,v retrieving revision 1.67 diff -u -p -r1.67 if_athn_usb.c --- sys/dev/usb/if_athn_usb.c 29 May 2024 07:27:33 -0000 1.67 +++ sys/dev/usb/if_athn_usb.c 6 Jan 2026 00:39:00 -0000 @@ -2455,7 +2455,7 @@ athn_usb_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -2464,7 +2464,7 @@ athn_usb_watchdog(struct ifnet *ifp) { struct athn_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -2473,7 +2473,7 @@ athn_usb_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } @@ -2702,7 +2702,7 @@ athn_usb_stop(struct ifnet *ifp) int s; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_atu.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_atu.c,v retrieving revision 1.135 diff -u -p -r1.135 if_atu.c --- sys/dev/usb/if_atu.c 23 May 2024 03:21:08 -0000 1.135 +++ sys/dev/usb/if_atu.c 6 Jan 2026 00:39:00 -0000 @@ -1791,7 +1791,7 @@ atu_txeof(struct usbd_xfer *xfer, void * SLIST_INSERT_HEAD(&sc->atu_cdata.atu_tx_free, c, atu_list); sc->atu_cdata.atu_tx_inuse--; if (sc->atu_cdata.atu_tx_inuse == 0) - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); splx(s); @@ -2002,7 +2002,7 @@ bad: ieee80211_release_node(ic, ni); continue; } - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } } @@ -2197,7 +2197,7 @@ atu_watchdog(struct ifnet *ifp) DPRINTF(("%s: atu_watchdog\n", sc->atu_dev.dv_xname)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); if ((ifp->if_flags & (IFF_RUNNING|IFF_UP)) != (IFF_RUNNING|IFF_UP)) return; @@ -2245,7 +2245,7 @@ atu_stop(struct ifnet *ifp, int disable) s = splnet(); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); /* Stop transfers. */ if (sc->atu_ep[ATU_ENDPT_RX] != NULL) { Index: sys/dev/usb/if_aue.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_aue.c,v retrieving revision 1.113 diff -u -p -r1.113 if_aue.c --- sys/dev/usb/if_aue.c 23 May 2024 03:21:08 -0000 1.113 +++ sys/dev/usb/if_aue.c 6 Jan 2026 00:39:00 -0000 @@ -1092,7 +1092,7 @@ aue_txeof(struct usbd_xfer *xfer, void * DPRINTFN(10,("%s: %s: enter status=%d\n", sc->aue_dev.dv_xname, __func__, status)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -1263,7 +1263,7 @@ aue_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1505,7 +1505,7 @@ aue_stop(struct aue_softc *sc) DPRINTFN(5,("%s: %s: enter\n", sc->aue_dev.dv_xname, __func__)); ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_axe.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_axe.c,v retrieving revision 1.144 diff -u -p -r1.144 if_axe.c --- sys/dev/usb/if_axe.c 4 Sep 2024 07:54:52 -0000 1.144 +++ sys/dev/usb/if_axe.c 6 Jan 2026 00:39:00 -0000 @@ -1115,7 +1115,7 @@ axe_txeof(struct usbd_xfer *xfer, void * return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); m_freem(c->axe_mbuf); @@ -1269,7 +1269,7 @@ axe_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); return; } @@ -1463,7 +1463,7 @@ axe_stop(struct axe_softc *sc) axe_reset(sc); ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_axen.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_axen.c,v retrieving revision 1.34 diff -u -p -r1.34 if_axen.c --- sys/dev/usb/if_axen.c 7 Oct 2024 07:35:40 -0000 1.34 +++ sys/dev/usb/if_axen.c 6 Jan 2026 00:39:00 -0000 @@ -1108,7 +1108,7 @@ axen_txeof(struct usbd_xfer *xfer, void return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); m_freem(c->axen_mbuf); @@ -1265,7 +1265,7 @@ axen_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1449,7 +1449,7 @@ axen_stop(struct axen_softc *sc) axen_reset(sc); ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_cdce.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v retrieving revision 1.83 diff -u -p -r1.83 if_cdce.c --- sys/dev/usb/if_cdce.c 23 May 2024 03:21:08 -0000 1.83 +++ sys/dev/usb/if_cdce.c 6 Jan 2026 00:39:00 -0000 @@ -390,7 +390,7 @@ cdce_start(struct ifnet *ifp) ifq_set_oactive(&ifp->if_snd); - ifp->if_timer = 6; + if_watchdog_schedule(ifp, 6); } int @@ -435,7 +435,7 @@ cdce_stop(struct cdce_softc *sc) struct ifnet *ifp = GET_IFP(sc); int i; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -780,7 +780,7 @@ cdce_txeof(struct usbd_xfer *xfer, void s = splnet(); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { Index: sys/dev/usb/if_cue.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_cue.c,v retrieving revision 1.81 diff -u -p -r1.81 if_cue.c --- sys/dev/usb/if_cue.c 23 May 2024 03:21:08 -0000 1.81 +++ sys/dev/usb/if_cue.c 6 Jan 2026 00:39:00 -0000 @@ -751,7 +751,7 @@ cue_txeof(struct usbd_xfer *xfer, void * DPRINTFN(10,("%s: %s: enter status=%d\n", sc->cue_dev.dv_xname, __func__, status)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -899,7 +899,7 @@ cue_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1117,7 +1117,7 @@ cue_stop(struct cue_softc *sc) DPRINTFN(10,("%s: %s: enter\n", sc->cue_dev.dv_xname,__func__)); ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_kue.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_kue.c,v retrieving revision 1.93 diff -u -p -r1.93 if_kue.c --- sys/dev/usb/if_kue.c 23 May 2024 03:21:08 -0000 1.93 +++ sys/dev/usb/if_kue.c 6 Jan 2026 00:39:00 -0000 @@ -766,7 +766,7 @@ kue_txeof(struct usbd_xfer *xfer, void * DPRINTFN(10,("%s: %s: enter status=%d\n", sc->kue_dev.dv_xname, __func__, status)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -875,7 +875,7 @@ kue_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 6; + if_watchdog_schedule(ifp, 6); } void @@ -1090,7 +1090,7 @@ kue_stop(struct kue_softc *sc) DPRINTFN(5,("%s: %s: enter\n", sc->kue_dev.dv_xname,__func__)); ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_mos.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_mos.c,v retrieving revision 1.44 diff -u -p -r1.44 if_mos.c --- sys/dev/usb/if_mos.c 23 May 2024 03:21:08 -0000 1.44 +++ sys/dev/usb/if_mos.c 6 Jan 2026 00:39:00 -0000 @@ -1003,7 +1003,7 @@ mos_txeof(struct usbd_xfer *xfer, void * return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); m_freem(c->mos_mbuf); @@ -1142,7 +1142,7 @@ mos_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); return; } @@ -1323,7 +1323,7 @@ mos_stop(struct mos_softc *sc) mos_reset(sc); ifp = &sc->arpcom.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_mtw.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_mtw.c,v retrieving revision 1.12 diff -u -p -r1.12 if_mtw.c --- sys/dev/usb/if_mtw.c 28 Mar 2025 23:17:00 -0000 1.12 +++ sys/dev/usb/if_mtw.c 6 Jan 2026 00:39:00 -0000 @@ -2450,7 +2450,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -2459,7 +2459,7 @@ mtw_watchdog(struct ifnet *ifp) { struct mtw_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -2468,7 +2468,7 @@ mtw_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -3316,7 +3316,7 @@ mtw_stop(struct ifnet *ifp, int disable) mtw_set_leds(sc, MTW_LED_MODE_ON); sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_mue.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_mue.c,v retrieving revision 1.12 diff -u -p -r1.12 if_mue.c --- sys/dev/usb/if_mue.c 23 May 2024 03:21:08 -0000 1.12 +++ sys/dev/usb/if_mue.c 6 Jan 2026 00:39:00 -0000 @@ -1168,7 +1168,7 @@ mue_txeof(struct usbd_xfer *xfer, void * return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); m_freem(c->mue_mbuf); @@ -1333,7 +1333,7 @@ mue_start(struct ifnet *ifp) ifq_set_oactive(&ifp->if_snd); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -1344,7 +1344,7 @@ mue_stop(struct mue_softc *sc) int i; ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_otus.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_otus.c,v retrieving revision 1.73 diff -u -p -r1.73 if_otus.c --- sys/dev/usb/if_otus.c 23 May 2024 03:21:08 -0000 1.73 +++ sys/dev/usb/if_otus.c 6 Jan 2026 00:39:00 -0000 @@ -1442,7 +1442,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1451,7 +1451,7 @@ otus_watchdog(struct ifnet *ifp) { struct otus_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1460,7 +1460,7 @@ otus_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } @@ -2309,7 +2309,7 @@ otus_stop(struct ifnet *ifp) int s; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_ral.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_ral.c,v retrieving revision 1.150 diff -u -p -r1.150 if_ral.c --- sys/dev/usb/if_ral.c 23 May 2024 03:21:08 -0000 1.150 +++ sys/dev/usb/if_ral.c 6 Jan 2026 00:39:00 -0000 @@ -1252,7 +1252,7 @@ ural_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1261,7 +1261,7 @@ ural_watchdog(struct ifnet *ifp) { struct ural_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1270,7 +1270,7 @@ ural_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2040,7 +2040,7 @@ ural_stop(struct ifnet *ifp, int disable struct ieee80211com *ic = &sc->sc_ic; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_rsu.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_rsu.c,v retrieving revision 1.53 diff -u -p -r1.53 if_rsu.c --- sys/dev/usb/if_rsu.c 23 May 2024 03:21:08 -0000 1.53 +++ sys/dev/usb/if_rsu.c 6 Jan 2026 00:39:00 -0000 @@ -1667,7 +1667,7 @@ rsu_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1676,7 +1676,7 @@ rsu_watchdog(struct ifnet *ifp) { struct rsu_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1685,7 +1685,7 @@ rsu_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); } @@ -2319,7 +2319,7 @@ rsu_stop(struct ifnet *ifp) int i, s; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_rum.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_rum.c,v retrieving revision 1.129 diff -u -p -r1.129 if_rum.c --- sys/dev/usb/if_rum.c 23 May 2024 03:21:08 -0000 1.129 +++ sys/dev/usb/if_rum.c 6 Jan 2026 00:39:00 -0000 @@ -1268,7 +1268,7 @@ rum_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1277,7 +1277,7 @@ rum_watchdog(struct ifnet *ifp) { struct rum_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1286,7 +1286,7 @@ rum_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2064,7 +2064,7 @@ rum_stop(struct ifnet *ifp, int disable) uint32_t tmp; sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_run.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_run.c,v retrieving revision 1.140 diff -u -p -r1.140 if_run.c --- sys/dev/usb/if_run.c 23 May 2024 03:21:08 -0000 1.140 +++ sys/dev/usb/if_run.c 6 Jan 2026 00:39:00 -0000 @@ -2577,7 +2577,7 @@ sendit: } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -2586,7 +2586,7 @@ run_watchdog(struct ifnet *ifp) { struct run_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -2595,7 +2595,7 @@ run_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -4744,7 +4744,7 @@ run_stop(struct ifnet *ifp, int disable) run_set_leds(sc, 0); /* turn all LEDs off */ sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_smsc.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_smsc.c,v retrieving revision 1.39 diff -u -p -r1.39 if_smsc.c --- sys/dev/usb/if_smsc.c 23 May 2024 03:21:08 -0000 1.39 +++ sys/dev/usb/if_smsc.c 6 Jan 2026 00:39:00 -0000 @@ -688,7 +688,7 @@ smsc_stop(struct smsc_softc *sc) smsc_reset(sc); ifp = &sc->sc_ac.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -1287,7 +1287,7 @@ smsc_txeof(struct usbd_xfer *xfer, void return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); m_freem(c->sc_mbuf); Index: sys/dev/usb/if_uaq.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_uaq.c,v retrieving revision 1.6 diff -u -p -r1.6 if_uaq.c --- sys/dev/usb/if_uaq.c 23 May 2024 03:21:08 -0000 1.6 +++ sys/dev/usb/if_uaq.c 6 Jan 2026 00:39:00 -0000 @@ -895,7 +895,7 @@ uaq_stop(struct uaq_softc *sc) usbd_status err; ifp = &sc->sc_ac.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -1200,7 +1200,7 @@ uaq_watchdog(struct ifnet *ifp) usbd_status err; int i, s; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (usbd_is_dying(sc->sc_udev)) return; @@ -1273,7 +1273,7 @@ uaq_txeof(struct usbd_xfer *xfer, void * return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); splx(s); @@ -1342,7 +1342,7 @@ uaq_start(struct ifnet *ifp) } c = SLIST_FIRST(&cd->uaq_tx_free); - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); if (c == NULL) ifq_set_oactive(&ifp->if_snd); } Index: sys/dev/usb/if_uath.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_uath.c,v retrieving revision 1.89 diff -u -p -r1.89 if_uath.c --- sys/dev/usb/if_uath.c 23 May 2024 03:21:08 -0000 1.89 +++ sys/dev/usb/if_uath.c 6 Jan 2026 00:39:00 -0000 @@ -1500,7 +1500,7 @@ uath_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -1509,7 +1509,7 @@ uath_watchdog(struct ifnet *ifp) { struct uath_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { @@ -1518,7 +1518,7 @@ uath_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -1931,7 +1931,7 @@ uath_stop(struct ifnet *ifp, int disable s = splusb(); sc->sc_tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_udav.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_udav.c,v retrieving revision 1.86 diff -u -p -r1.86 if_udav.c --- sys/dev/usb/if_udav.c 23 May 2024 03:21:09 -0000 1.86 +++ sys/dev/usb/if_udav.c 6 Jan 2026 00:39:00 -0000 @@ -932,7 +932,7 @@ udav_start(struct ifnet *ifp) ifq_set_oactive(&ifp->if_snd); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } int @@ -1002,7 +1002,7 @@ udav_txeof(struct usbd_xfer *xfer, void DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -1213,7 +1213,7 @@ udav_stop(struct ifnet *ifp, int disable DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_ugl.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v retrieving revision 1.28 diff -u -p -r1.28 if_ugl.c --- sys/dev/usb/if_ugl.c 23 May 2024 03:21:09 -0000 1.28 +++ sys/dev/usb/if_ugl.c 6 Jan 2026 00:39:00 -0000 @@ -505,7 +505,7 @@ ugl_txeof(struct usbd_xfer *xfer, void * DPRINTFN(10,("%s: %s: enter status=%d\n", sc->sc_dev.dv_xname, __func__, status)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -611,7 +611,7 @@ ugl_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -808,7 +808,7 @@ ugl_stop(struct ugl_softc *sc) DPRINTFN(10,("%s: %s: enter\n", sc->sc_dev.dv_xname,__func__)); ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_umb.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_umb.c,v retrieving revision 1.67 diff -u -p -r1.67 if_umb.c --- sys/dev/usb/if_umb.c 17 Nov 2025 11:19:21 -0000 1.67 +++ sys/dev/usb/if_umb.c 6 Jan 2026 00:39:00 -0000 @@ -854,7 +854,7 @@ umb_close_bulkpipes(struct umb_softc *sc ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_rx_pipe) { usbd_close_pipe(sc->sc_rx_pipe); sc->sc_rx_pipe = NULL; @@ -1044,7 +1044,7 @@ umb_start(struct ifnet *ifp) return; if (umb_encap(sc, ndgram)) { ifq_set_oactive(&ifp->if_snd); - ifp->if_timer = (2 * umb_xfer_tout) / 1000; + if_watchdog_schedule(ifp, (2 * umb_xfer_tout) / 1000); } } @@ -2408,7 +2408,7 @@ umb_txeof(struct usbd_xfer *xfer, void * s = splnet(); ml_purge(&sc->sc_tx_ml); ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (status != USBD_NORMAL_COMPLETION) { if (status != USBD_NOT_STARTED && status != USBD_CANCELLED) { Index: sys/dev/usb/if_upgt.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_upgt.c,v retrieving revision 1.90 diff -u -p -r1.90 if_upgt.c --- sys/dev/usb/if_upgt.c 23 May 2024 03:21:09 -0000 1.90 +++ sys/dev/usb/if_upgt.c 6 Jan 2026 00:39:00 -0000 @@ -1209,7 +1209,7 @@ upgt_stop(struct upgt_softc *sc) DPRINTF(1, "%s: %s\n", sc->sc_dev.dv_xname, __func__); /* device down */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -1400,7 +1400,7 @@ upgt_start(struct ifnet *ifp) DPRINTF(2, "%s: tx_queued=%d\n", sc->sc_dev.dv_xname, sc->tx_queued); /* process the TX queue in process context */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); ifq_set_oactive(&ifp->if_snd); usb_rem_task(sc->sc_udev, &sc->sc_task_tx); usb_add_task(sc->sc_udev, &sc->sc_task_tx); @@ -1601,7 +1601,7 @@ upgt_tx_done(struct upgt_softc *sc, uint if (sc->tx_queued == 0) { /* TX queued was processed, continue */ - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); upgt_start(ifp); } Index: sys/dev/usb/if_upl.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_upl.c,v retrieving revision 1.80 diff -u -p -r1.80 if_upl.c --- sys/dev/usb/if_upl.c 23 May 2024 03:21:09 -0000 1.80 +++ sys/dev/usb/if_upl.c 6 Jan 2026 00:39:00 -0000 @@ -487,7 +487,7 @@ upl_txeof(struct usbd_xfer *xfer, void * DPRINTFN(10,("%s: %s: enter status=%d\n", sc->sc_dev.dv_xname, __func__, status)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -591,7 +591,7 @@ upl_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } void @@ -810,7 +810,7 @@ upl_stop(struct upl_softc *sc) DPRINTFN(10,("%s: %s: enter\n", sc->sc_dev.dv_xname,__func__)); ifp = &sc->sc_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_ure.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_ure.c,v retrieving revision 1.37 diff -u -p -r1.37 if_ure.c --- sys/dev/usb/if_ure.c 4 Jun 2025 00:06:17 -0000 1.37 +++ sys/dev/usb/if_ure.c 6 Jan 2026 00:39:00 -0000 @@ -973,7 +973,7 @@ ure_watchdog(struct ifnet *ifp) usbd_status err; int i, s; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (usbd_is_dying(sc->ure_udev)) return; @@ -1179,7 +1179,7 @@ ure_start(struct ifnet *ifp) } } - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); if (c == NULL) ifq_set_oactive(&ifp->if_snd); splx(s); @@ -1209,7 +1209,7 @@ ure_stop(struct ure_softc *sc) ure_reset(sc); ifp = &sc->ure_ac.ac_if; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -2503,7 +2503,7 @@ ure_txeof(struct usbd_xfer *xfer, void * return; } - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (ifq_is_oactive(&ifp->if_snd)) ifq_restart(&ifp->if_snd); splx(s); Index: sys/dev/usb/if_url.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_url.c,v retrieving revision 1.90 diff -u -p -r1.90 if_url.c --- sys/dev/usb/if_url.c 23 May 2024 03:21:09 -0000 1.90 +++ sys/dev/usb/if_url.c 6 Jan 2026 00:39:00 -0000 @@ -798,7 +798,7 @@ url_start(struct ifnet *ifp) ifq_set_oactive(&ifp->if_snd); /* Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); } int @@ -861,7 +861,7 @@ url_txeof(struct usbd_xfer *xfer, void * DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { @@ -1073,7 +1073,7 @@ url_stop(struct ifnet *ifp, int disable) DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/dev/usb/if_urndis.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v retrieving revision 1.74 diff -u -p -r1.74 if_urndis.c --- sys/dev/usb/if_urndis.c 23 May 2024 03:21:09 -0000 1.74 +++ sys/dev/usb/if_urndis.c 6 Jan 2026 00:39:00 -0000 @@ -1129,7 +1129,7 @@ urndis_stop(struct urndis_softc *sc) int i; ifp = GET_IFP(sc); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); @@ -1207,7 +1207,7 @@ urndis_start(struct ifnet *ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + if_watchdog_schedule(ifp, 5); return; } @@ -1277,7 +1277,7 @@ urndis_txeof(struct usbd_xfer *xfer, s = splnet(); - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifq_clr_oactive(&ifp->if_snd); if (status != USBD_NORMAL_COMPLETION) { Index: sys/dev/usb/if_urtw.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_urtw.c,v retrieving revision 1.74 diff -u -p -r1.74 if_urtw.c --- sys/dev/usb/if_urtw.c 1 Sep 2024 03:09:00 -0000 1.74 +++ sys/dev/usb/if_urtw.c 6 Jan 2026 00:39:01 -0000 @@ -2291,7 +2291,7 @@ urtw_init(struct ifnet *ifp) ifq_clr_oactive(&ifp->if_snd); ifp->if_flags |= IFF_RUNNING; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); if (ic->ic_opmode == IEEE80211_M_MONITOR) ieee80211_new_state(ic, IEEE80211_S_RUN, -1); @@ -2468,7 +2468,7 @@ urtw_watchdog(struct ifnet *ifp) { struct urtw_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->sc_txtimer > 0) { if (--sc->sc_txtimer == 0) { @@ -2476,7 +2476,7 @@ urtw_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -3692,7 +3692,7 @@ urtw_8187b_init(struct ifnet *ifp) ifp->if_flags |= IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); if (ic->ic_opmode == IEEE80211_M_MONITOR) ieee80211_new_state(ic, IEEE80211_S_RUN, -1); Index: sys/dev/usb/if_zyd.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v retrieving revision 1.129 diff -u -p -r1.129 if_zyd.c --- sys/dev/usb/if_zyd.c 23 May 2024 03:21:09 -0000 1.129 +++ sys/dev/usb/if_zyd.c 6 Jan 2026 00:39:01 -0000 @@ -2267,7 +2267,7 @@ sendit: } sc->tx_timer = 5; - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } } @@ -2276,7 +2276,7 @@ zyd_watchdog(struct ifnet *ifp) { struct zyd_softc *sc = ifp->if_softc; - ifp->if_timer = 0; + if_watchdog_disable(ifp); if (sc->tx_timer > 0) { if (--sc->tx_timer == 0) { @@ -2285,7 +2285,7 @@ zyd_watchdog(struct ifnet *ifp) ifp->if_oerrors++; return; } - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } ieee80211_watchdog(ifp); @@ -2473,7 +2473,7 @@ zyd_stop(struct ifnet *ifp, int disable) struct ieee80211com *ic = &sc->sc_ic; sc->tx_timer = 0; - ifp->if_timer = 0; + if_watchdog_disable(ifp); ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); Index: sys/net/if_var.h =================================================================== RCS file: /cvs/src/sys/net/if_var.h,v retrieving revision 1.147 diff -u -p -r1.147 if_var.h --- sys/net/if_var.h 3 Jan 2026 14:10:04 -0000 1.147 +++ sys/net/if_var.h 6 Jan 2026 00:39:03 -0000 @@ -362,6 +362,18 @@ void p2p_rtrequest(struct ifnet *, int, void p2p_input(struct ifnet *, struct mbuf *, struct netstack *); int p2p_bpf_mtap(caddr_t, const struct mbuf *, u_int); +static inline void +if_watchdog_schedule(struct ifnet *ifp, u_short timeout) +{ + ifp->if_timer = timeout; +} + +static inline void +if_watchdog_disable(struct ifnet *ifp) +{ + ifp->if_timer = 0; +} + /* this is a helper for if_input_process and similar functions */ static inline void if_input_process_proto(struct ifnet *ifp, struct mbuf *m, struct netstack *ns) Index: sys/net80211/ieee80211.c =================================================================== RCS file: /cvs/src/sys/net80211/ieee80211.c,v retrieving revision 1.91 diff -u -p -r1.91 ieee80211.c --- sys/net80211/ieee80211.c 1 Aug 2025 20:39:26 -0000 1.91 +++ sys/net80211/ieee80211.c 6 Jan 2026 00:39:03 -0000 @@ -812,7 +812,7 @@ ieee80211_watchdog(struct ifnet *ifp) } if (ic->ic_mgt_timer != 0) - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); } const struct ieee80211_rateset ieee80211_std_rateset_11a = Index: sys/net80211/ieee80211_output.c =================================================================== RCS file: /cvs/src/sys/net80211/ieee80211_output.c,v retrieving revision 1.145 diff -u -p -r1.145 ieee80211_output.c --- sys/net80211/ieee80211_output.c 5 Jan 2026 13:41:03 -0000 1.145 +++ sys/net80211/ieee80211_output.c 6 Jan 2026 00:39:03 -0000 @@ -258,7 +258,7 @@ ieee80211_mgmt_output(struct ifnet *ifp, return 0; #endif mq_enqueue(&ic->ic_mgtq, m); - ifp->if_timer = 1; + if_watchdog_schedule(ifp, 1); if_start(ifp); return 0; }