[vortex] The mysteries of on-chip MII.

Bill Cattey wdc@MIT.EDU
Tue Mar 26 16:20:01 2002


So now we understand the whole story:

If you happen to use Etherboot or some other driver that mindlessly
sets the EEPROM values to work around an old 3c905b bug, you get into
this state.

Normal people won't ordinarily get into this state, and it is GOOD to
know this definitively.

I have grabbed hold of a Dell GX150 fresh out of the box and
interrogated it with vortex-diag:

vortex-diag.c:v2.05 5/15/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a 3c905C Tornado 100baseTx adapter at 0xec80.
The Vortex chip may be active, so FIFO registers will not be read.
To see all register values use the '-f' flag.
Initial window 7, registers values by window:
  Window 0: 0000 0000 0000 0000 adad 00bf ffff 0000.
  Window 1: FIFO FIFO 0700 0000 0000 003f 0000 2000.
  Window 2: 0600 475b 2cd0 0000 0000 0000 0052 4000.
  Window 3: 0000 0180 05ea 0020 000a 0800 0800 6000.
  Window 4: 0000 0000 0000 0cc6 0001 8880 0100 8000.
  Window 5: 1ffc 0000 0000 0600 0807 06ce 06c6 a000.
  Window 6: 0000 0000 0000 a801 0100 f675 160f c000.
  Window 7: 0000 0000 0000 0000 0000 0000 0000 e000.
Vortex chip registers at 0xec80
  0xEC90: **FIFO** 00000000 0000001b *STATUS*
  0xECA0: 00000020 00000000 00080000 00000004
  0xECB0: 00000000 591aa6e6 1fb25080 00080004
 Indication enable is 06c6, interrupt enable is 06ce.
 No interrupt sources are pending.
 Transceiver/media interfaces available:  100baseTx 10baseT.
Transceiver type in use:  Autonegotiate.
 MAC settings: full-duplex.
 Station address set to 00:06:5b:47:d0:2c.
 Configuration options 0052.
EEPROM contents (64 words, offset 0):
 0x000: 0006 5b47 d02c 9200 00ca 0000 0000 6d50
 0x008: 2940 0000 0006 5b47 d02c 0010 0000 00aa
 0x010: 72a2 0000 0000 0184 0000 0005 0000 1028
 0x018: 00be 000a 0000 6300 ff68 6868 0000 0030
 0x020: 0000 1030 70f0 0000 0000 0000 0000 0000
 0x028: 0000 0000 0000 0000 0000 0000 0000 0000
 0x030: 0000 0000 ffff ffff ffff ffff ffff ffff
 0x038: ffff ffff ffff ffff ffff ffff ffff ffff
 The word-wide EEPROM checksum is 0x5233.
Saved EEPROM settings of a 3Com Vortex/Boomerang:
 3Com Node Address 00:06:5B:47:D0:2C (used as a unique ID only).
 OEM Station address 00:06:5B:47:D0:2C (used as the ethernet address).
 Manufacture date (MM/DD/YYYY) 6/10/2000, division, product .
 Options: negotiated duplex, link beat required.
  Vortex format checksum is incorrect (00e6 vs. 1028).
  Cyclone format checksum is incorrect (0x6a vs. 00).
  Hurricane format checksum is incorrect (0xae vs. 00).
 MII PHY found at address 1, status 0024.
 MII PHY found at address 2, status 0024.
 MII PHY found at address 3, status 0024.
 MII PHY found at address 4, status 0024.
 MII PHY 0 at #1 transceiver registers:
   0000 0024 0000 0000 01e0 45e1 0003 0800
   0000 0000 0000 0000 0000 0000 0000 0000
   0600 c611 0000 4000 0000 0000 0000 0000
   0000 0200 0000 0000 0000 0b6c 0000 0000.
 MII PHY 1 at #2 transceiver registers:
   0000 0024 0000 0000 01e0 45e1 0003 0800
   0000 0000 0000 0000 0000 0000 0000 0000
   0600 c611 0000 4000 0000 0000 0000 0000
   0000 0200 0000 0000 0000 0b6c 0000 0000.
 MII PHY 2 at #3 transceiver registers:
   0000 0024 0000 0000 01e0 45e1 0003 0800
   0000 0000 0000 0000 0000 0000 0000 0000
   0600 c611 0000 4000 0000 0000 0000 0000
   0000 0200 0000 0000 0000 0b6c 0000 0000.
 MII PHY 3 at #4 transceiver registers:
   0000 0024 0000 0000 01e0 45e1 0003 0800
   0000 0000 0000 0000 0000 0000 0000 0000
   0600 c611 0000 4000 0000 0000 0000 0000
   0000 0200 0000 0000 0000 0b6c 0000 0000.

And doing a RedHat 7.1 anaconda-based bootup of the system gives
a perfectly happy initialization.

The relevant EEPROM values are:

0x000d: 0010
0x0013: 0184
0x0015: 0005

These are sane values.  And sane behavior results.  Here at MIT we are
replacing our install floppies, and using the modified vortex-diag to set
sane values.

QUESTION:  Does anyone see the need to do further refinement of
the 3c59x driver to compensate for some fringe code with some fringe
compile-time kludge setting insane values?

ANSWER: I do NOT see such a need.

I will follow up to the EtherBoot folks to ask that they put 
a big red warning on that option:

BREAKS PXE Boots.
BREAKS other 3c90x and 3c59x drivers.  They, not we need to make some change.

Much thanks to EVERYONE for all the help in understanding this.

-wdc