[tulip] PCI reverse

David Flynn Dave@keston.u-net.com
Tue Dec 18 19:18:00 2001


> I have the same problem with the duplicated HWaddresses on my
> ANA-6944A/TX with the de4x5 driver from 2.4.16.

> It's the only driver which works for me correctly. With 2.4
> the tulip driver locks the machine when 2 or more interfaces
> are being configured and the de4x5 has duplicated HWaddresses.
> Theres some pci_reverse scan patch. But that patch only
> gives eth3 the HWaddress of eth0 and has dupplicated addresses
> for eth0-2. (It "reverses" the problem)

The pci_reverse patch is only a fix for machines with retarded BIOSes.  The
problem is caused by the BIOS looking at devices on the other side of a PCI
bridge in the wrong order.

Symptoms of this include, when the card is detected and configured by the
driver, the first three ports will have an EEPROM not found error, and
incorrect MAC addresses (by incorrect, i mean that it will look like this:

Jan  1 00:00:25 firewall0 kernel: eth0: Digital DC21040 Tulip rev 36 at
0xfc80, EEPROM not present, 00:4C:69:6E:75:79, IRQ 11.
Jan  1 00:00:25 firewall0 kernel: eth1: Digital DC21040 Tulip rev 36 at
0xfc00, EEPROM not present, 00:4C:69:6E:75:7A, IRQ 11.
Jan  1 00:00:25 firewall0 kernel: eth2: Digital DC21040 Tulip rev 36 at
0xf880, EEPROM not present, 00:4C:69:6E:75:7B, IRQ 11.
Jan  1 00:00:25 firewall0 kernel: eth3: Digital DC21040 Tulip rev 36 at
0xf800, 00:00:92:92:39:58, IRQ 3.

if you think about 0x4C 0x69 0x6E 0x75 0x79 in ASCII, it spells LINUX, this
is a BOGUS address that is coded into the tulip driver.)

Now the fix for this is to reverse the order devices on the other side of a
PCI bridge are put into a list in the kernel. that is all the patch does.
This then allows the driver to detect the first port as it should do (the
one with the EEPROM), and all will almost work.  Note, the tulip driver
attempts to fix the problem itself in 2.2.x kernels, and it is successfull.
However, things changed in 2.4 and this no longer works.

i will say it one more time, the patch only fixes problems with RETARDED
BIOSES that have a slightly incorrect interpretation of the PCI (i think)
specs.

Now why i can not use the tulip driver (i last tried it when 2.4.5 was
arround) i dont know.  it just hangs the system when you try and bring two
interfaces up.  the de4x5 driver presents no such problem.  I do not know
why that happens, and since de4x5 fixes it, and this is an operational
firewall, it isnt too easy to start playing arround with kernel code and
crashing the box. although, if someone has some ideas i might beable to do
some work during the night over christmas.

Thanks,

Dave