summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/xl/if_xl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c
index 6623551..d8ea2c4 100644
--- a/sys/dev/xl/if_xl.c
+++ b/sys/dev/xl/if_xl.c
@@ -1635,7 +1635,6 @@ xl_detach(device_t dev)
/* These should only be active if attach succeeded */
if (device_is_attached(dev)) {
XL_LOCK(sc);
- xl_reset(sc);
xl_stop(sc);
XL_UNLOCK(sc);
taskqueue_drain(taskqueue_swi, &sc->xl_task);
@@ -2246,7 +2245,6 @@ xl_intr(void *arg)
}
if (status & XL_STAT_ADFAIL) {
- xl_reset(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
}
@@ -2318,7 +2316,6 @@ xl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count)
}
if (status & XL_STAT_ADFAIL) {
- xl_reset(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
}
@@ -2754,6 +2751,9 @@ xl_init_locked(struct xl_softc *sc)
*/
xl_stop(sc);
+ /* Reset the chip to a known state. */
+ xl_reset(sc);
+
if (sc->xl_miibus == NULL) {
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_RESET);
xl_wait(sc);
@@ -3236,7 +3236,6 @@ xl_watchdog(struct xl_softc *sc)
device_printf(sc->xl_dev,
"no carrier - transceiver cable problem?\n");
- xl_reset(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
@@ -3335,7 +3334,6 @@ xl_shutdown(device_t dev)
sc = device_get_softc(dev);
XL_LOCK(sc);
- xl_reset(sc);
xl_stop(sc);
XL_UNLOCK(sc);
@@ -3367,7 +3365,6 @@ xl_resume(device_t dev)
XL_LOCK(sc);
- xl_reset(sc);
if (ifp->if_flags & IFF_UP) {
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
OpenPOWER on IntegriCloud