Module Name: src
Committed By: thorpej
Date: Sun Sep 18 13:26:40 UTC 2022
Modified Files:
src/sys/arch/sgimips/mace: if_mec.c
Log Message:
Eliminate use of IFF_OACTIVE.
To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sgimips/mace/if_mec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sgimips/mace/if_mec.c
diff -u src/sys/arch/sgimips/mace/if_mec.c:1.63 src/sys/arch/sgimips/mace/if_mec.c:1.64
--- src/sys/arch/sgimips/mace/if_mec.c:1.63 Wed Jan 29 05:37:08 2020
+++ src/sys/arch/sgimips/mace/if_mec.c Sun Sep 18 13:26:40 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec.c,v 1.63 2020/01/29 05:37:08 thorpej Exp $ */
+/* $NetBSD: if_mec.c,v 1.64 2022/09/18 13:26:40 thorpej Exp $ */
/*-
* Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.63 2020/01/29 05:37:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.64 2022/09/18 13:26:40 thorpej Exp $");
#include "opt_ddb.h"
@@ -905,7 +905,6 @@ mec_init(struct ifnet *ifp)
return rc;
ifp->if_flags |= IFF_RUNNING;
- ifp->if_flags &= ~IFF_OACTIVE;
mec_start(ifp);
return 0;
@@ -953,7 +952,7 @@ mec_start(struct ifnet *ifp)
int len, bufoff, buflen, nsegs, align, resid, pseg, nptr, slen, i;
uint32_t txdcmd;
- if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+ if ((ifp->if_flags & IFF_RUNNING) == 0)
return;
/*
@@ -1391,9 +1390,8 @@ mec_start(struct ifnet *ifp)
}
if (sc->sc_txpending == MEC_NTXDESC - 1) {
- /* No more slots; notify upper layer. */
+ /* No more slots. */
MEC_EVCNT_INCR(&sc->sc_ev_txdstall);
- ifp->if_flags |= IFF_OACTIVE;
}
if (sc->sc_txpending != opending) {
@@ -1422,7 +1420,7 @@ mec_stop(struct ifnet *ifp, int disable)
DPRINTF(MEC_DEBUG_STOP, ("%s\n", __func__));
ifp->if_timer = 0;
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ifp->if_flags &= ~IFF_RUNNING;
callout_stop(&sc->sc_tick_ch);
mii_down(&sc->sc_mii);
@@ -1900,8 +1898,6 @@ mec_txintr(struct mec_softc *sc, uint32_
/* cancel the watchdog timer if there are no pending TX packets */
if (sc->sc_txpending == 0)
ifp->if_timer = 0;
- if (sc->sc_txpending < MEC_NTXDESC - MEC_NTXDESC_RSVD)
- ifp->if_flags &= ~IFF_OACTIVE;
}
static bool