- 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
This commit is contained in:
parent
a9ed1f7ffc
commit
00d101cf1f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user