Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/2b4a1de1593f
branches:  trunk
changeset: 370119:2b4a1de1593f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Sep 17 19:41:18 2022 +0000

description:
Eliminate use of IFF_OACTIVE.

diffstat:

 sys/arch/arm/broadcom/bcm53xx_eth.c |   8 +-------
 sys/arch/arm/ep93xx/epe.c           |  12 ++++++------
 sys/arch/arm/ep93xx/epevar.h        |   3 ++-
 3 files changed, 9 insertions(+), 14 deletions(-)

diffs (96 lines):

diff -r 8c42771b2632 -r 2b4a1de1593f sys/arch/arm/broadcom/bcm53xx_eth.c
--- a/sys/arch/arm/broadcom/bcm53xx_eth.c       Sat Sep 17 19:23:24 2022 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_eth.c       Sat Sep 17 19:41:18 2022 +0000
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.41 2021/06/16 00:21:17 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.42 2022/09/17 19:41:18 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -1900,9 +1900,6 @@
        if (!bcmeth_txq_consume(sc, &sc->sc_txq)
            || !bcmeth_txq_enqueue(sc, &sc->sc_txq)) {
                BCMETH_EVCNT_INCR(sc->sc_ev_tx_stall);
-               sc->sc_if.if_flags |= IFF_OACTIVE;
-       } else {
-               sc->sc_if.if_flags &= ~IFF_OACTIVE;
        }
        if (sc->sc_if.if_flags & IFF_RUNNING) {
                mutex_spin_enter(sc->sc_hwlock);
@@ -1936,9 +1933,6 @@
                if (!bcmeth_txq_consume(sc, &sc->sc_txq)
                    || !bcmeth_txq_enqueue(sc, &sc->sc_txq)) {
                        BCMETH_EVCNT_INCR(sc->sc_ev_tx_stall);
-                       ifp->if_flags |= IFF_OACTIVE;
-               } else {
-                       ifp->if_flags &= ~IFF_OACTIVE;
                }
                intmask |= XMTINT_0;
        }
diff -r 8c42771b2632 -r 2b4a1de1593f sys/arch/arm/ep93xx/epe.c
--- a/sys/arch/arm/ep93xx/epe.c Sat Sep 17 19:23:24 2022 +0000
+++ b/sys/arch/arm/ep93xx/epe.c Sat Sep 17 19:41:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epe.c,v 1.48 2020/02/19 02:51:54 thorpej Exp $ */
+/*     $NetBSD: epe.c,v 1.49 2022/09/17 19:44:13 thorpej Exp $ */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.48 2020/02/19 02:51:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.49 2022/09/17 19:44:13 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -189,8 +189,8 @@
        } while (sc->TXStsQ_cur != cur);
 
        sc->TXDQ_avail += ndq;
-       if (ifp->if_flags & IFF_OACTIVE) {
-               ifp->if_flags &= ~IFF_OACTIVE;
+       if (sc->tx_busy) {
+               sc->tx_busy = false;
                /* Disable end-of-tx-chain interrupt */
                EPE_WRITE(IntEn, IntEn_REOFIE);
        }
@@ -544,7 +544,7 @@
                if (epe_gctx(sc) == 0) {
                        /* Enable End-Of-TX-Chain interrupt */
                        EPE_WRITE(IntEn, IntEn_REOFIE | IntEn_ECIE);
-                       ifp->if_flags |= IFF_OACTIVE;
+                       sc->tx_busy = true;
                        ifp->if_timer = 10;
                        splx(s);
                        return;
@@ -687,7 +687,7 @@
        /* Down the MII. */
        mii_down(&sc->sc_mii);
 
-       ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+       ifp->if_flags &= ~IFF_RUNNING;
        ifp->if_timer = 0;
        sc->sc_mii.mii_media_status &= ~IFM_ACTIVE;
 }
diff -r 8c42771b2632 -r 2b4a1de1593f sys/arch/arm/ep93xx/epevar.h
--- a/sys/arch/arm/ep93xx/epevar.h      Sat Sep 17 19:23:24 2022 +0000
+++ b/sys/arch/arm/ep93xx/epevar.h      Sat Sep 17 19:41:18 2022 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: epevar.h,v 1.7 2012/11/12 18:00:36 skrll Exp $        */
+/*      $NetBSD: epevar.h,v 1.8 2022/09/17 19:44:13 thorpej Exp $        */
 /*-
  * Copyright (c) 2004 Jesse Off
  * All rights reserved
@@ -60,6 +60,7 @@
        struct epe_qmeta        rxq[RX_QLEN];
        struct epe_qmeta        txq[TX_QLEN];
        struct callout          epe_tick_ch;
+       bool                    tx_busy;
 };
 
 #endif /* _EPEVAR_H_ */



Home | Main Index | Thread Index | Old Index