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>
This commit is contained in:
parent
390edcc5b9
commit
886ff602f2
@ -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);
|
||||
|
||||
|
@ -887,6 +887,7 @@ struct rl_softc {
|
||||
#define RL_FLAG_CMDSTOP 0x0200
|
||||
#define RL_FLAG_PHY8169 0x0400
|
||||
#define RL_FLAG_PHY8110S 0x0800
|
||||
#define RL_FLAG_WOLRXENB 0x1000
|
||||
#define RL_FLAG_LINK 0x8000
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user