diff options
author | yongari <yongari@FreeBSD.org> | 2008-10-25 02:52:06 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-10-25 02:52:06 +0000 |
commit | 33ba86e90cd1ef590f59811b94d51775765eaadc (patch) | |
tree | 052e3f3f37b6efa28d499840d1d987023b593708 /sys/pci/if_rl.c | |
parent | 1b612ce28ee4ea3ef3bb4da8e2c6b72471420bf1 (diff) | |
download | FreeBSD-src-33ba86e90cd1ef590f59811b94d51775765eaadc.zip FreeBSD-src-33ba86e90cd1ef590f59811b94d51775765eaadc.tar.gz |
Make rl_init_locked() call rl_reset. This will put hardware into
sane state after resume/watchdog timeouts.
Diffstat (limited to 'sys/pci/if_rl.c')
-rw-r--r-- | sys/pci/if_rl.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 3adf1bb..19005e0 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1342,7 +1342,6 @@ rl_txeof(struct rl_softc *sc) CSR_WRITE_4(sc, RL_TXCFG, RL_TXCFG_CONFIG); oldthresh = sc->rl_txthresh; /* error recovery */ - rl_reset(sc); rl_init_locked(sc); /* restore original threshold */ sc->rl_txthresh = oldthresh; @@ -1409,10 +1408,8 @@ rl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) /* XXX We should check behaviour on receiver stalls. */ - if (status & RL_ISR_SYSTEM_ERR) { - rl_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) rl_init_locked(sc); - } } } #endif /* DEVICE_POLLING */ @@ -1449,10 +1446,8 @@ rl_intr(void *arg) rl_rxeof(sc); if ((status & RL_ISR_TX_OK) || (status & RL_ISR_TX_ERR)) rl_txeof(sc); - if (status & RL_ISR_SYSTEM_ERR) { - rl_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) rl_init_locked(sc); - } } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) @@ -1615,6 +1610,8 @@ rl_init_locked(struct rl_softc *sc) */ rl_stop(sc); + rl_reset(sc); + /* * Init our MAC address. Even though the chipset * documentation doesn't mention it, we need to enter "Config |