Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2009 00:21:31 +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: r193289 - head/sys/dev/mii
Message-ID:  <200906020021.n520LVHR097034@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Tue Jun  2 00:21:30 2009
New Revision: 193289
URL: http://svn.freebsd.org/changeset/base/193289

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

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

Modified: head/sys/dev/mii/e1000phy.c
==============================================================================
--- head/sys/dev/mii/e1000phy.c	Tue Jun  2 00:06:39 2009	(r193288)
+++ head/sys/dev/mii/e1000phy.c	Tue Jun  2 00:21:30 2009	(r193289)
@@ -239,11 +239,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?200906020021.n520LVHR097034>