diff options
author | marius <marius@FreeBSD.org> | 2010-10-15 15:00:30 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-10-15 15:00:30 +0000 |
commit | ac757f20ddc830f07633b578212e7bed65957067 (patch) | |
tree | debadee7b9221daaf40bb137a65e66c245f99886 /sys/dev/ed | |
parent | 385153aa98ec9bc0cd0bde471d7b89b6f7304427 (diff) | |
download | FreeBSD-src-ac757f20ddc830f07633b578212e7bed65957067.zip FreeBSD-src-ac757f20ddc830f07633b578212e7bed65957067.tar.gz |
Converted the remainder of the NIC drivers to use the mii_attach()
introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these
are only straight forward conversions though.
Reviewed by: yongari
Diffstat (limited to 'sys/dev/ed')
-rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index b9c1cad..ed8704b 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -578,25 +578,21 @@ ed_pccard_attach(device_t dev) goto bad; if (sc->chip_type == ED_CHIP_TYPE_DL10019 || sc->chip_type == ED_CHIP_TYPE_DL10022) { - /* Probe for an MII bus, but ignore errors. */ + /* Try to attach an MII bus, but ignore errors. */ ed_pccard_dl100xx_mii_reset(sc); - (void)mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd, - ed_ifmedia_sts); + (void)mii_attach(dev, &sc->miibus, sc->ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); } else if (sc->chip_type == ED_CHIP_TYPE_AX88190 || - sc->chip_type == ED_CHIP_TYPE_AX88790) { - if ((error = mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd, - ed_ifmedia_sts)) != 0) { - device_printf(dev, "Missing mii %d!\n", error); + sc->chip_type == ED_CHIP_TYPE_AX88790 || + sc->chip_type == ED_CHIP_TYPE_TC5299J) { + error = mii_attach(dev, &sc->miibus, sc->ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); + if (error != 0) { + device_printf(dev, "attaching PHYs failed\n"); goto bad; } - - } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { - if ((error = mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd, - ed_ifmedia_sts)) != 0) { - device_printf(dev, "Missing mii!\n"); - goto bad; - } - } if (sc->miibus != NULL) { sc->sc_tick = ed_pccard_tick; |