From 886ff602f210dbdc80f748cc6e9991917c90eae5 Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Thu, 11 Dec 2008 02:24:11 +0000 Subject: Make WOL work on RTL8168B. This controller seems to require explicit command to enable Rx MAC prior to entering D3. Tested by: Cyrus Rahman gmail DOT com> --- sys/dev/re/if_re.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/dev') diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 8f41278ffddb..6709d6d790b9 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); -- cgit v1.3