mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
MFC: r204222
According to the Linux sungem driver, in case of Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered down the chip so the internal transceiver has to be hardcoded. This is also in line with the AppleGMACEthernet driver, which just doesn't distinguish between internal/external transceiver and MDIO/MDI1 respectively in the first place. Tested by: Andreas Tobler
This commit is contained in:
parent
a130bd42f5
commit
8bf5ec1047
1 changed files with 4 additions and 1 deletions
|
|
@ -297,8 +297,11 @@ gem_attach(struct gem_softc *sc)
|
|||
|
||||
/*
|
||||
* Fall back on an internal PHY if no external PHY was found.
|
||||
* Note that with Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 can't be
|
||||
* trusted when the firmware has powered down the chip.
|
||||
*/
|
||||
if (error != 0 && (v & GEM_MIF_CONFIG_MDI0) != 0) {
|
||||
if (error != 0 &&
|
||||
((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) {
|
||||
v &= ~GEM_MIF_CONFIG_PHY_SEL;
|
||||
GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v);
|
||||
switch (sc->sc_variant) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue