2002-04-25 22:04:07

by Santiago Garcia Mantinan

[permalink] [raw]
Subject: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)

Hi!

I've been playing around with one of this machines and trying to get the net
to work seems quite difficult because the driver doesn't want to init the
card well, when you do a modprobe you get this:

riazor:~# modprobe pcnet32
pcnet32_probe_pci: found device 0x001022.0x002000
PCI: Enabling device 00:0c.0 (0140 -> 0143)
ioaddr=0xbff400 resource_flags=0x000101
/lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: init_module: No such
device
Hint: insmod errors can be caused by incorrect module parameters, including
invalid IO or IRQ parameters
/lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: insmod
/lib/modules/2.4.18/kernel/drivers/net/pcnet32.o failed
/lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: insmod pcnet32 failed

Sometimes it works, but nearly none do, when it does I get:

pcnet32_probe_pci: found device 0x001022.0x002000
ioaddr=0xbff400 resource_flags=0x000101
divert: allocating divert_blk for eth0
eth0: PCnet/FAST 79C971 at 0xbff400,csraddr: 00 04 ac 97 51 7e
promaddr: 00 04 ac 97 51 7e
00 04 ac 97 51 7e
tx_start_pt(0x0c00):~220 bytes, BCR18(68e2):BurstWrEn BurstRdEn DWordIO NoUFlow
SRAMSIZE=0x7f00, SRAM_BND=0x4000,
pcnet32: pcnet32_private lp=cee53000 lp_dma_addr=0xee53000 assigned IRQ 22.
pcnet32.c:v1.25kf 17.11.2001 [email protected]

lspci reports this:
00:0c.0 Class 0200: 1022:2000 (rev 26)
00:0c.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet LANCE] (rev 26)

I saw a patch for solving this but it is old, so I supposed it should be on
this kernel (2.4.18), but it isn't, so I tried to apply it by hand as it
doesn't work like it is. The resulting code didn't work either, I'll try to
have a deeper look at it and see what I can find, but I think I did the
proper changes acording to the original patch :-(

If anybody has any clue on this I'd appreciate any help.

Thanks in advance!
--
Manty/BestiaTester -> http://manty.net


2002-04-25 22:16:02

by Anton Blanchard

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)


Hi,

> I've been playing around with one of this machines and trying to get the net
> to work seems quite difficult because the driver doesn't want to init the
> card well, when you do a modprobe you get this:
>
> riazor:~# modprobe pcnet32
> pcnet32_probe_pci: found device 0x001022.0x002000
> PCI: Enabling device 00:0c.0 (0140 -> 0143)
> ioaddr=0xbff400 resource_flags=0x000101
> /lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: init_module: No such
> device
> Hint: insmod errors can be caused by incorrect module parameters, including
> invalid IO or IRQ parameters
> /lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: insmod
> /lib/modules/2.4.18/kernel/drivers/net/pcnet32.o failed
> /lib/modules/2.4.18/kernel/drivers/net/pcnet32.o: insmod pcnet32 failed

Can you try something newer (eg 2.4.19-pre7)? There have been a number
of changes to the pcnet32 driver, one of them (from Paul Mackerras)
should fix your problem.

Anton

2002-04-25 22:21:27

by Tom Gall

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)

Hi Santiago,



Santiago Garcia Mantinan wrote:
<lots of PCnet 32 debug>

> I saw a patch for solving this but it is old, so I supposed it should be on
> this kernel (2.4.18), but it isn't, so I tried to apply it by hand as it
> doesn't work like it is. The resulting code didn't work either, I'll try to
> have a deeper look at it and see what I can find, but I think I did the
> proper changes acording to the original patch :-(

I'd recommend you grab the pcnet32 out of the larger ppc64 patch.
For pSeries (AKA Rs/6000) we have pcnet32 cards all over the place and
have
had to "fix" some things with the driver from time to time.

See http://www.linuxppc64.org for the patches.
(Grab say like the 2.4.18 patch, gunzip it and then
edit the patch by had, delete all the lives above and below
the specific patch for pcnet32, save it and then apply that)

> If anybody has any clue on this I'd appreciate any help.

regards,

Tom

--
Tom Gall - [embedded] [PPC64 | PPC32] Code Monkey
Peace, Love & "Where's the ka-boom? There was
Linux Technology Center supposed to be an earth
http://www.ibm.com/linux/ltc/ shattering ka-boom!"
(w) [email protected] -- Marvin Martian
(w) 507-253-4558
(h) [email protected]

2002-04-28 15:32:58

by Santiago Garcia Mantinan

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)

TX packets:494 errors:226 dropped:0 overruns:0 carrier:226
Hi again!

