diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2008-12-11 00:46:07 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2008-12-11 00:46:07 +0000 |
| commit | b659f1f0fecb430dadc461c9d30405d779269d98 (patch) | |
| tree | a2db4e2a120c580f909b522c8fc848160aa9d1ad /sys/dev | |
| parent | f68bc089f981be056265cf0151ffe8ae8852067c (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/re/if_re.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 6c88352e19b3..687849fbe132 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -756,7 +756,6 @@ re_diag(struct rl_softc *sc) ifp->if_flags |= IFF_PROMISC; sc->rl_testmode = 1; - re_reset(sc); re_init_locked(sc); sc->rl_flags |= RL_FLAG_LINK; if (sc->rl_type == RL_8169) @@ -2091,10 +2090,8 @@ re_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) * XXX check behaviour on receiver stalls. */ - if (status & RL_ISR_SYSTEM_ERR) { - re_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) re_init_locked(sc); - } } } #endif /* DEVICE_POLLING */ @@ -2158,10 +2155,8 @@ re_int_task(void *arg, int npending) RL_ISR_TX_ERR|RL_ISR_TX_DESC_UNAVAIL)) re_txeof(sc); - if (status & RL_ISR_SYSTEM_ERR) { - re_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) re_init_locked(sc); - } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); @@ -2482,6 +2477,9 @@ re_init_locked(struct rl_softc *sc) */ re_stop(sc); + /* Put controller into known state. */ + re_reset(sc); + /* * Enable C+ RX and TX mode, as well as VLAN stripping and * RX checksum offload. We must configure the C+ register |
