diff options
author | yongari <yongari@FreeBSD.org> | 2008-12-11 01:26:18 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-12-11 01:26:18 +0000 |
commit | 5bbe456ad75906a1eef534d8cf5c98e5552ae3c8 (patch) | |
tree | 07820321ba398631141310a3231d640b84df49cb /sys/dev/re | |
parent | e65de9d9824d3b5379b9f57139d753a1d566f921 (diff) | |
download | FreeBSD-src-5bbe456ad75906a1eef534d8cf5c98e5552ae3c8.zip FreeBSD-src-5bbe456ad75906a1eef534d8cf5c98e5552ae3c8.tar.gz |
Newer RealTek controllers requires setting stop request bit to
terminate active Tx/Rx operation.
Diffstat (limited to 'sys/dev/re')
-rw-r--r-- | sys/dev/re/if_re.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 687849f..dd2e351 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1244,7 +1244,7 @@ re_attach(device_t dev) case RL_HWREV_8102EL: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | - RL_FLAG_MACSTAT | RL_FLAG_FASTETHER; + RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -1257,7 +1257,8 @@ re_attach(device_t dev) case RL_HWREV_8168CP: case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | - RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT; + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP; /* * These controllers support jumbo frame but it seems * that enabling it requires touching additional magic @@ -2868,7 +2869,12 @@ re_stop(struct rl_softc *sc) callout_stop(&sc->rl_stat_callout); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - CSR_WRITE_1(sc, RL_COMMAND, 0x00); + if ((sc->rl_flags & RL_FLAG_CMDSTOP) != 0) + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_STOPREQ | RL_CMD_TX_ENB | + RL_CMD_RX_ENB); + else + CSR_WRITE_1(sc, RL_COMMAND, 0x00); + DELAY(1000); CSR_WRITE_2(sc, RL_IMR, 0x0000); CSR_WRITE_2(sc, RL_ISR, 0xFFFF); |