Short Cable receive errors on the DP83815 ethernet controller.

A small number of the DP83815 ethernet controller chips will, when using short cables lengths (<30m/100ft) in 100Base-TX mode, have excessive receive errors, or if the cable is very short, not receive at all. The Activity LED will usually also flicker or be on constant. This is an issue with the physical interface in the DP83815 controller chip, but can be fixed by including code in the software driver to check if it happens, and if it does, change a parameter in the chip to handle the issue.

The check has to be done every time the chip's physical interface is reset and a 100base-TX link is detected, so the code will needed to be added at the right point the the drivers physical layer handling code.

On the download page is the newest Linux driver from National Semiconductor that include the fix. The added code in that driver is this:

    // Add by Bruce to do the PHY coefficient check
    if( !(phy_status & DP_PHYSTS_SPEED_10)){
	    DP_REG32_WRITE(DP_PHY_PAGE, DP_PHY_PAGE_VAL);
	    tmpVal = DP_REG32_READ(DP_PHY_DSPCFG);
	    tmpVal &= 0xFFF;
	    DP_REG32_WRITE(DP_PHY_DSPCFG,(tmpVal | 0x1000));
	    udelay(100);
	    tmpVal = DP_REG32_READ(DP_PHY_TDATA);
	    tmpVal &= 0x00FF;
	    if( !(tmpVal &0x0080) || ((tmpVal >=0x00D8)&&(tmpVal <= 0x00FF))){
		    DP_REG32_WRITE(DP_PHY_TDATA,0x00E8);
		    tmpVal = DP_REG32_READ(DP_PHY_DSPCFG);
		    DP_REG32_WRITE(DP_PHY_DSPCFG,(tmpVal | 0x0020));
	    }
    	    DP_REG32_WRITE(DP_PHY_PAGE,0);
    }

All DP83815 drivers should be updated to include the equivalent of the above code.