diff options
author | marius <marius@FreeBSD.org> | 2010-02-22 21:01:08 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-02-22 21:01:08 +0000 |
commit | 932d8e0a7f96b2a8772b0dfe08a867b4f5186963 (patch) | |
tree | d007a8248f24123b6dd825c3fcf1e6652ab50316 /sys/dev | |
parent | be2b9d35a54c83c79964d2f1b520fcdbb1592c42 (diff) | |
download | FreeBSD-src-932d8e0a7f96b2a8772b0dfe08a867b4f5186963.zip FreeBSD-src-932d8e0a7f96b2a8772b0dfe08a867b4f5186963.tar.gz |
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
MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/gem/if_gem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index 9456383..7cba6e7 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -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) { |