Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jan 2002 17:25:50 -0800
From:      "Jin Guojun[ITG]" <j_guojun@lbl.gov>
To:        bmah@acm.org
Cc:        ashp@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/27087: FreeBSD 4.3-RELEASE does not recognize GigE NIC
Message-ID:  <3C4A1C9E.3B4BFAEA@lbl.gov>
References:  <200201170303.g0H33S297380@freefall.freebsd.org> <3C48E5C0.BDFAE09A@lbl.gov> <200201190506.g0J56fb60438@bmah.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Bruce A. Mah" wrote:
> 
> If memory serves me right, "Jin Guojun[ITG]" wrote:
> 
> > Yes, it is still the problem in 4.4-RELEASE. The work around is to add
> > following lines into the /etc/rc.conf (for sk NIC):
> >
> > ------/etc/rc.conf
> > # -- sysinstall generated deltas -- # Fri Dec 21 12:05:49 2001
> > # Created: Fri Dec 21 12:05:49 2001
> > # Enable network daemons for user convenience.
> > # Please make all changes to this file, not to /etc/defaults/rc.conf.
> > # This file now contains just the overrides from /etc/defaults/rc.conf.
> > ifconfig sk0  # kldload /modules/if_sk.ko does not work
> > sleep 2
> > ifconfig_sk0="inet xxx.yyy.zzz.hhh netmask 255.255.255.0 media 1000baseSX
> > mediaopt
> > -------end of /etc/rc.conf
> 
> It's been awhile since I looked at this PR, but I remember thinking
> that the "real" problem was that you needed the sk (or ti) driver and
> it wasn't in GENERIC (or on the stripped-down kernel used on the boot
> floppies).  I'm not sure why, but none of the GigE drivers are in
> GENERIC.

The drivers may not be needed in kernel configuration file if we use 
KLD module. So, I think this is ok.


> A slightly cleaner way of loading the module you need is to put the
> lines:
> 
>         if_sk_load="YES"
>         if_ti_load="YES"
> 
> into /boot/loader.conf.  This will cause the applicable module(s) to be
> loaded along with the kernel.
> 
> This doesn't help you for first-time installs though.  But one way to do
> this is to put the module you need on a floppy disk.  sysinstall now has
> the ability to load a kernel module from a floppy disk (look on the
> Configure menu).  This will let you do the installation; you can then
> manually edit /boot/loader.conf as described above.  Caveat:  I haven't
> tried this myself.

We should have a better way to do this, because any above solution makes
the option
	 network_interfaces="auto"
in /etc/default/rc.conf meaningless to any NIC drivers to use KLD module.
Currently, this  is a chicken-&-egg problem. Without probing the PCI device,
"ifconfig -l" will not be able to list all interface names. Without a NIC
name, we cannot configure a such NIC to load its module to probe the
device. 
I do not remember what was done prior to the 4.3, this was not a problem
prior to the 4.3-RELEASE.

To make auto configuration useful for loading KLD modules, the PCI probing
stage need to be smart to load the KLD module when an unconfigured device
presents and its module is in /modules directory.

We may use a /boot/pci-modules for pci_probe_nomatch() to auto load an
unknown device. For example, an entry for sk GigE module may look like:

vendor=0x1148	dev=0x4300	/module/if_sk.ko

When no "desc" is returned by an unknown device, check the list described
in /boot/pci-modules file to see if any module is matched for this device.
Load the module if the module exists. Then, "ifconfig -l" in rc.network
can list all NIC names, and auto-config will work for real.

> Hope this helps...
> 
> Bruce.
> 
> PS.  Hi, Jin!

Tian Bu, Univ. Mass, told me you have moved. I do not remember where
he met you, maybe he heard from someone else. Well, I should make this
off line. More later.

	-Jin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C4A1C9E.3B4BFAEA>