Subject: kern/20638: DP83815 driver probably needs patch released by Nat. Semiconductor
To: None <>
From: seebs <>
List: netbsd-bugs
Date: 03/09/2003 08:40:19
>Number:         20638
>Category:       kern
>Synopsis:       Nat. Semiconductor released a patch for the 83815 driver for linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 09 08:41:03 PST 2003
>Originator:     seebs
>Release:        NetBSD 1.6P
System: NetBSD 1.6P NetBSD 1.6P (VASH) #1: Fri Feb 28 22:14:13 CST 2003 i386
Architecture: i386
Machine: i386
	There's a National Semiconductor patch for the Linux 83815 driver
	(sip(4) in NetBSD) which we may or may not need; I can't find any
	of the magic numbers from it in sip(4), so we probably need it.

	Poke around, and find out that some of their boards are


	gives the following patch, written against the linux driver:

    // Add by Bruce to do the PHY coefficient check
    if( !(phy_status & DP_PHYSTS_SPEED_10)){
	    tmpVal = DP_REG32_READ(DP_PHY_DSPCFG);
	    tmpVal &= 0xFFF;
	    DP_REG32_WRITE(DP_PHY_DSPCFG,(tmpVal | 0x1000));
	    tmpVal = DP_REG32_READ(DP_PHY_TDATA);
	    tmpVal &= 0x00FF;
	    if( !(tmpVal &0x0080) || ((tmpVal >=0x00D8)&&(tmpVal <= 0x00FF))){
		    tmpVal = DP_REG32_READ(DP_PHY_DSPCFG);
		    DP_REG32_WRITE(DP_PHY_DSPCFG,(tmpVal | 0x0020));
	Of course, this doesn't say *when* to do the check, but the site
	says "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."

I don't understand the driver enough to say where this should go; I'm just
passing it on.  :)