diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2010-10-15 14:52:11 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2010-10-15 14:52:11 +0000 |
| commit | 8e5d93dbb40452863b266a378868255bf986af67 (patch) | |
| tree | 6dd0ca5b178547c1f20c8ce1f607ac42d4afe2ae /sys/dev/bfe | |
| parent | d1457e3703928a249a45a6dd996918bc7eb6ba20 (diff) | |
Notes
Diffstat (limited to 'sys/dev/bfe')
| -rw-r--r-- | sys/dev/bfe/if_bfe.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index 00a2e97e5be3..f384f6de9ee8 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -505,10 +505,11 @@ bfe_attach(device_t dev) bfe_chip_reset(sc); BFE_UNLOCK(sc); - if (mii_phy_probe(dev, &sc->bfe_miibus, - bfe_ifmedia_upd, bfe_ifmedia_sts)) { - device_printf(dev, "MII without any PHY!\n"); - error = ENXIO; + error = mii_attach(dev, &sc->bfe_miibus, ifp, bfe_ifmedia_upd, + bfe_ifmedia_sts, BMSR_DEFCAPMASK, sc->bfe_phyaddr, MII_OFFSET_ANY, + 0); + if (error != 0) { + device_printf(dev, "attaching PHYs failed\n"); goto fail; } @@ -631,8 +632,6 @@ bfe_miibus_readreg(device_t dev, int phy, int reg) u_int32_t ret; sc = device_get_softc(dev); - if (phy != sc->bfe_phyaddr) - return (0); bfe_readphy(sc, reg, &ret); return (ret); @@ -644,8 +643,6 @@ bfe_miibus_writereg(device_t dev, int phy, int reg, int val) struct bfe_softc *sc; sc = device_get_softc(dev); - if (phy != sc->bfe_phyaddr) - return (0); bfe_writephy(sc, reg, val); return (0); |
