Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 240718 - sys-kernel/gentoo-sources-2.6.25-r6: wrong mac address from de2104x on alpha
Summary: sys-kernel/gentoo-sources-2.6.25-r6: wrong mac address from de2104x on alpha
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Alpha Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 16:37 UTC by martin-langer
Modified: 2008-10-16 20:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Bugfix (de2104x.patch,323 bytes, patch)
2008-10-11 18:15 UTC, martin-langer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description martin-langer 2008-10-09 16:37:24 UTC
This is an Alpha XL300 (ev5) machine and de2104x boots sometimes with a wrong mac address. Well the address is very very similar, it's just one byte shifted. 

It can start so:
de2104x PCI Ethernet driver v0.7 (Mar 17, 2004)
eth0: 21040 at 0xfffffc8602231000, 00:f8:22:00:ee:f1, IRQ 29

... or so:
de2104x PCI Ethernet driver v0.7 (Mar 17, 2004)
eth0: 21040 at 0xfffffc8602231000, 00:00:f8:22:00:ee, IRQ 29
udev: renamed network interface eth0 to eth1

I never saw any helpful error message about it. The card works fine, but it's a little bit annoying because udev thinks i have two different interfaces and I have to handle with eth0 and eth1...

And I'm still trying to understand when and why it will start with a different mac address, but I don't understand the rules. 

Reproducible: Sometimes
Comment 1 martin-langer 2008-10-09 16:57:02 UTC
alpha ~ # lspci -vv
00:06.0 Ethernet controller: Digital Equipment Corporation DECchip 21040 [Tulip] (rev 24)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32
        Interrupt: pin A routed to IRQ 29
        Region 0: I/O ports at 9400 [size=128]
        Region 1: Memory at 02231000 (32-bit, non-prefetchable) [size=128]
        Kernel driver in use: de2104x
        Kernel modules: de2104x
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-09 18:17:50 UTC
Can you figure out which (of the two?) is the proper MAC address for that card?
Comment 3 martin-langer 2008-10-09 20:00:01 UTC
The AlphaBIOS prints out the second address 00:00:f8:22:00:ee. It's too bad, the address is not written on the board or any sticker. To clarify wether the box has no hardware issue I did so many resets until the AlphaBIOS and linux values differ. And yes I saw it twice that AlphaBIOS shows the 00:00... value and linux got the wrong 00:f8... during the same boot process (AlphaBIOS->MILO->Linux).

Finally, I would say 20% of my card initialisations have been wrong today. Nevertheless the BIOS prints always the same correct value.
Comment 4 Tobias Klausmann (RETIRED) gentoo-dev 2008-10-10 08:06:28 UTC
As for the udev problem, you can get rid of that (persistent net devices) by removing /etc/udev/rules.d/75-persistent-net-generator.rules

To have portage remove that file every time you update udev, put this in /etc/make.conf:
INSTALL_MASK="/etc/udev/rules.d/75-persistent-net-generator.rules"

As for the byte shifting, that sounds like wonky hardware or maybe a corner case bug in the kernel. Have you tried different kernels? Which kernel version do you currently use.
Comment 5 martin-langer 2008-10-11 13:09:26 UTC
The problem appeared with a new installation, my kernel version was gentoo-sources-2.6.25-r6. But I just tried two different kernels from kernel.org (2.6.22, 2.6.27) and this strange mac shifting is always observable.

Am I the only one with such a problem? I didn't found similar reports yet. I don't think it's a hardware bug. I think something is simply just unitialised.
Comment 6 martin-langer 2008-10-11 18:15:36 UTC
Created attachment 168056 [details, diff]
Bugfix

It seems the DEC 21040 hardware is a little bit to slow for an immediate access. This patch introduces a small pause and that solves my problem.

Signed-off-by: Martin Langer <martin-langer@gmx.de>
Comment 7 martin-langer 2008-10-16 20:23:17 UTC
Good news: Linus applied the patch. It looks like this fix will come with kernel releases >= 2.6.28-rc1.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc0da3fcec1cec11dc451b8fcb9c9ad7e4ca6e12