diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2010-11-07 11:12:29 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2010-11-07 11:12:29 +0000 |
| commit | 605d4f8b84e727c542eec73fceec034384cb7d5e (patch) | |
| tree | 04556d2ac5cd72e1720ce6cc42639006bff64577 /sys/dev/bm | |
| parent | 3d100f4fe9bc2a19da822d875963a43ba4c5af7c (diff) | |
Notes
Diffstat (limited to 'sys/dev/bm')
| -rw-r--r-- | sys/dev/bm/if_bm.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/bm/if_bm.c b/sys/dev/bm/if_bm.c index c2a43589baf0..ded2b42f6f3f 100644 --- a/sys/dev/bm/if_bm.c +++ b/sys/dev/bm/if_bm.c @@ -594,11 +594,19 @@ bm_attach(device_t dev) /* reset the adapter */ bm_chip_setup(sc); - /* setup MII */ - error = mii_phy_probe(dev, &sc->sc_miibus, bm_ifmedia_upd, - bm_ifmedia_sts); - if (error != 0) - device_printf(dev,"PHY probe failed: %d\n", error); + /* + * Setup MII + * On Apple BMAC controllers, we end up in a weird state of + * partially-completed autonegotiation on boot. So we force + * autonegotation to try again. + */ + error = mii_attach(dev, &sc->sc_miibus, ifp, bm_ifmedia_upd, + bm_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + MIIF_FORCEANEG); + if (error != 0) { + device_printf(dev, "attaching PHYs failed\n"); + return (error); + } sc->sc_mii = device_get_softc(sc->sc_miibus); |
