Subject: kern/3197: inconsistent IFF_RUNNING flag handling in if_ep driver
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Drochner <drochner@zelz26.zel.kfa-juelich.de>
List: netbsd-bugs
Date: 02/06/1997 09:55:09
>Number:         3197
>Category:       kern
>Synopsis:       inconsistent IFF_RUNNING flag handling in if_ep driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb  6 01:05:00 1997
>Last-Modified:
>Originator:     Matthias Drochner
>Organization:
	KFA Juelich
>Release:        current
>Environment:
	NetBSD-current/i386
System: NetBSD zelz26 1.2B NetBSD 1.2B (TULIP.gdb) #32: Mon Feb 3 21:12:30 MET 1997 drochner@zelz26:/home/drochner/netbsd-970122/sys/arch/i386/compile/TULIP.gdb i386


>Description:
	After attach, the adapter hardware is reset but the IFF_RUNNING flag
stays. This makes a simple "up" request (SIOCSIFFLAGS ioctl) fail.
(Most users set an address with "ifconfig". This does not trigger this bug.
Machines with NFS root are affected.)
>How-To-Repeat:
	Try root on nfs with a 3c590.
>Fix:
*** /zelnfs/p3/drochner/netbsd-current/src/sys/dev/ic/elink3.c  Wed Jan 
1 13:19:10 1997
--- elink3.c    Wed Feb  5 20:51:41 1997
***************
*** 1124,1128 ****
                         */
                        epstop(sc);
-                       ifp->if_flags &= ~IFF_RUNNING;
                } else if ((ifp->if_flags & IFF_UP) != 0 &&
                           (ifp->if_flags & IFF_RUNNING) == 0) {
--- 1124,1127 ----
***************
*** 1218,1221 ****
--- 1217,1222 ----

        epmbufempty(sc);
+
+       sc->sc_arpcom.ac_if.if_flags &= ~IFF_RUNNING;
  }


>Audit-Trail:
>Unformatted: