[yellowfin] sym53C885 eeprom and station address

Robbie Dinn robbie@microbus.co.uk
Thu, 25 May 2000 12:32:24


Hello list and Donald,

The company that I work for manufacture a processor board
that uses the Symbios SYM53C885 PCI SCSI/Ethernet
multi function chip. It is an intel architecture board (intel pentium
or AMD K6)

There seem to be two separate problems, both involving
the ethernet station address (6 byte network address) that
is stored in the serial eeprom hanging off the SYM53C885
chip. The problems are (1) reading the eeprom contents correctly
and (2) interpreting the eeprom contents corrently.

There are two different versions of the yellowfin driver I
have looked at. First is the Donald Becker driver at
http://www.scyld.com/network/yellowfin.c version 1.04 4/09/2000
The second is driver that comes with kernel 2.2.15

Currently neither driver works with our hardware.
Donald's v1.04 driver reads the eeprom correctly but
misinterprets the eprom contents.

The kernel 2.2.15 driver fails to read the eeprom correctly
and also misinterprets the eprom contents (with our hardware).

Donald's driver sets the variable bogus_cnt in function read_eeprom()
to 10000. But the 2.2.15 driver sets this variable to only 1000
(factor of ten smaller). If I edit the 2.2.15 driver to increase bogus_cnt,
the eeprom starts being read correctly.

The second problem is how to interpret the eeprom contents.
Both drivers seem to fail here with our hardware.

Here is how the datasheet for the SYM53C885 describes the
eeprom contents...

byte 0x0 SVID(0)
	Subsytem vendor Id, LSB
	Loaded into Subsytem Vendor ID register in PCI configuration
	space at chip power-up or reset.

Byte 0x1 SVID(1)
	Subsystem vendor Id, MSB.

Byte 0x2 SID(0)
	Subsystem Id, LSB.
	Loaded into Subsytem ID register in PCI configuration
	space at chip power-up or reset.

Byte 0x3 SID(1)
	subsystem Id, MSB.

Byte 0x4 EHA(0)
	Ethernet Hardware Address byte 0 (LSB)
	Loaded into the LSB of Station Address 0 register at chip
	power-up or reset.

Byte 0x5 EHA(1)
	Ethernet Hardware Address byte 1
	Loaded into the MSB of Station Address 0 register at chip
	power-up or reset.

Byte 0x6 EHA(2)
	Ethernet Hardware Address byte 2
	Loaded into the LSB of Station Address 1 register at chip
	power-up or reset.

Byte 0x7 EHA(3)
	Ethernet Hardware Address byte 3
	Loaded into the MSB of Station Address 1 register at chip
	power-up or reset.

Byte 0x8 EHA(4)
	Ethernet Hardware Address byte 4
	Loaded into the LSB of Station Address 2 register at chip
	power-up or reset.

Byte 0x9 EHA(5)
	Ethernet Hardware Address byte 5 (MSB)
	Loaded into the MSB of Station Address 2 register at chip
	power-up or reset.

Byte 0xA CKSUM
	Checksum. This 8-bit checksum is formed by adding, bytewise
	each byte contained in the locations 0x0 to 0x9 to the seed
	value 55h then taking the 2's complement of the result.

Bytes 0xB to 0xff Reserved

Bytes 0x100 to 0x1ff User Data


Neither driver seems to look in the right place in the eeprom
(variable ee_offset in function yellowfin_probe1(). )

Both drivers try either offset 0 or offset 0x100.
I think this offset should be 0x4 to match the datasheet.

On our hardware, offset 0 gets you the subsystem vendor ID
and subsytem vendor fields , plus 1/3 of the ethernet hardware
address. (we set the two subsystem ID fields both to zero).
Offset 0x100 gets you the user data area, which might contain
all ff's or might contain junk that the windows/dos driver/bios
happened to write there once upon a time.

I notice that in Donalds v1.04 driver that in function
yellowfin_probe1(), a check is made to see if the IsGigabit
flag is set, and is it is, then reads the stations address directly
instead of the serial eeprom. No need to guess the offset in that
case.

Would it be better to forget about reading the eeprom all together
and just read the station address registers? i.e make the driver treat
the symbios SYM53C885 chip the same as the Packet Engines chip?

Finally, how do Donald's bug fixes make their way to the main
kernel?


----------
robbie@microbus.co.uk