mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
bge_attach() can fail before attaching mii(4). So make sure to check
bge_miibus before detaching mii(4).
This commit is contained in:
parent
70fabd840d
commit
0aba72dd91
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245870
@ -3899,9 +3899,9 @@ bge_detach(device_t dev)
|
||||
if (sc->bge_tq)
|
||||
taskqueue_drain(sc->bge_tq, &sc->bge_intr_task);
|
||||
|
||||
if (sc->bge_flags & BGE_FLAG_TBI) {
|
||||
if (sc->bge_flags & BGE_FLAG_TBI)
|
||||
ifmedia_removeall(&sc->bge_ifmedia);
|
||||
} else {
|
||||
else if (sc->bge_miibus != NULL) {
|
||||
bus_generic_detach(dev);
|
||||
device_delete_child(dev, sc->bge_miibus);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user