diff options
author | yongari <yongari@FreeBSD.org> | 2009-06-02 00:21:30 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2009-06-02 00:21:30 +0000 |
commit | bd9aa35723b3c462ad559b955f916623cbc2773c (patch) | |
tree | 5e6b87440ffd205a9878e709156575440bed35d8 /sys/dev | |
parent | cab175ca2d15d9e321b35b3dd7a38e3d6a17fa9a (diff) | |
download | FreeBSD-src-bd9aa35723b3c462ad559b955f916623cbc2773c.zip FreeBSD-src-bd9aa35723b3c462ad559b955f916623cbc2773c.tar.gz |
Don't assume page register value is 0 and restore previous page
register after issuing 'powerup'.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mii/e1000phy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/mii/e1000phy.c b/sys/dev/mii/e1000phy.c index 9f9b986..be29926 100644 --- a/sys/dev/mii/e1000phy.c +++ b/sys/dev/mii/e1000phy.c @@ -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); } } |