aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJiahao LI <jiahali@blackberry.com>2022-09-08 15:50:37 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2022-09-09 15:31:26 +0000
commit6501fcdc0a97faa3c59f6ece314bf7754303db6f (patch)
treedb1c017566425ce8cf8a89f6da3c9dc216803a32 /sys/dev
parent87705c5c21784c401a8d425b2780bb8b1c37d431 (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/dwc/if_dwc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c
index 5ec115f7081b..5fc735fdd5f1 100644
--- a/sys/dev/dwc/if_dwc.c
+++ b/sys/dev/dwc/if_dwc.c
@@ -1166,6 +1166,12 @@ dwc_init_locked(struct dwc_softc *sc)
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING)
return;
+ /*
+ * Call mii_mediachg() which will call back into dwc_miibus_statchg()
+ * to set up the remaining config registers based on current media.
+ */
+ mii_mediachg(sc->mii_softc);
+
dwc_setup_rxfilter(sc);
dwc_setup_core(sc);
dwc_enable_mac(sc, true);
@@ -1174,11 +1180,6 @@ dwc_init_locked(struct dwc_softc *sc)
if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE);
- /*
- * Call mii_mediachg() which will call back into dwc_miibus_statchg()
- * to set up the remaining config registers based on current media.
- */
- mii_mediachg(sc->mii_softc);
callout_reset(&sc->dwc_callout, hz, dwc_tick, sc);
}