lkml.org 
[lkml]   [1996]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NE2000 Module Problem (Try this patch)
On Tue, 10 Sep 1996 philou@urbanet.ch wrote:

> >
> > > 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 is
peculiar as we don't want to auto-probe ISA ones, yet now we autoprobe PCI
ones. Given this state of affair, I see only one possibility: Tell the ne
module how much device to expect. I am including a new patch (relative to
2.0.18, not my previous patch) which solve this.

A new parameter is available (nbunit), so you can tell the ne module how
much device to probe. The default value of this parameter is 1. The thing
is a little bit smarter though. If you don't now about nbunit, you can
still 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 is
supplied. 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 available
module parameter. I am wondering if "nbunit" should be made available in
all as a protection.

begin 644 ne2000-pci.patch2
M+2TM(&QI;G5X+V1R:79E<G,O;F5T+VYE+F]R:6<)36]N(%-E<"`@.2`Q-SHT
M,CHP,B`Q.3DV"BLK*R!L:6YU>"]D<FEV97)S+VYE="]N92YC"51U92!397`@
M,3`@,30Z,CDZ,S8@,3DY-@I`0"`M,3@W+#<@*S$X-RPQ-2!`0`H@"7T*("`@
M("!]"B`C96YD:68@("\J(&1E9FEN960H0T].1DE'7U!#22D@*B\*+0HK(VEF
M9&5F($U/1%5,10HK("`@('L**PES=&%T:6,@8VAA<B!T;VQD/3`["2\O(%=E
M(&]N;'D@8V]M<&QA:6X@;VYC90HK"6EF("@A=&]L9"D@('L**PD@("`@<')I
M;G1K*$M%4DY?3D]424-%(")N92YC.B!-;V1U;&4@875T;W!R;V)I;F<@;F]T
M(&%L;&]W960N($%P<&5N9"!<(FEO/3!X3DY.7"(@=F%L=64H<RDN7&XB*3L*
M*PD@("`@=&]L9"`](#$["BL)?0HK("`@('T**R-E;'-E"B`@("`@+RH@3&%S
M="!R97-O<G0N(%1H92!S96UI+7)I<VMY($E302!A=71O+7!R;V)E+B`J+PH@
M("`@(&9O<B`H:2`](#`[(&YE=&-A<F1?<&]R=&QI<W1;:5T[(&DK*RD@>PH@
M"6EN="!I;V%D9'(@/2!N971C87)D7W!O<G1L:7-T6VE=.PI`0"`M,3DV+#<@
M*S(P-"PW($!`"B`):68@*&YE7W!R;V)E,2AD978L(&EO861D<BD@/3T@,"D*
M(`D@("`@<F5T=7)N(#`["B`@("`@?0HM"BLC96YD:68*("`@("!R971U<FX@
M14Y/1$56.PH@?0H@(V5N9&EF"D!`("TV.#<L-R`K-CDU+#<@0$`*(`H@<W1A
M=&EC(&EN="!I;UM-05A?3D5?0T%21%-=(#T@>R`P+"!].PH@<W1A=&EC(&EN
M="!I<G%;34%87TY%7T-!4D1372`@/2![(#`L('T["BT**W-T871I8R!I;G0@
M;F)U;FET(#T@,3L*("\J(%1H:7,@:7,@<V5T('5P('-O('1H870@;F\@875T
M;W!R;V)E('1A:V5S('!L86-E+B!792!C86XG="!G=6%R86YT964*('1H870@
M=&AE(&YE,FL@<')O8F4@:7,@=&AE(&QA<W0@.#,Y,"!B87-E9"!P<F]B92!T
M;R!T86ME('!L86-E("AA<R!I=`H@:7,@870@8F]O="D@86YD('-O('1H92!P
M<F]B92!W:6QL(&=E="!C;VYF=7-E9"!B>2!A;GD@;W1H97(@.#,Y,"!C87)D
M<RX*0$`@+38Y-RPQ."`K-S`U+#$Y($!`"B!I;FET7VUO9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R7VYE=&1E=BAD978I("$]
M(#`I('L*(`D)"7!R:6YT:RA+15).7U=!4DY)3D<@(FYE+F,Z($YO($Y%*C`P
M,"!C87)D(&9O=6YD("AI+V\@/2`P>"5X*2Y<;B(L(&EO6W1H:7-?9&5V72D[
M"B`)"0EI9B`H9F]U;F0@(3T@,"D@<F5T=7)N(#`["2\J($=O="!A="!L96%S
*="!O;F4N("HO"@``
`
end


--------------------------------------------------------
Jacques Gelinas (jacques@solucorp.qc.ca)
Linuxconf: The ultimate administration system for Linux.
see http://www.solucorp.qc.ca:/linuxconf



\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site