Don't bother with IFF_OACTIVE.

This commit is contained in:
thorpej 2020-03-15 22:19:00 +00:00
parent a6837a9b93
commit fa0b22a163
10 changed files with 44 additions and 154 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic6915.c,v 1.43 2020/03/12 03:01:46 thorpej Exp $ */
/* $NetBSD: aic6915.c,v 1.44 2020/03/15 22:19:00 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.43 2020/03/12 03:01:46 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.44 2020/03/15 22:19:00 thorpej Exp $");
#include <sys/param.h>
@ -469,11 +469,6 @@ sf_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txpending == (SF_NTXDESC - 1)) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
KASSERT(last != -1);
/*
@ -638,8 +633,6 @@ sf_txintr(struct sf_softc *sc)
if (consumer == producer)
return;
ifp->if_flags &= ~IFF_OACTIVE;
while (consumer != producer) {
SF_CDTXCSYNC(sc, consumer, BUS_DMASYNC_POSTREAD);
tcd = le32toh(sc->sc_txcomp[consumer].tcd_word0);
@ -1097,11 +1090,10 @@ sf_init(struct ifnet *ifp)
* Note that the interface is now running.
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
out:
if (error) {
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
printf("%s: interface not running\n", device_xname(sc->sc_dev));
}
@ -1168,7 +1160,7 @@ sf_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: dp83932.c,v 1.45 2020/01/29 14:14:55 thorpej Exp $ */
/* $NetBSD: dp83932.c,v 1.46 2020/03/15 22:19:00 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.45 2020/01/29 14:14:55 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.46 2020/03/15 22:19:00 thorpej Exp $");
#include <sys/param.h>
@ -287,7 +287,7 @@ sonic_start(struct ifnet *ifp)
int error, olasttx, nexttx, opending, totlen, olseg;
int seg = 0; /* XXX: gcc */
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -471,11 +471,6 @@ sonic_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txpending == (SONIC_NTXDESC - 1)) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
/*
* We enqueued packets. If the transmitter was idle,
@ -634,8 +629,6 @@ sonic_txintr(struct sonic_softc *sc)
uint16_t status, totstat = 0;
int i;
ifp->if_flags &= ~IFF_OACTIVE;
for (i = sc->sc_txdirty; sc->sc_txpending != 0;
i = SONIC_NEXTTX(i), sc->sc_txpending--) {
ds = &sc->sc_txsoft[i];
@ -1017,7 +1010,6 @@ sonic_init(struct ifnet *ifp)
* ...all done!
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
out:
if (error)
@ -1090,7 +1082,7 @@ sonic_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: gem.c,v 1.129 2020/03/01 05:50:56 thorpej Exp $ */
/* $NetBSD: gem.c,v 1.130 2020/03/15 22:19:00 thorpej Exp $ */
/*
*
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.129 2020/03/01 05:50:56 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.130 2020/03/15 22:19:00 thorpej Exp $");
#include "opt_inet.h"
@ -745,7 +745,7 @@ gem_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
sc->sc_if_flags = ifp->if_flags;
ifp->if_timer = 0;
@ -1228,7 +1228,6 @@ gem_init(struct ifnet *ifp)
sc->sc_flags &= ~GEM_LINK;
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
sc->sc_if_flags = ifp->if_flags;
out:
@ -1371,7 +1370,7 @@ gem_start(struct ifnet *ifp)
#endif
uint64_t flags = 0;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -1459,16 +1458,8 @@ next:
(sc->sc_txfree - 1) : sc->sc_txfree)) {
/*
* Not enough free descriptors to transmit this
* packet. We haven't committed to anything yet,
* so just unload the DMA map, put the packet
* back on the queue, and punt. Notify the upper
* layer that there are no more slots left.
*
* XXX We could allocate an mbuf and copy, but
* XXX it is worth it?
* packet.
*/
ifp->if_flags |= IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
bus_dmamap_unload(sc->sc_dmatag, dmamap);
if (m != NULL)
m_freem(m);
@ -1608,12 +1599,6 @@ next:
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (txs == NULL || sc->sc_txfree == 0) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
}
if (sc->sc_txfree != ofree) {
DPRINTF(sc, ("%s: packets enqueued, IC on %d, OWN on %d\n",
device_xname(sc->sc_dev), lasttx, otxnext));
@ -1748,9 +1733,6 @@ gem_tint(struct gem_softc *sc)
if (sc->sc_txfree == GEM_NTXDESC - 1)
sc->sc_txwin = 0;
/* Freed some descriptors, so reset IFF_OACTIVE and restart. */
ifp->if_flags &= ~IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
ifp->if_timer = SIMPLEQ_EMPTY(&sc->sc_txdirtyq) ? 0 : 5;
if_schedule_deferred_start(ifp);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgec.c,v 1.52 2020/01/30 04:56:11 thorpej Exp $ */
/* $NetBSD: sgec.c,v 1.53 2020/03/15 22:19:00 thorpej Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.52 2020/01/30 04:56:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.53 2020/03/15 22:19:00 thorpej Exp $");
#include "opt_inet.h"
@ -301,7 +301,6 @@ zeinit(struct ze_softc *sc)
ZE_NICSR6_SR | ZE_NICSR6_DC);
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Send a setup frame.
@ -356,7 +355,6 @@ zestart(struct ifnet *ifp)
if ((map->dm_nsegs + sc->sc_inq) >= (TXDESCS - 1)) {
bus_dmamap_unload(sc->sc_dmat, map);
ifp->if_flags |= IFF_OACTIVE;
goto out;
}
@ -416,8 +414,6 @@ zestart(struct ifnet *ifp)
bpf_mtap(ifp, m, BPF_D_OUT);
}
if (sc->sc_inq == (TXDESCS - 1))
ifp->if_flags |= IFF_OACTIVE;
out: if (old_inq < sc->sc_inq)
ifp->if_timer = 5; /* If transmit logic dies */
@ -508,7 +504,6 @@ sgec_intr(struct ze_softc *sc)
sc->sc_lastack = lastack;
if (sc->sc_inq == 0)
ifp->if_timer = 0;
ifp->if_flags &= ~IFF_OACTIVE;
zestart(ifp); /* Put in more in queue */
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc83c170.c,v 1.94 2020/03/12 03:01:46 thorpej Exp $ */
/* $NetBSD: smc83c170.c,v 1.95 2020/03/15 22:19:00 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.94 2020/03/12 03:01:46 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.95 2020/03/15 22:19:00 thorpej Exp $");
#include <sys/param.h>
@ -499,11 +499,6 @@ epic_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txpending == EPIC_NTXDESC) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
/*
* We enqueued packets. If the transmitter was idle,
@ -740,7 +735,6 @@ epic_intr(void *arg)
* Check for transmission complete interrupts.
*/
if (intstat & (INTSTAT_TXC | INTSTAT_TXU)) {
ifp->if_flags &= ~IFF_OACTIVE;
for (i = sc->sc_txdirty; sc->sc_txpending != 0;
i = EPIC_NEXTTX(i), sc->sc_txpending--) {
txd = EPIC_CDTX(sc, i);
@ -1035,7 +1029,6 @@ epic_init(struct ifnet *ifp)
* ...all done!
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Start the one second clock.
@ -1124,7 +1117,7 @@ epic_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: tulip.c,v 1.203 2020/03/11 16:20:57 msaitoh Exp $ */
/* $NetBSD: tulip.c,v 1.204 2020/03/15 22:19:00 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.203 2020/03/11 16:20:57 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.204 2020/03/15 22:19:00 thorpej Exp $");
#include <sys/param.h>
@ -683,9 +683,9 @@ tlp_start(struct ifnet *ifp)
* itself into the ring.
*/
if (sc->sc_flags & TULIPF_WANT_SETUP)
ifp->if_flags |= IFF_OACTIVE;
return;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
if (sc->sc_tick == tlp_2114x_nway_tick &&
@ -768,15 +768,8 @@ tlp_start(struct ifnet *ifp)
if (dmamap->dm_nsegs > sc->sc_txfree) {
/*
* Not enough free descriptors to transmit this
* packet. We haven't committed to anything yet,
* so just unload the DMA map, put the packet
* back on the queue, and punt. Notify the upper
* layer that there are no more slots left.
*
* XXX We could allocate an mbuf and copy, but
* XXX it is worth it?
* packet.
*/
ifp->if_flags |= IFF_OACTIVE;
bus_dmamap_unload(sc->sc_dmat, dmamap);
if (m != NULL)
m_freem(m);
@ -877,11 +870,6 @@ tlp_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (txs == NULL || sc->sc_txfree == 0) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txfree != ofree) {
DPRINTF(sc, ("%s: packets enqueued, IC on %d, OWN on %d\n",
device_xname(sc->sc_dev), lasttx, firsttx));
@ -1414,8 +1402,6 @@ tlp_txintr(struct tulip_softc *sc)
DPRINTF(sc, ("%s: tlp_txintr: sc_flags 0x%08x\n",
device_xname(sc->sc_dev), sc->sc_flags));
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Go through our Tx list and free mbufs for those
* frames that have been transmitted.
@ -1947,12 +1933,11 @@ tlp_init(struct ifnet *ifp)
* Note that the interface is now running.
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
out:
if (error) {
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
printf("%s: interface not running\n", device_xname(sc->sc_dev));
}
@ -2062,7 +2047,7 @@ tlp_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
sc->sc_if_flags = ifp->if_flags;
ifp->if_timer = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pcn.c,v 1.74 2020/02/07 00:04:28 thorpej Exp $ */
/* $NetBSD: if_pcn.c,v 1.75 2020/03/15 22:20:31 thorpej Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.74 2020/02/07 00:04:28 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.75 2020/03/15 22:20:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -922,7 +922,7 @@ pcn_start(struct ifnet *ifp)
bus_dmamap_t dmamap;
int error, nexttx, lasttx = -1, ofree, seg;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -999,15 +999,8 @@ pcn_start(struct ifnet *ifp)
if (dmamap->dm_nsegs > (sc->sc_txfree - 1)) {
/*
* Not enough free descriptors to transmit this
* packet. We haven't committed anything yet,
* so just unload the DMA map, put the packet
* back on the queue, and punt. Notify the upper
* layer that there are not more slots left.
*
* XXX We could allocate an mbuf and copy, but
* XXX is it worth it?
* packet.
*/
ifp->if_flags |= IFF_OACTIVE;
bus_dmamap_unload(sc->sc_dmat, dmamap);
if (m != NULL)
m_freem(m);
@ -1134,11 +1127,6 @@ pcn_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txsfree == 0 || sc->sc_txfree == 0) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txfree != ofree) {
/* Set a watchdog timer in case the chip flakes out. */
ifp->if_timer = 5;
@ -1325,8 +1313,6 @@ pcn_txintr(struct pcn_softc *sc)
uint32_t tmd1, tmd2, tmd;
int i, j;
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Go through our Tx list and free mbufs for those
* frames which have been transmitted.
@ -1817,7 +1803,6 @@ pcn_init(struct ifnet *ifp)
/* ...all done! */
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
out:
if (error)
@ -1880,7 +1865,7 @@ pcn_stop(struct ifnet *ifp, int disable)
}
/* Mark the interface as down and cancel the watchdog timer. */
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sip.c,v 1.180 2020/03/13 00:45:59 thorpej Exp $ */
/* $NetBSD: if_sip.c,v 1.181 2020/03/15 22:20:31 thorpej Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.180 2020/03/13 00:45:59 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.181 2020/03/15 22:20:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1557,9 +1557,9 @@ sipcom_start(struct ifnet *ifp)
* If we've been told to pause, don't transmit any more packets.
*/
if (!sc->sc_gigabit && sc->sc_paused)
ifp->if_flags |= IFF_OACTIVE;
return;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -1647,15 +1647,8 @@ sipcom_start(struct ifnet *ifp)
if (dmamap->dm_nsegs > (sc->sc_txfree - 1)) {
/*
* Not enough free descriptors to transmit this
* packet. We haven't committed anything yet,
* so just unload the DMA map, put the packet
* back on the queue, and punt. Notify the upper
* layer that there are not more slots left.
*
* XXX We could allocate an mbuf and copy, but
* XXX is it worth it?
* packet.
*/
ifp->if_flags |= IFF_OACTIVE;
bus_dmamap_unload(sc->sc_dmat, dmamap);
if (m != NULL)
m_freem(m);
@ -1747,11 +1740,6 @@ sipcom_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (txs == NULL || sc->sc_txfree == 0) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txfree != ofree) {
/*
* Start the transmit process. Note, the manual says
@ -2008,11 +1996,9 @@ sipcom_intr(void *arg)
if (isr & ISR_PAUSE_ST) {
sc->sc_paused = 1;
SIP_EVCNT_INCR(&sc->sc_ev_rxpause);
ifp->if_flags |= IFF_OACTIVE;
}
if (isr & ISR_PAUSE_END) {
sc->sc_paused = 0;
ifp->if_flags &= ~IFF_OACTIVE;
}
}
@ -2068,9 +2054,6 @@ sipcom_txintr(struct sip_softc *sc)
struct sip_txsoft *txs;
uint32_t cmdsts;
if (sc->sc_paused == 0)
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Go through our Tx list and free mbufs for those
* frames which have been transmitted.
@ -2858,7 +2841,6 @@ sipcom_init(struct ifnet *ifp)
* ...all done!
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
sc->sc_prev.ec_capenable = sc->sc_ethercom.ec_capenable;
sc->sc_prev.is_vlan = VLAN_ATTACHED(&(sc)->sc_ethercom);
@ -2956,7 +2938,7 @@ sipcom_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ste.c,v 1.61 2020/03/13 00:41:24 thorpej Exp $ */
/* $NetBSD: if_ste.c,v 1.62 2020/03/15 22:20:31 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.61 2020/03/13 00:41:24 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.62 2020/03/15 22:20:31 thorpej Exp $");
#include <sys/param.h>
@ -656,7 +656,7 @@ ste_start(struct ifnet *ifp)
bus_dmamap_t dmamap;
int error, olasttx, nexttx, opending, seg, totlen;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -775,11 +775,6 @@ ste_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txpending == STE_NTXDESC) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
/*
* We enqueued packets. If the transmitter was idle,
@ -995,8 +990,6 @@ ste_txintr(struct ste_softc *sc)
uint32_t control;
int i;
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Go through our Tx list and free mbufs for those
* frames which have been transmitted.
@ -1402,7 +1395,6 @@ ste_init(struct ifnet *ifp)
* ...all done!
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
out:
if (error)
@ -1484,7 +1476,7 @@ ste_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $ */
/* $NetBSD: if_stge.c,v 1.86 2020/03/15 22:20:31 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.86 2020/03/15 22:20:31 thorpej Exp $");
#include <sys/param.h>
@ -827,7 +827,7 @@ stge_start(struct ifnet *ifp)
int error, firsttx, nexttx, opending, seg, totlen;
uint64_t csum_flags;
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
return;
/*
@ -1013,11 +1013,6 @@ stge_start(struct ifnet *ifp)
bpf_mtap(ifp, m0, BPF_D_OUT);
}
if (sc->sc_txpending == (STGE_NTXDESC - 1)) {
/* No more slots left; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
/*
* We enqueued packets. If the transmitter was idle,
@ -1198,8 +1193,6 @@ stge_txintr(struct stge_softc *sc)
uint64_t control;
int i;
ifp->if_flags &= ~IFF_OACTIVE;
/*
* Go through our Tx list and free mbufs for those
* frames which have been transmitted.
@ -1712,7 +1705,6 @@ stge_init(struct ifnet *ifp)
* ...all done!
*/
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
out:
if (error)
@ -1797,7 +1789,7 @@ stge_stop(struct ifnet *ifp, int disable)
/*
* Mark the interface down and cancel the watchdog timer.
*/
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_flags &= ~IFF_RUNNING;
ifp->if_timer = 0;
if (disable)