Module Name:    src
Committed By:   thorpej
Date:           Sun Sep 18 13:19:40 UTC 2022

Modified Files:
        src/sys/arch/powerpc/ibm4xx/dev: if_emac.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/powerpc/ibm4xx/dev/if_emac.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/powerpc/ibm4xx/dev/if_emac.c
diff -u src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.56 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.57
--- src/sys/arch/powerpc/ibm4xx/dev/if_emac.c:1.56	Tue Mar 30 02:25:24 2021
+++ src/sys/arch/powerpc/ibm4xx/dev/if_emac.c	Sun Sep 18 13:19:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_emac.c,v 1.56 2021/03/30 02:25:24 rin Exp $	*/
+/*	$NetBSD: if_emac.c,v 1.57 2022/09/18 13:19:40 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.56 2021/03/30 02:25:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.57 2022/09/18 13:19:40 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_emac.h"
@@ -671,7 +671,7 @@ emac_start(struct ifnet *ifp)
 
 	lasttx = 0;	/* XXX gcc */
 
-	if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+	if ((ifp->if_flags & IFF_RUNNING) == 0)
 		return;
 
 	/*
@@ -740,7 +740,6 @@ emac_start(struct ifnet *ifp)
 			 * layer that there are not more slots left.
 			 *
 			 */
-			ifp->if_flags |= IFF_OACTIVE;
 			bus_dmamap_unload(sc->sc_dmat, dmamap);
 			EMAC_EVCNT_INCR(&sc->sc_ev_txdstall);
 			break;
@@ -831,10 +830,6 @@ emac_start(struct ifnet *ifp)
 		bpf_mtap(ifp, m0, BPF_D_OUT);
 	}
 
-	if (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;
@@ -1050,11 +1045,10 @@ emac_init(struct ifnet *ifp)
 	 * ... all done!
 	 */
 	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;
 		aprint_error_ifnet(ifp, "interface not running\n");
 	}
@@ -1100,7 +1094,7 @@ emac_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;
 }
 
@@ -1268,8 +1262,6 @@ emac_txreap(struct emac_softc *sc)
 	EMAC_EVCNT_INCR(&sc->sc_ev_txreap);
 	handled = 0;
 
-	ifp->if_flags &= ~IFF_OACTIVE;
-
 	count = 0;
 	/*
 	 * Go through our Tx list and free mbufs for those

Reply via email to