summaryrefslogtreecommitdiffstats
path: root/sys/dev/re
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2008-12-11 02:24:11 +0000
committeryongari <yongari@FreeBSD.org>2008-12-11 02:24:11 +0000
commit73a287aa0ca874c2faef800470bc8d1e04f602cd (patch)
treee93ae94e758c56fa9111323292efd6d27a23957b /sys/dev/re
parentdcd4d48fc86f197f8009505712d96ffb35b8bc97 (diff)
downloadFreeBSD-src-73a287aa0ca874c2faef800470bc8d1e04f602cd.zip
FreeBSD-src-73a287aa0ca874c2faef800470bc8d1e04f602cd.tar.gz
Make WOL work on RTL8168B. This controller seems to require
explicit command to enable Rx MAC prior to entering D3. Tested by: Cyrus Rahman <crahman <> gmail DOT com>
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 8f41278..6709d6d 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -1256,6 +1256,8 @@ re_attach(device_t dev)
break;
case RL_HWREV_8168_SPIN1:
case RL_HWREV_8168_SPIN2:
+ sc->rl_flags |= RL_FLAG_WOLRXENB;
+ /* FALLTHROUGH */
case RL_HWREV_8168_SPIN3:
sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE |
RL_FLAG_MACSTAT;
@@ -3016,6 +3018,9 @@ re_setwol(struct rl_softc *sc)
return;
ifp = sc->rl_ifp;
+ if ((ifp->if_capenable & IFCAP_WOL) != 0 &&
+ (sc->rl_flags & RL_FLAG_WOLRXENB) != 0)
+ CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_RX_ENB);
/* Enable config register write. */
CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
OpenPOWER on IntegriCloud