diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2010-08-24 18:40:11 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2010-08-24 18:40:11 +0000 |
| commit | 9fb40e0a9bd92a4172e795ce8fc5e0f92c059c62 (patch) | |
| tree | df5d8c56f9d63631a1152b2d499ecc217a0a7ab0 /sys/dev/vr | |
| parent | 7c45b436513c95aed381f020853dc93351ee2f7b (diff) | |
Notes
Diffstat (limited to 'sys/dev/vr')
| -rw-r--r-- | sys/dev/vr/if_vr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 954024d7f92a..21a74a5dd836 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1560,6 +1560,7 @@ vr_tick(void *xsc) sc->vr_stat.num_restart++; vr_stop(sc); vr_reset(sc); + sc->vr_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); sc->vr_flags &= ~VR_F_RESTART; } @@ -2016,6 +2017,9 @@ vr_init_locked(struct vr_softc *sc) ifp = sc->vr_ifp; mii = device_get_softc(sc->vr_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* Cancel pending I/O and free all RX/TX buffers. */ vr_stop(sc); vr_reset(sc); @@ -2287,6 +2291,7 @@ vr_watchdog(struct vr_softc *sc) if_printf(sc->vr_ifp, "watchdog timeout " "(missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); return; } @@ -2296,6 +2301,7 @@ vr_watchdog(struct vr_softc *sc) vr_stop(sc); vr_reset(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) |
