Module Name:    src
Committed By:   thorpej
Date:           Sat Sep 17 19:49:09 UTC 2022

Modified Files:
        src/sys/arch/arm/gemini: if_gpn.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/gemini/if_gpn.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/arm/gemini/if_gpn.c
diff -u src/sys/arch/arm/gemini/if_gpn.c:1.15 src/sys/arch/arm/gemini/if_gpn.c:1.16
--- src/sys/arch/arm/gemini/if_gpn.c:1.15	Sat Aug 20 18:36:16 2022
+++ src/sys/arch/arm/gemini/if_gpn.c	Sat Sep 17 19:49:09 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gpn.c,v 1.15 2022/08/20 18:36:16 thorpej Exp $ */
+/* $NetBSD: if_gpn.c,v 1.16 2022/09/17 19:49:09 thorpej Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include "opt_gemini.h"
 
-__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.15 2022/08/20 18:36:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.16 2022/09/17 19:49:09 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -106,6 +106,7 @@ struct gpn_softc {
 #define	sc_if sc_ec.ec_if
 	size_t sc_free;
 	size_t sc_txactive;
+	bool sc_txbusy;
 	void *sc_ih;
 	ipm_gpn_ack_desc_t sc_ack_desc;
 	struct mbuf *sc_rxmbuf;
@@ -327,8 +328,8 @@ gpn_free_txid(struct gpn_softc *sc, size
 	ti->ti_mbuf = NULL;
 	sc->sc_txactive--;
 	KASSERT(sc->sc_txactive < MAX_TXACTIVE);
-	if (sc->sc_if.if_flags & IFF_OACTIVE) {
-		sc->sc_if.if_flags &= ~IFF_OACTIVE;
+	if (sc->sc_txbusy) {
+		sc->sc_txbusy = false;
 		gpn_ifstart(&sc->sc_if);
 	}
 }
@@ -342,7 +343,7 @@ gpn_ipm_rebate(void *arg, size_t count)
 	s = splnet();
 	sc->sc_free += count;
 
-	sc->sc_if.if_flags &= ~IFF_OACTIVE;
+	sc->sc_txbusy = false;
 	gpn_ifstart(&sc->sc_if);
 	splx(s);
 }
@@ -359,7 +360,7 @@ gpn_ifstart(struct ifnet *ifp)
 		size_t count;
 
 		if (sc->sc_free == 0) {
-			ifp->if_flags |= IFF_OACTIVE;
+			sc->sc_txbusy = true;
 			break;
 		}
 
@@ -396,7 +397,7 @@ gpn_ifstart(struct ifnet *ifp)
 		 */
 		if (sc->sc_free < count
 		    || sc->sc_txactive + count > MAX_TXACTIVE) {
-			ifp->if_flags |= IFF_OACTIVE;
+			sc->sc_txbusy = true;
 			return;
 		}
 		IF_DEQUEUE(&ifp->if_snd, m);

Reply via email to