Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2009 04:55:05 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r194416 - in stable/7/sys: . contrib/pf dev/mii
Message-ID:  <200906180455.n5I4t5Q4098201@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Thu Jun 18 04:55:04 2009
New Revision: 194416
URL: http://svn.freebsd.org/changeset/base/194416

Log:
  MFC r193289:
    Don't assume page register value is 0 and restore previous page
    register after issuing 'powerup'.

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

Modified: stable/7/sys/dev/mii/e1000phy.c
==============================================================================
--- stable/7/sys/dev/mii/e1000phy.c	Thu Jun 18 04:51:07 2009	(r194415)
+++ stable/7/sys/dev/mii/e1000phy.c	Thu Jun 18 04:55:04 2009	(r194416)
@@ -238,11 +238,13 @@ e1000phy_reset(struct mii_softc *sc)
 		PHY_WRITE(sc, E1000_SCR, reg);
 
 		if (esc->mii_model == MII_MODEL_MARVELL_E1116) {
+			page = PHY_READ(sc, E1000_EADR);
+			/* Select page 2, MAC specific control register. */
 			PHY_WRITE(sc, E1000_EADR, 2);
 			reg = PHY_READ(sc, E1000_SCR);
 			reg |= E1000_SCR_RGMII_POWER_UP;
 			PHY_WRITE(sc, E1000_SCR, reg);
-			PHY_WRITE(sc, E1000_EADR, 0);
+			PHY_WRITE(sc, E1000_EADR, page);
 		}
 	}
 



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