Subject: configuring 2 ethernet ports

From: David Kesselring <[email-masked]>
Date: Fri, 24 Oct 2003 09:11:26 -0400 (EDT)

I am trying to setup a pci wlan nic on a Malta board. I've compiled the
driver into the kernel and I have setup
/etc/sysconfig/network-scripts/ifcfg-eth1. After boot, when I look at
/proc/pci it looks like the system detected the card fine but ifconfig
only shows eth0 (the builtin port). How is the pci id linked to a
particular driver? What else do I need to do? I've scoured google but have
not come up with an answer. Thanks again,

David Kesselring
Atmel MMC
[email-masked]
919-462-6587

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Fri, 24 Oct 2003 15:18:38 +0200

On Fri, 2003-10-24 09:11:26 -0400, David Kesselring <[email-masked]>
> driver into the kernel and I have setup

Which brand of wlan card?

> particular driver? What else do I need to do? I've scoured google but have

In 2.4.x, drivers tend to only have internal knowledge on which hardware
they work. So you need to give some 'alias eth1 wlanmodulename' in your
/etc/modules.conf file.

For 2.6.x, drivers export this table and (in theory), the hotplug
scripts *can* load a driver just upon the card showing up. However,
normally (for static network cards not handled by the hotplug API),
you'll just use the exactly same line, but in /etc/modprobe.conf.

MfG, JBG

-- 
   Jan-Benedict Glaw       [email-masked]    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

---

From: David Kesselring <[email-masked]>
Date: Fri, 24 Oct 2003 09:41:23 -0400 (EDT)

> Which brand of wlan card?

It's an internal card.

> they work. So you need to give some 'alias eth1 wlanmodulename' in your
I am using 2.4. Why does eth1 need a modules.conf file and eth0 doesn't. I
do not have loadable modules configured for my kernel. Do I have to? I
don't even have a current modules.conf file.
I also checked /etc/sysconfig/hwconf. This has the pci listing for my card
but does not recognize the vendor or id. I did add an entry in the kernel
source pci_ids.h for my card.

David Kesselring
Atmel MMC
[email-masked]
919-462-6587

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Fri, 24 Oct 2003 16:40:12 +0200

On Fri, 2003-10-24 09:41:23 -0400, David Kesselring <[email-masked]>
> I am using 2.4. Why does eth1 need a modules.conf file and eth0 doesn't. I

This is the case if you've compiled the driver for eth0 directly into
the kernel. Then, it'll automatically be started and userspace got an
interface to configure.

If it isn't directly compiled in, you've to give it a chance to figure
out the correct driver, eg. by a module.conf "alias" line or by a simple
modprobe somewhere...

> don't even have a current modules.conf file.

You don't *need* to have modules. ...but then, you need to have the
correct driver compiled in. If it's already compiled in, then it
apparently doesn't recognize the card. In this case, the PCI table
inside the module's code is missing the PCI vendor/device ID.

> source pci_ids.h for my card.

That's not enough. By doing this, you tell the *readers* of this header
file that there's a new vendor or device. That doesn't tell the
*drivers* that they've got a new supported device. So if you compiled-in
the correct driver and 'ifconfig -a' doesn't show it, then it seems that
the (correct) driver incorrectly doesn't know your device IDs. Add those
to the driver's PCI ID table.

MfG, JBG