* pcnet32 does not use the PROM address on powerpc
@ 2005-10-08 10:47 Olaf Hering
2005-10-08 12:03 ` Olaf Hering
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2005-10-08 10:47 UTC (permalink / raw)
To: netdev, linuxppc64-dev
Does anyone remember why ppc is handled special in pcnet32_probe1()?
It as added to Linus tree around 2.6.14, I dont find relevant patches in
our bugzilla. It was likely added during early ppc64 bringup.
google doesnt know the patch submitter, perhaps jgarzik has some old
records from around 2000/2001?
I have a 44p 270, which gets all 0xFF as MAC address if I power if off
and on again. Further reboots do not fix it.
But it does get the correct one if I boot into SMS and do a netboot,
further reboots will always get the correct MAC address
I think these 0xFF happen also on other systems, I have seen them on B50
as well. We should just remove the #ifdef.
....
if (memcmp(promaddr, dev->dev_addr, 6)
|| !is_valid_ether_addr(dev->dev_addr)) {
#ifndef __powerpc__
if (is_valid_ether_addr(promaddr)) {
#else
if (!is_valid_ether_addr(dev->dev_addr)
&& is_valid_ether_addr(promaddr)) {
#endif
if (pcnet32_debug & NETIF_MSG_PROBE) {
printk(" warning: CSR address invalid,\n");
printk(KERN_INFO " using instead PROM address of");
}
memcpy(dev->dev_addr, promaddr, 6);
}
}
....
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pcnet32 does not use the PROM address on powerpc
2005-10-08 10:47 pcnet32 does not use the PROM address on powerpc Olaf Hering
@ 2005-10-08 12:03 ` Olaf Hering
2005-10-10 14:23 ` [PATCH] " Olaf Hering
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2005-10-08 12:03 UTC (permalink / raw)
To: netdev, linuxppc64-dev
On Sat, Oct 08, Olaf Hering wrote:
> I have a 44p 270, which gets all 0xFF as MAC address if I power if off
> and on again. Further reboots do not fix it.
> But it does get the correct one if I boot into SMS and do a netboot,
> further reboots will always get the correct MAC address
The CSR will get the correct value after the first ifup:
(none):/# modprobe -v pcnet32
insmod /lib/modules/2.6.13.3-20051007_rtas-ppc64/kernel/drivers/net/mii.ko
insmod /lib/modules/2.6.13.3-20051007_rtas-ppc64/kernel/drivers/net/pcnet32.ko
(none):/# ip link set eth0 up
(none):/# rmmod pcnet32
(none):/# modprobe -v pcnet32
insmod /lib/modules/2.6.13.3-20051007_rtas-ppc64/kernel/drivers/net/mii.ko
insmod /lib/modules/2.6.13.3-20051007_rtas-ppc64/kernel/drivers/net/pcnet32.ko
(none):/# dmesg | tail -n 15
pcnet32.c:v1.30j 29.04.2005 tsbogend@alpha.franken.de
PCI: Enabling device: (0000:00:10.0), cmd 143
pcnet32: PCnet/FAST 79C971 at 0xfff400, prom 0004ace4a6d7 csr ffffffffffff, warning: CSR address invalid,
using instead PROM address of 00 04 ac e4 a6 d7
tx_start_pt(0x0c00):~220 bytes, BCR18(68e1):BurstWrEn BurstRdEn DWordIO NoUFlow
SRAMSIZE=0x7f00, SRAM_BND=0x4000, assigned IRQ 18.
eth0: registered as PCnet/FAST 79C971
pcnet32: 1 cards_found.
eth0: link up, 100Mbps, half-duplex, lpa 0x40A1
pcnet32.c:v1.30j 29.04.2005 tsbogend@alpha.franken.de
pcnet32: PCnet/FAST 79C971 at 0xfff400, prom 0004ace4a6d7 csr 0004ace4a6d7, 00 04 ac e4 a6 d7
tx_start_pt(0x0c00):~220 bytes, BCR18(68e1):BurstWrEn BurstRdEn DWordIO NoUFlow
SRAMSIZE=0x7f00, SRAM_BND=0x4000, assigned IRQ 18.
eth0: registered as PCnet/FAST 79C971
pcnet32: 1 cards_found.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pcnet32 does not use the PROM address on powerpc
2005-10-08 12:03 ` Olaf Hering
@ 2005-10-10 14:23 ` Olaf Hering
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2005-10-10 14:23 UTC (permalink / raw)
To: netdev, linuxppc64-dev
On Sat, Oct 08, Olaf Hering wrote:
> On Sat, Oct 08, Olaf Hering wrote:
>
> > I have a 44p 270, which gets all 0xFF as MAC address if I power if off
> > and on again. Further reboots do not fix it.
> > But it does get the correct one if I boot into SMS and do a netboot,
> > further reboots will always get the correct MAC address
The CSR contains garbage after a coldboot on RS/6000.
One some systems (like my 44p 270) the MAC address is all FF,
on others (like my B50) it is ff:ff:ff:fd:ff:6b.
It can eventually be fixed by loading pcnet32, set the interface
into the UP state, rmmod pcnet32 and load it again. But this worked
only on the 270.
Only netbooting after a cold start provides the correct MAC address
via prom and CSR. This makes it very unreliable.
I dont know why the MAC is stored in two different places. Remove
the special case for powerpc, which was added in early 2.4 development.
Signed-off-by: Olaf Hering <olh@suse.de>
drivers/net/pcnet32.c | 5 -----
1 files changed, 5 deletions(-)
Index: linux-2.6.14-rc3/drivers/net/pcnet32.c
===================================================================
--- linux-2.6.14-rc3.orig/drivers/net/pcnet32.c
+++ linux-2.6.14-rc3/drivers/net/pcnet32.c
@@ -1172,12 +1172,7 @@ pcnet32_probe1(unsigned long ioaddr, int
if (memcmp(promaddr, dev->dev_addr, 6)
|| !is_valid_ether_addr(dev->dev_addr)) {
-#ifndef __powerpc__
if (is_valid_ether_addr(promaddr)) {
-#else
- if (!is_valid_ether_addr(dev->dev_addr)
- && is_valid_ether_addr(promaddr)) {
-#endif
if (pcnet32_debug & NETIF_MSG_PROBE) {
printk(" warning: CSR address invalid,\n");
printk(KERN_INFO " using instead PROM address of");
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-10 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-08 10:47 pcnet32 does not use the PROM address on powerpc Olaf Hering
2005-10-08 12:03 ` Olaf Hering
2005-10-10 14:23 ` [PATCH] " Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).