Subject: problem with tlp1 autosense
To: cobalt <>
From: Byron Servies <>
List: port-cobalt
Date: 09/30/2004 22:30:20
Hi there!

For some time I have been wondering about performance of my internal 
network, which is connected to my qube2's "primary" port, or tlp1.  I 
work in the former Cobalt division, and was talking to one of the 
original engineers and he had me dump ifconfig:

         address: 00:10:e0:00:3d:71
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet netmask 0xffff0000 broadcast
         address: 00:10:e0:00:3d:8c
         media: Ethernet autoselect (10baseT)
         status: active
         inet netmask 0xffffff00 broadcast

Clearly, tlp1 is not negotiating 100base TX full duplex correctly.   In 
the Linux 2.0.x kernel we modified the tulip driver (cobalttulip_raq.c) 
to re-initialize the SROM connected to the 2 interfaces in order to 
turn on auto-negotiation; it was apparently programs incorrectly in 
hardware.  This is, apparently, a common problem with many tulip 
implementations.  This applies to all the MIPS Cobalt products.

The tlp quirks handlers for cobalt, in if_tlp_pci.c, apparently needs 
to be updated to set the information:

/* Known cards that have old-style EEPROMs. */
static struct fixups {
   char *name;
   unsigned char addr0, addr1, addr2;
   u16 newtable[32];
} eeprom_fixups[] = {
   // Super big hack... we don't have a registered MAC address yet. TJS
   // Add 100Mbps here too...
   {"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 */

Has anybody tried this?  Or otherwise gotten 100 Mb on both interfaces?