Subject: Re: tlp driver can't "handle" my board
To: None <port-cobalt@netbsd.org>
From: Chris Johnson <cj.johnson@sun.com>
List: port-cobalt
Date: 07/27/2001 10:30:24
    Our EEPROM does not conform to the DEC tulip spec - a casualty
    of startup engineering proceedures.  Our driver has mods to
    notice the MAC address, and use a ROM surrogate that is compiled
    into the driver.

    Since the driver is GPL'ed, and there may be religous issues
    about looking at its source, here is the configuration info:


/* Known cards that have old-style EEPROMs. */
static struct fixups {
  char *name;
  unsigned char addr0, addr1, addr2;  
  u16 newtable[32];                             /* Max length below. */
} eeprom_fixups[] = {
  {"Cobalt 27", 0, 0x10, 0xE0, {0x1e00, /* 0 == controller #, 1e == offset */
                             0x0000,    /* 0 == high offset, 0 == gap */
                             0x0800, /* Default Autoselect */
                             0x8001, /* 1 leaf, extended type, bogus len */
                             0x0003, /* Type 3 (MII), PHY #0 */
                             0x0400, /* 0 init instr, 4 reset instr */
                             0x0801, /* Set control mode, GP0 output */
                             0x0000, /* Drive GP0 Low (RST is active low)  */
                             0x0800, /* control mode, GP0 input (undriven) */
                             0x0000, /* clear control mode */
                             0x7800, /* 100TX FDX + HDX, 10bT FDX + HDX */
                             0x01e0, /* Advertise all above */
                             0x5000, /* FDX all above */
                             0x1800, /* Set fast TTM in 100bt modes */
                             0x0,    /* PHY cannot be unplugged */
                                        }},
};

    The driver compares the vendor portion of the mac address to
    the 'addr?' fields above, then substitutes the eeprom_fixups
    array for the ROM configuration.

    I expect the BSD driver parses the above structure correctly
    since it conforms to the DEC ROM specification.  It should be
    a simple matter to graft the above into the code base.

    I thought Soren had got all this stuff working years ago.  Did
    the meme get lost?

    cj*