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.
This commit is contained in:
Andrew Gallatin 2008-01-28 13:20:51 +00:00
parent 3ca1bceea5
commit 10882804c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175757

View file

@ -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: