Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/017b0d489505
branches:  trunk
changeset: 370131:017b0d489505
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 18 13:03:51 2022 +0000

description:
Eliminate use of IFF_OACTIVE.

diffstat:

 sys/arch/playstation2/dev/if_smap.c   |  12 ++++--------
 sys/arch/powerpc/booke/dev/pq3etsec.c |  12 +++---------
 2 files changed, 7 insertions(+), 17 deletions(-)

diffs (108 lines):

diff -r 1f430d3abf7f -r 017b0d489505 sys/arch/playstation2/dev/if_smap.c
--- a/sys/arch/playstation2/dev/if_smap.c       Sun Sep 18 13:00:18 2022 +0000
+++ b/sys/arch/playstation2/dev/if_smap.c       Sun Sep 18 13:03:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_smap.c,v 1.34 2022/02/11 23:49:19 riastradh Exp $   */
+/*     $NetBSD: if_smap.c,v 1.35 2022/09/18 13:03:51 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.34 2022/02/11 23:49:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.35 2022/09/18 13:03:51 thorpej Exp $");
 
 #include "debug_playstation2.h"
 
@@ -158,7 +158,7 @@
        __sc = sc;
 #endif
 
-       sc->dev = self;
+       sc->emac3.dev = self;
 
        printf(": %s\n", spa->spa_product_name);
 
@@ -448,9 +448,6 @@
        }
        sc->tx_done_index = i;
 
-       /* OK to start transmit */
-       ifp->if_flags &= ~IFF_OACTIVE;
-
        FUNC_EXIT();
 }
 
@@ -481,7 +478,6 @@
                if (sz > sc->tx_buf_freesize ||
                    sc->tx_desc_cnt >= SMAP_DESC_MAX ||
                    emac3_tx_done() != 0) {
-                       ifp->if_flags |= IFF_OACTIVE;
                        goto end;
                }
 
@@ -599,7 +595,7 @@
 
        mii_down(&sc->emac3.mii);
 
-       ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+       ifp->if_flags &= ~IFF_RUNNING;
 
        if (disable)
                emac3_disable();
diff -r 1f430d3abf7f -r 017b0d489505 sys/arch/powerpc/booke/dev/pq3etsec.c
--- a/sys/arch/powerpc/booke/dev/pq3etsec.c     Sun Sep 18 13:00:18 2022 +0000
+++ b/sys/arch/powerpc/booke/dev/pq3etsec.c     Sun Sep 18 13:03:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pq3etsec.c,v 1.57 2022/05/07 05:01:29 rin Exp $        */
+/*     $NetBSD: pq3etsec.c,v 1.58 2022/09/18 13:09:17 thorpej Exp $    */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.57 2022/05/07 05:01:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.58 2022/09/18 13:09:17 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2331,7 +2331,7 @@
 {
        struct pq3etsec_softc * const sc = ifp->if_softc;
 
-       if (__predict_false((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)) {
+       if (__predict_false((ifp->if_flags & IFF_RUNNING) == 0)) {
                return;
        }
 
@@ -2347,8 +2347,6 @@
 
        pq3etsec_txq_consume(sc, txq);
 
-       if (pq3etsec_txq_fillable_p(sc, txq))
-               sc->sc_if.if_flags &= ~IFF_OACTIVE;
        if (sc->sc_txerrors
            & (IEVENT_LC | IEVENT_CRL | IEVENT_XFUN | IEVENT_BABT)) {
        } else if (sc->sc_txerrors & IEVENT_EBERR) {
@@ -2358,7 +2356,6 @@
                etsec_write(sc, TSTAT, TSTAT_THLT & txq->txq_qmask);
        if (!pq3etsec_txq_enqueue(sc, txq)) {
                sc->sc_ev_tx_stall.ev_count++;
-               sc->sc_if.if_flags |= IFF_OACTIVE;
        }
 
        sc->sc_txerrors = 0;
@@ -2531,9 +2528,6 @@
                if (!pq3etsec_txq_consume(sc, &sc->sc_txq)
                    || !pq3etsec_txq_enqueue(sc, &sc->sc_txq)) {
                        sc->sc_ev_tx_stall.ev_count++;
-                       ifp->if_flags |= IFF_OACTIVE;
-               } else {
-                       ifp->if_flags &= ~IFF_OACTIVE;
                }
                imask |= IEVENT_TXF;
        }



Home | Main Index | Thread Index | Old Index