diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2009-06-24 19:04:08 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2009-06-24 19:04:08 +0000 |
| commit | b3a1f860faa89227a5b333afbb92b354542d4fba (patch) | |
| tree | dfe6aaed33d61a981026fe9d2c70e8bb5b0df6da /sys/dev/gem | |
| parent | 2dd43ecaec2f6dcc556a1d88c59dfb46d231b9cc (diff) | |
Notes
Diffstat (limited to 'sys/dev/gem')
| -rw-r--r-- | sys/dev/gem/if_gem.c | 8 | ||||
| -rw-r--r-- | sys/dev/gem/if_gemvar.h | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index 6361519e217af..86c9334558b02 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -403,15 +403,14 @@ gem_detach(struct gem_softc *sc) struct ifnet *ifp = sc->sc_ifp; int i; + ether_ifdetach(ifp); GEM_LOCK(sc); - sc->sc_flags |= GEM_DYING; gem_stop(ifp, 1); GEM_UNLOCK(sc); callout_drain(&sc->sc_tick_ch); #ifdef GEM_RINT_TIMEOUT callout_drain(&sc->sc_rx_ch); #endif - ether_ifdetach(ifp); if_free(ifp); device_delete_child(sc->sc_dev, sc->sc_miibus); @@ -2107,11 +2106,6 @@ gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFFLAGS: GEM_LOCK(sc); - if ((sc->sc_flags & GEM_DYING) != 0) { - error = EINVAL; - GEM_UNLOCK(sc); - break; - } if ((ifp->if_flags & IFF_UP) != 0) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && ((ifp->if_flags ^ sc->sc_ifflags) & diff --git a/sys/dev/gem/if_gemvar.h b/sys/dev/gem/if_gemvar.h index 48e3299ca41e8..ab5b2f6ea7f7d 100644 --- a/sys/dev/gem/if_gemvar.h +++ b/sys/dev/gem/if_gemvar.h @@ -141,11 +141,10 @@ struct gem_softc { u_int sc_flags; #define GEM_INITED (1 << 0) /* reset persistent regs init'ed */ -#define GEM_DYING (1 << 1) /* detach initiated */ -#define GEM_LINK (1 << 2) /* link is up */ -#define GEM_PCI (1 << 3) /* PCI busses are little-endian */ -#define GEM_PCI66 (1 << 4) /* PCI bus runs at 66MHz */ -#define GEM_SERDES (1 << 5) /* use the SERDES */ +#define GEM_LINK (1 << 1) /* link is up */ +#define GEM_PCI (1 << 2) /* PCI busses are little-endian */ +#define GEM_PCI66 (1 << 3) /* PCI bus runs at 66MHz */ +#define GEM_SERDES (1 << 4) /* use the SERDES */ /* * ring buffer DMA stuff |
