> > > > > On Mon, 9 Sep 1996, Andrew E. Mileski wrote:> > > > > > > > No, you use the real port address.> > > > > > > > > > "cat /proc/pci" is your friend. Look for your NE2000 card, remember the> > > > > I/O address it's been assigned, and give that to insmod.> > > > > > > > Sorry to disappoint you - I'm not that green :-)> > > > I of course tried this long before I started this thread.> > > > I have made this patch to drivers/net/ne.c on linux 2.0.18. I don't have a> > ne2000 PCI adaptor (Only one on a server I can't reboot :-( ). The change> > is simply to remove the dangerous probing from ne_probe() when compiled as> > a module and let the module try to probe. If it is PCI, it will try. If it> > fails to locate a PCI adaptor (ne2000), then it will print a message.> > > > Anyone cares to try it. All I can say is that my ISA adaptor compiled as a> > module still works! If it works, maybe it should be sent to Paul> > (maintainer of this module I think). I don't think he has one adaptor like> > this anyway.> > I have a RTK8029 PCI, so i tried your patch, and it works fine.> Just one thing. I have a PCI NIC and an ISA NIC, both using the same> driver. Compiling the driver inside the kernel work just fine for me, > i add a kernel param in lilo.conf to use the second (ISA card).> > Anyway, since you asked, i've insmod'ing the modules without args> and it gives me that:> > loading device 'eth0'...> ne.c: PCI BIOS reports ne2000 clone at i/o 0xff80, irq 11.> ne.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)> NE*000 ethercard probe at 0xff80: 00 00 1c 30 05 68> eth0: NE2000 found at 0xff80, using IRQ 11.> loading device 'eth1'...> ne.c: Module autoprobing not allowed. Append "io=0xNNN" value(s).> ne.c: No NE*000 card found (i/o = 0x0).> > the second (ISA NIC) is not detected.> > with io=0x320 (ISA NIC IO base), it gives that:> > loading device 'eth0'...> ne.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)> NE*000 ethercard probe at 0x320: 00 00 b4 32 a2 02> eth0: NE2000 found at 0x320, using IRQ 10.> loading device 'eth1'...> ne.c: PCI BIOS reports ne2000 clone at i/o 0xff80, irq 11.> NE*000 ethercard probe at 0xff80: 00 00 1c 30 05 68> eth1: NE2000 found at 0xff80, using IRQ 11.> loading device 'eth2'...> ne.c: Module autoprobing not allowed. Append "io=0xNNN" value(s).> ne.c: No NE*000 card found (i/o = 0x0).> > Now eth0 is the ISA NIC, after come the autoprobe, and then a third attempt > failing... Still room for improvement, but it works.> This rise a question: how could we cleanly define argument to insmod> when two or more peripheral use the same module?

the io= parameter is indeed an array so you can write

modprobe ne io=0,0x320

which will load the PCI first, then the ISA and then fail. The ne2000 ispeculiar as we don't want to auto-probe ISA ones, yet now we autoprobe PCIones. Given this state of affair, I see only one possibility: Tell the nemodule how much device to expect. I am including a new patch (relative to2.0.18, not my previous patch) which solve this.

A new parameter is available (nbunit), so you can tell the ne module howmuch device to probe. The default value of this parameter is 1. The thingis a little bit smarter though. If you don't now about nbunit, you canstill do

modprobe ne io=0x320,0x280

and two adaptor will be used.

So nbunit is the amount of adaptor we are trying to locate unless an IO issupplied. People with 4 pci adaptor could go with

modprobe ne nbunit=4

People with only one PCI adaptor can go with

modprobe ne

Anyway, here is the patch. Comments are welcome

There is some sort of standard among ethernet adaptor for the availablemodule parameter. I am wondering if "nbunit" should be made available inall as a protection.