diff options
author | John Baldwin <jhb@FreeBSD.org> | 2005-08-24 20:28:56 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2005-08-24 20:28:56 +0000 |
commit | 00d101cf1f2e6ee9fe12acf1fe74818acdd59ccb (patch) | |
tree | d9a1020f6ff46f20c666fa21eb1d96c2e6e3868e /sys/dev/hme/if_hme.c | |
parent | a9ed1f7ffc8c68fc466fd5051a24930c553872a7 (diff) | |
download | src-00d101cf1f2e6ee9fe12acf1fe74818acdd59ccb.tar.gz src-00d101cf1f2e6ee9fe12acf1fe74818acdd59ccb.zip |
- Remove redundant assertions that the driver lock is not held in attach()
and detach() since mtx_lock() will assert that already since the driver
lock is not recursive.
- Move the call to callout_init_mtx() before hme_stop() so that the
callout_stop() in hme_stop() doesn't operate on an uninitialized callout
structure during attach.
Reported by: yongari (2)
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=149438
Diffstat (limited to 'sys/dev/hme/if_hme.c')
-rw-r--r-- | sys/dev/hme/if_hme.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c index 8ed71b164008..80237b37c59b 100644 --- a/sys/dev/hme/if_hme.c +++ b/sys/dev/hme/if_hme.c @@ -199,14 +199,13 @@ hme_config(struct hme_softc *sc) * */ - HME_LOCK_ASSERT(sc, MA_NOTOWNED); + callout_init_mtx(&sc->sc_tick_ch, &sc->sc_lock, 0); + /* Make sure the chip is stopped. */ HME_LOCK(sc); hme_stop(sc); HME_UNLOCK(sc); - callout_init_mtx(&sc->sc_tick_ch, &sc->sc_lock, 0); - /* * Allocate DMA capable memory * Buffer descriptors must be aligned on a 2048 byte boundary; @@ -381,8 +380,6 @@ hme_detach(struct hme_softc *sc) struct ifnet *ifp = sc->sc_ifp; int i; - HME_LOCK_ASSERT(sc, MA_NOTOWNED); - ether_ifdetach(ifp); if_free(ifp); HME_LOCK(sc); |