mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 18:56:38 +00:00
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.
This commit is contained in:
parent
22029445cb
commit
bd0771390e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue