aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2008-06-07 22:58:32 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2008-06-07 22:58:32 +0000
commitcf99524aed1c1d4937c428031757087a45b3d2bd (patch)
tree598b565eb8eff8ec4321f409588d85735bc4b385 /sys/dev/mii
parent7d8ccad7974ffae9eedf6ea43175d558d345a124 (diff)
Notes
Diffstat (limited to 'sys/dev/mii')
-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 9945fb284d24..d506042f0e3d 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);