PERFORCE change 36229 for review

Sam Leffler sam at FreeBSD.org
Fri Aug 15 15:43:59 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=36229

Change 36229 by sam at sam_ebb on 2003/08/15 15:43:48

	DP83815 "short cable fix" for Soekris equipment.  Tested on a variety
	of 4511, 4501, 4521, and 4801 boxes w/o negative effect (but
	wasn't experiencing the problem before so don't know if it actually
	fixes the problem).

Affected files ...

.. //depot/projects/netperf/sys/pci/if_sis.c#6 edit

Differences ...

==== //depot/projects/netperf/sys/pci/if_sis.c#6 (text+ko) ====

@@ -2148,6 +2148,29 @@
 		SIS_CLRBIT(sc, SIS_RX_CFG, SIS_RXCFG_RX_TXPKTS);
 	}
 
+	if (sc->sis_type == SIS_TYPE_83815 &&
+	     IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) {
+		uint32_t reg;
+
+		/*
+		 * Some DP83815s experience problems when used with short
+		 * (< 30m/100ft) Ethernet cables in 100BaseTX mode.  This
+		 * sequence adjusts the DSP's signal attenuation to fix the
+		 * problem.
+		 */
+		CSR_WRITE_4(sc, NS_PHY_PAGE, 0x0001);
+
+		reg = CSR_READ_4(sc, NS_PHY_DSPCFG);
+		CSR_WRITE_4(sc, NS_PHY_DSPCFG, (reg & 0xfff) | 0x1000);
+		DELAY(100);
+		reg = CSR_READ_4(sc, NS_PHY_TDATA);
+		if ((reg & 0x0080) == 0 || (reg & 0xff) >= 0xd8) {
+			CSR_WRITE_4(sc, NS_PHY_TDATA, 0x00e8);
+			SIS_SETBIT(sc, NS_PHY_DSPCFG, 0x20);
+		}
+		CSR_WRITE_4(sc, NS_PHY_PAGE, 0);
+	}
+
 	/*
 	 * Enable interrupts.
 	 */


More information about the p4-projects mailing list