svn commit: r187074 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/mii

Pyun YongHyeon yongari at FreeBSD.org
Sun Jan 11 18:44:26 PST 2009


Author: yongari
Date: Mon Jan 12 02:44:23 2009
New Revision: 187074
URL: http://svn.freebsd.org/changeset/base/187074

Log:
  MFC r183493:
    Save extended address register prior to switching to 1000BASE-X
    only mode and restore original value of extended address register
    instead of overwriting it with page 1. There are still instance
    information passing issue(e.g configured media type: fiber or
    copper) from driver to PHY layer but this change make the selected
    PHY work with 88E1112 PHY.
  
    Reported by:  Krzysztof Jedruczyk < beaker <at> hot dot pl >
    Tested by:    Krzysztof Jedruczyk < beaker <at> hot dot pl >

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/mii/e1000phy.c

Modified: stable/7/sys/dev/mii/e1000phy.c
==============================================================================
--- stable/7/sys/dev/mii/e1000phy.c	Mon Jan 12 02:31:22 2009	(r187073)
+++ stable/7/sys/dev/mii/e1000phy.c	Mon Jan 12 02:44:23 2009	(r187074)
@@ -223,7 +223,7 @@ static void
 e1000phy_reset(struct mii_softc *sc)
 {
 	struct e1000phy_softc *esc;
-	uint16_t reg;
+	uint16_t reg, page;
 
 	esc = (struct e1000phy_softc *)sc;
 	reg = PHY_READ(sc, E1000_SCR);
@@ -232,12 +232,13 @@ e1000phy_reset(struct mii_softc *sc)
 		PHY_WRITE(sc, E1000_SCR, reg);
 		if (esc->mii_model == MII_MODEL_MARVELL_E1112) {
 			/* Select 1000BASE-X only mode. */
+			page = PHY_READ(sc, E1000_EADR);
 			PHY_WRITE(sc, E1000_EADR, 2);
 			reg = PHY_READ(sc, E1000_SCR);
 			reg &= ~E1000_SCR_MODE_MASK;
 			reg |= E1000_SCR_MODE_1000BX;
 			PHY_WRITE(sc, E1000_SCR, reg);
-			PHY_WRITE(sc, E1000_EADR, 1);
+			PHY_WRITE(sc, E1000_EADR, page);
 		}
 	} else {
 		switch (esc->mii_model) {


More information about the svn-src-all mailing list