summaryrefslogtreecommitdiffstats
path: root/sys/dev/hme
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-08-24 20:28:56 +0000
committerjhb <jhb@FreeBSD.org>2005-08-24 20:28:56 +0000
commitb8c91855f1fad4cf48d1ea06a08c873cf7cd3efb (patch)
treed9a1020f6ff46f20c666fa21eb1d96c2e6e3868e /sys/dev/hme
parent3d2323799ff92df1fd22ae171cec967b85e29e2d (diff)
downloadFreeBSD-src-b8c91855f1fad4cf48d1ea06a08c873cf7cd3efb.zip
FreeBSD-src-b8c91855f1fad4cf48d1ea06a08c873cf7cd3efb.tar.gz
- 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
Diffstat (limited to 'sys/dev/hme')
-rw-r--r--sys/dev/hme/if_hme.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c
index 8ed71b1..80237b3 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);
OpenPOWER on IntegriCloud