git: 91badda4a2dd - stable/14 - eqos: Call init earlier
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Jun 2024 08:28:11 UTC
The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=91badda4a2ddf243b654269c0689d748557d2be1 commit 91badda4a2ddf243b654269c0689d748557d2be1 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2023-12-11 10:29:51 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-06-05 08:16:33 +0000 eqos: Call init earlier Call the subclassed IF_EQOS_INIT before trying to read the mac, clocks and reset needs to dealt with before we can read the registers. (cherry picked from commit bd0771390ef532ce0ae3f39350acd540125e5620) --- sys/dev/eqos/if_eqos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 782c8beff98e..7c0335079195 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1119,6 +1119,9 @@ eqos_attach(device_t dev) return (ENXIO); } + if ((error = IF_EQOS_INIT(dev))) + return (error); + sc->dev = dev; ver = RD4(sc, GMAC_MAC_VERSION); userver = (ver & GMAC_MAC_VERSION_USERVER_MASK) >> @@ -1142,10 +1145,6 @@ eqos_attach(device_t dev) sc->hw_feature[2], sc->hw_feature[3]); } - - if ((error = IF_EQOS_INIT(dev))) - return (error); - mtx_init(&sc->lock, "eqos lock", MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->callout, &sc->lock, 0);