Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2009 02:05:00 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192711 - head/sys/dev/mii
Message-ID:  <200905250205.n4P250JE007350@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon May 25 02:05:00 2009
New Revision: 192711
URL: http://svn.freebsd.org/changeset/base/192711

Log:
  Do not ignore NEXT Page capability of auto-negotiation
  advertisement register. Some PHYs such as 88E3016 requires NEXT
  Page capability to establish valid link. Also set protocol selector
  field which is read only but it makes the intention clearer.

Modified:
  head/sys/dev/mii/e1000phy.c

Modified: head/sys/dev/mii/e1000phy.c
==============================================================================
--- head/sys/dev/mii/e1000phy.c	Mon May 25 01:56:19 2009	(r192710)
+++ head/sys/dev/mii/e1000phy.c	Mon May 25 02:05:00 2009	(r192711)
@@ -490,13 +490,16 @@ static int
 e1000phy_mii_phy_auto(struct e1000phy_softc *esc)
 {
 	struct mii_softc *sc;
+	uint16_t reg;
 
 	sc = &esc->mii_sc;
-	if ((sc->mii_flags & MIIF_HAVEFIBER) == 0)
-		PHY_WRITE(sc, E1000_AR, E1000_AR_10T | E1000_AR_10T_FD |
+	if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) {
+		reg = PHY_READ(sc, E1000_AR);
+		reg |= E1000_AR_10T | E1000_AR_10T_FD |
 		    E1000_AR_100TX | E1000_AR_100TX_FD |
-		    E1000_AR_PAUSE | E1000_AR_ASM_DIR);
-	else
+		    E1000_AR_PAUSE | E1000_AR_ASM_DIR;
+		PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD);
+	} else
 		PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X |
 		    E1000_FA_SYM_PAUSE | E1000_FA_ASYM_PAUSE);
 	if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905250205.n4P250JE007350>