> Can you try something newer (eg 2.4.19-pre7)? There have been a number
> of changes to the pcnet32 driver, one of them (from Paul Mackerras)
> should fix your problem.

It fixes indeed the problem on the init of the card, but I have made a
deeper diagnosis of the problem and there are things left.

I have even got it to work with 2.4.18 without any patch. The problems
appear just when you do a netboot of the machine, if you just boot from the
disk 2.4.18 does ok. But if you boot from the net you get the problem with
detection on 2.4.18 which is solved on 2.4.19 pres, but also you get another
problem with the card, and it is that communication doesn't work like it
should, this problem is not corrected on 2.4.19preX as of pre7 at least.

This problems as I said before are caused when booting from the net and not
when the machine is booted from disk. It looks like the card is left on a
bad state by the openfirmware, in fact I've seen openfirmware fail several
times to retrieve big kernel files (more than 1 MB) and afterwards even fail
to do a bootp request, so I think that the card is left on a bad state that
drives as to things like this one:

A scp of a kernel to another machine connected to the same switched 10Mb LAN:
vmlinux-2.4.18 100% |*****************************| 2399 KB 05:10

RX packets:1619 errors:0 dropped:0 overruns:0 frame:0
TX packets:2831 errors:1417 dropped:0 overruns:0 carrier:1417

If I have time I'll test the driver that Tom Gall was sugesting me.

Thanks a lot!
--
Manty/BestiaTester -> http://manty.net

2002-04-28 16:45:10

by Santiago Garcia Mantinan

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)

> I'd recommend you grab the pcnet32 out of the larger ppc64 patch.
> For pSeries (AKA Rs/6000) we have pcnet32 cards all over the place and
> have
> had to "fix" some things with the driver from time to time.

Same experience as with 2.4.19pre7 that I descrived on my previous mail to
Anton Blanchard and the list, have a look at it for details. The card is
well detected but packages are being lost (this only happens when the
machine is booted from the net, just like in 2.4.18). If nobody else sees
this maybe it is a problem with the release of this openfirmware which just
fucks the card when using it :-?

Thanks a lot!
--
Manty/BestiaTester -> http://manty.net

2002-04-28 23:11:01

by Anton Blanchard

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)


> It fixes indeed the problem on the init of the card, but I have made a
> deeper diagnosis of the problem and there are things left.

Good, at least one bug is fixed :)

> I have even got it to work with 2.4.18 without any patch. The problems
> appear just when you do a netboot of the machine, if you just boot from the
> disk 2.4.18 does ok. But if you boot from the net you get the problem with
> detection on 2.4.18 which is solved on 2.4.19 pres, but also you get another
> problem with the card, and it is that communication doesn't work like it
> should, this problem is not corrected on 2.4.19preX as of pre7 at least.

Can you send me the version of OF you are using? You should be able to get
it off the bootup splash screen or by doing lsprop /proc/device-tree/openprom.
Do you get any errors in dmesg when the card stuffs up?

> This problems as I said before are caused when booting from the net and not
> when the machine is booted from disk. It looks like the card is left on a
> bad state by the openfirmware, in fact I've seen openfirmware fail several
> times to retrieve big kernel files (more than 1 MB) and afterwards even fail
> to do a bootp request, so I think that the card is left on a bad state that
> drives as to things like this one:

One thing to watch out for with the RS/6000 OF is that it wont reply
to ARP messages during a TFTP load. If you are trying to load a
big image you need to arp -s <hostname> <hw_addr>.

Anton

2002-04-29 14:15:47

by Santiago Garcia Mantinan

[permalink] [raw]
Subject: Re: pcnet32 on 2.4.18 doesn't init on IBM rs/6000 B50 (powerpc)

> Can you send me the version of OF you are using? You should be able to get
> it off the bootup splash screen or by doing lsprop /proc/device-tree/openprom.
> Do you get any errors in dmesg when the card stuffs up?

Umm, I don't have that lsprop installed, let's see if this is enough:

cat /proc/device-tree/openprom/ibm,fw-vernum_encoded
TCP00032
cat /proc/device-tree/openprom/ibm,loc-code
P1
cat /proc/device-tree/openprom/model
IBM,TCP00032
cat /proc/device-tree/openprom/name
openprom

> One thing to watch out for with the RS/6000 OF is that it wont reply
> to ARP messages during a TFTP load. If you are trying to load a
> big image you need to arp -s <hostname> <hw_addr>.

Ah, that could be it, yes.

But this doesn't explain the problem we are having with the card under linux
once we boot from the net ;-)

Thanks again!

Regards...
--
Manty/BestiaTester -> http://manty.net