mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
- Move ether_ifdetach earlier.
- Drain callouts after ether_ifdetach. Suggested by: jhb
This commit is contained in:
parent
74572e9e63
commit
aec9f8e993
1 changed files with 7 additions and 2 deletions
|
|
@ -394,6 +394,13 @@ smc_detach(device_t dev)
|
|||
smc_stop(sc);
|
||||
SMC_UNLOCK(sc);
|
||||
|
||||
if (sc->smc_ifp != NULL) {
|
||||
ether_ifdetach(sc->smc_ifp);
|
||||
}
|
||||
|
||||
callout_drain(&sc->smc_watchdog);
|
||||
callout_drain(&sc->smc_mii_tick_ch);
|
||||
|
||||
#ifdef DEVICE_POLLING
|
||||
if (sc->smc_ifp->if_capenable & IFCAP_POLLING)
|
||||
ether_poll_deregister(sc->smc_ifp);
|
||||
|
|
@ -409,10 +416,8 @@ smc_detach(device_t dev)
|
|||
taskqueue_free(sc->smc_tq);
|
||||
sc->smc_tq = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (sc->smc_ifp != NULL) {
|
||||
ether_ifdetach(sc->smc_ifp);
|
||||
if_free(sc->smc_ifp);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue