Subject: Re: NFS root doesn't work with 3c590
To: None <port-i386@NetBSD.ORG, current-users@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: current-users
Date: 02/05/1997 21:02:22
Excerpts from netbsd: 6-Feb-97 Re: NFS root doesn't work w.. Noriyuki
Soda@sra.co.jp (643)

> - Does your kernel configured with proper interface type ?
>   To achieve this, currently kernel patch is requied.
>   (ifp->if_flags, IFF_LINK[01] bit)

I think I this is not the problem because I use BNC and this
means IFF_LINK[01] = 00.
As I wrote, when the system is running, a simple "ifconfig"
is enough to make the 3c590 run too, without link flags.

Excerpts from netbsd: 5-Feb-97 NFS root doesn't work with .. Matthias
Drochner@??? (681)

> So my question: what is difference between the initialization
> in mountroot() and the initialization by ifconfig?

I found it myself:
There is a flaw in the driver: At the end of epconfig(), epinit()
is called. This sets the IFF_RUNNING bit in if_flags.
Then, epstop() is called, but this doesn't affect the flags.
This means, IFF_RUNNING stays there all the time.
That's why the SIOCSIFFLAGS ioctl, which is used by
nfs_boot_init, doesn't start the interface again.
ifconfig causes a SIOCSIFADDR, which calls epinit()
in any case.
I don't know why this hurts the 3c590, but neither the 509
nor the 595.
The patch

*** /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;
  }

solved my problem.

Thanks for the hints anyway!
Matthias Drochner