summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/lxtphy.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-06-07 22:58:32 +0000
committermarcel <marcel@FreeBSD.org>2008-06-07 22:58:32 +0000
commit50176cfd31967b8c6e26f64bcd8555187b4a577b (patch)
tree598b565eb8eff8ec4321f409588d85735bc4b385 /sys/dev/mii/lxtphy.c
parent7cc97ffd512dc3393fb06812a6b553e964bcfcf7 (diff)
downloadFreeBSD-src-50176cfd31967b8c6e26f64bcd8555187b4a577b.zip
FreeBSD-src-50176cfd31967b8c6e26f64bcd8555187b4a577b.tar.gz
Add support for the Apple Big Mac (BMAC) Ethernet controller,
found on various Apple G3 models. Submitted by: Nathan Whitehorn
Diffstat (limited to 'sys/dev/mii/lxtphy.c')
-rw-r--r--sys/dev/mii/lxtphy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c
index 9945fb2..d506042 100644
--- a/sys/dev/mii/lxtphy.c
+++ b/sys/dev/mii/lxtphy.c
@@ -139,6 +139,7 @@ lxtphy_attach(device_t dev)
struct mii_softc *sc;
struct mii_attach_args *ma;
struct mii_data *mii;
+ const char *nic;
sc = device_get_softc(dev);
ma = device_get_ivars(dev);
@@ -159,6 +160,15 @@ lxtphy_attach(device_t dev)
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
device_printf(dev, " ");
+ /*
+ * On Apple BMAC controllers, we end up in a weird state
+ * of partially-completed autonegotiation on boot. So
+ * force autonegotation to try again.
+ */
+ nic = device_get_name(device_get_parent(sc->mii_dev));
+ if (strcmp(nic, "bm") == 0)
+ sc->mii_flags |= MIIF_FORCEANEG | MIIF_NOISOLATE;
+
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
MII_MEDIA_100_TX);
OpenPOWER on IntegriCloud