diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-03-10 09:53:17 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-03-10 09:53:17 +0000 |
commit | 690c061d00d50cbdf776fe95e1e212ed2aae8abe (patch) | |
tree | c8462f33a66460e42d628cefb79ecbadb9cd83ca | |
parent | 102731236ca27954eeea1fe11ffd97ddbf90e9f8 (diff) |
Last revision apparently does not work when cold booting so revert.
Noticed by otto@
-rw-r--r-- | sys/dev/mii/ciphy.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c index a2db45be974..439916812cf 100644 --- a/sys/dev/mii/ciphy.c +++ b/sys/dev/mii/ciphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciphy.c,v 1.12 2006/03/10 08:12:20 jsg Exp $ */ +/* $OpenBSD: ciphy.c,v 1.13 2006/03/10 09:53:16 jsg Exp $ */ /* $FreeBSD: ciphy.c,v 1.1 2004/09/10 20:57:45 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -315,24 +315,18 @@ ciphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; } -#define PHY_SETBIT(x, y, z) \ - PHY_WRITE(x, y, (PHY_READ(x, y) | (z))) -#define PHY_CLRBIT(x, y, z) \ - PHY_WRITE(x, y, (PHY_READ(x, y) & ~(z))) - void ciphy_reset(struct mii_softc *sc) { mii_phy_reset(sc); DELAY(1000); - - if (strcmp(sc->mii_dev.dv_parent->dv_cfdata->cf_driver->cd_name, "nfe") == 0) { - /* need to set for 2.5V RGMII for NVIDIA adapters */ - PHY_SETBIT(sc, CIPHY_MII_ECTL1, CIPHY_INTSEL_RGMII); - PHY_SETBIT(sc, CIPHY_MII_ECTL1, CIPHY_IOVOL_2500MV); - } } +#define PHY_SETBIT(x, y, z) \ + PHY_WRITE(x, y, (PHY_READ(x, y) | (z))) +#define PHY_CLRBIT(x, y, z) \ + PHY_WRITE(x, y, (PHY_READ(x, y) & ~(z))) + void ciphy_fixup(struct mii_softc *sc) { @@ -343,6 +337,12 @@ ciphy_fixup(struct mii_softc *sc) status = PHY_READ(sc, CIPHY_MII_AUXCSR); speed = status & CIPHY_AUXCSR_SPEED; + if (strcmp(sc->mii_dev.dv_parent->dv_cfdata->cf_driver->cd_name, "nfe") == 0) { + /* need to set for 2.5V RGMII for NVIDIA adapters */ + PHY_SETBIT(sc, CIPHY_MII_ECTL1, CIPHY_INTSEL_RGMII); + PHY_SETBIT(sc, CIPHY_MII_ECTL1, CIPHY_IOVOL_2500MV); + } + switch (model) { case MII_MODEL_CICADA_CS8201: |