diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-08-29 22:59:57 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-08-29 22:59:57 +0000 |
commit | 58f9744824c971305e5a3c4611723d53c263b37f (patch) | |
tree | a9216e13a90ab94d4c15a28ff6aa23052b906866 /sys | |
parent | 51982332f2bf6626c6d3a5db5d22e389c9bdf17c (diff) |
Take the PHY out of power down while attaching just before probing for
PHY. This helps with systems dual booting Windows XP/Vista where the
Windows drivers will put the PHY in power down mode when rebooting.
From FreeBSD
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/re.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index da5c9e49961..635acdad908 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.88 2008/08/28 17:51:09 brad Exp $ */ +/* $OpenBSD: re.c,v 1.89 2008/08/29 22:59:56 brad Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -839,8 +839,9 @@ re_attach(struct rl_softc *sc, const char *intrstr) sc->rl_flags |= RL_FLAG_NOJUMBO; break; case RL_HWREV_8169_8110SB: - case RL_HWREV_8169_8110SCd: case RL_HWREV_8169_8110SBL: + case RL_HWREV_8169_8110SCd: + case RL_HWREV_8169_8110SCe: sc->rl_flags |= RL_FLAG_PHYWAKE; break; default: @@ -1047,6 +1048,12 @@ re_attach(struct rl_softc *sc, const char *intrstr) timeout_set(&sc->timer_handle, re_tick, sc); + /* Take PHY out of power down mode. */ + if (sc->rl_flags & RL_FLAG_PHYWAKE) { + re_gmii_writereg((struct device *)sc, 1, 0x1f, 0); + re_gmii_writereg((struct device *)sc, 1, 0x0e, 0); + } + /* Do MII setup */ sc->sc_mii.mii_ifp = ifp; sc->sc_mii.mii_readreg = re_miibus_readreg; |