diff options
author | gallatin <gallatin@FreeBSD.org> | 2008-01-28 13:20:51 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2008-01-28 13:20:51 +0000 |
commit | 98cf7160125a5700c41b39bf6877702f9912667f (patch) | |
tree | 4527410466ead4d81313cc4616e2310e882aa4fb | |
parent | ce5fec50e4e565038b7bdb6ea20783cc6d4233b6 (diff) | |
download | FreeBSD-src-98cf7160125a5700c41b39bf6877702f9912667f.zip FreeBSD-src-98cf7160125a5700c41b39bf6877702f9912667f.tar.gz |
Only reset driver state when a hardware error is detected.
Preserve warning but do not reset if we enter the routine
without seeing a hardware error.
-rw-r--r-- | sys/dev/mxge/if_mxge.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index c828828..24ca729 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -3436,6 +3436,11 @@ mxge_watchdog_reset(mxge_softc_t *sc) /* and redo any changes we made to our config space */ mxge_setup_cfg_space(sc); + + if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) { + mxge_close(sc); + err = mxge_open(sc); + } } else { device_printf(sc->dev, "NIC did not reboot, ring state:\n"); device_printf(sc->dev, "tx.req=%d tx.done=%d\n", @@ -3443,11 +3448,7 @@ mxge_watchdog_reset(mxge_softc_t *sc) device_printf(sc->dev, "pkt_done=%d fw=%d\n", sc->ss->tx.pkt_done, be32toh(sc->ss->fw_stats->send_done_count)); - } - - if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); - err = mxge_open(sc); + device_printf(sc->dev, "not resetting\n"); } abort: |