Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/gemini Eliminate use of IFF_OACTIVE.



details:   https://anonhg.NetBSD.org/src/rev/33ec73c5560f
branches:  trunk
changeset: 370121:33ec73c5560f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Sep 17 19:49:09 2022 +0000

description:
Eliminate use of IFF_OACTIVE.

diffstat:

 sys/arch/arm/gemini/if_gpn.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (64 lines):

diff -r c33af917e8d2 -r 33ec73c5560f sys/arch/arm/gemini/if_gpn.c
--- a/sys/arch/arm/gemini/if_gpn.c      Sat Sep 17 19:46:59 2022 +0000
+++ b/sys/arch/arm/gemini/if_gpn.c      Sat Sep 17 19:49:09 2022 +0000
@@ -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 @@
 #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 @@
        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 @@
        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 @@
                size_t count;
 
                if (sc->sc_free == 0) {
-                       ifp->if_flags |= IFF_OACTIVE;
+                       sc->sc_txbusy = true;
                        break;
                }
 
@@ -396,7 +397,7 @@
                 */
                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);



Home | Main Index | Thread Index | Old Index