Date: Fri, 15 Aug 2003 15:43:57 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 36229 for review Message-ID: <200308152243.h7FMhv9w096978@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=36229 Change 36229 by sam@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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308152243.h7FMhv9w096978>