diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-11-07 18:26:38 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-11-07 18:26:38 +0000 |
| commit | 18707510b7320d4be126b33b3f98f14982a7bdd7 (patch) | |
| tree | c7465a7e28d259e5a287194f79b778d294c5e347 /sys/dev/ti | |
| parent | bb6ebb6af8a73d854664d6905265352409c4472a (diff) | |
Notes
Diffstat (limited to 'sys/dev/ti')
| -rw-r--r-- | sys/dev/ti/if_ti.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index aeaacff298fb..f01b63853cbf 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -3091,6 +3091,9 @@ ti_init_locked(void *xsc) { struct ti_softc *sc = xsc; + if (sc->ti_ifp->if_drv_flags & IFF_DRV_RUNNING) + return; + /* Cancel pending I/O and flush buffers. */ ti_stop(sc); @@ -3369,7 +3372,10 @@ ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = EINVAL; else { ifp->if_mtu = ifr->ifr_mtu; - ti_init_locked(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ti_init_locked(sc); + } } TI_UNLOCK(sc); break; @@ -3783,7 +3789,7 @@ ti_watchdog(void *arg) ifp = sc->ti_ifp; if_printf(ifp, "watchdog timeout -- resetting\n"); - ti_stop(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ti_init_locked(sc); ifp->if_oerrors++; |
