Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Don't bother with IFF_OACTIVE. Just keep process...



details:   https://anonhg.NetBSD.org/src/rev/b0c21eb03f9b
branches:  trunk
changeset: 970294:b0c21eb03f9b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Mar 19 14:10:56 2020 +0000

description:
Don't bother with IFF_OACTIVE.  Just keep processing so long as
sc->xmit_busy is less than NTXBUF.

diffstat:

 sys/dev/ic/i82586.c |  17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diffs (62 lines):

diff -r ba5905a5ffec -r b0c21eb03f9b sys/dev/ic/i82586.c
--- a/sys/dev/ic/i82586.c       Thu Mar 19 14:06:32 2020 +0000
+++ b/sys/dev/ic/i82586.c       Thu Mar 19 14:10:56 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82586.c,v 1.88 2020/01/29 14:49:44 thorpej Exp $      */
+/*     $NetBSD: i82586.c,v 1.89 2020/03/19 14:10:56 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -137,7 +137,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.88 2020/01/29 14:49:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.89 2020/03/19 14:10:56 thorpej Exp $");
 
 
 #include <sys/param.h>
@@ -663,7 +663,6 @@
        int status;
 
        ifp->if_timer = 0;
-       ifp->if_flags &= ~IFF_OACTIVE;
 
 #if I82586_DEBUG
        if (sc->xmit_busy <= 0) {
@@ -1129,15 +1128,10 @@
        u_short len;
        int     s;
 
-       if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+       if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING)
                return;
 
-       for (;;) {
-               if (sc->xmit_busy == NTXBUF) {
-                       ifp->if_flags |= IFF_OACTIVE;
-                       break;
-               }
-
+       while (sc->xmit_busy < NTXBUF) {
                head = sc->xchead;
                xbase = sc->xbds;
 
@@ -1244,9 +1238,7 @@
        if (hard)
                printf("%s: reset\n", device_xname(sc->sc_dev));
 
-       /* Clear OACTIVE in case we're called from watchdog (frozen xmit). */
        sc->sc_ethercom.ec_if.if_timer = 0;
-       sc->sc_ethercom.ec_if.if_flags &= ~IFF_OACTIVE;
 
        /*
         * Stop i82586 dead in its tracks.
@@ -1657,7 +1649,6 @@
                (sc->hwinit)(sc);
 
        ifp->if_flags |= IFF_RUNNING;
-       ifp->if_flags &= ~IFF_OACTIVE;
 
        if (NTXBUF < 2)
                sc->do_xmitnopchain = 0;



Home | Main Index | Thread Index | Old Index