summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed/if_ed_pccard.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ed/if_ed_pccard.c')
-rw-r--r--sys/dev/ed/if_ed_pccard.c26
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;
OpenPOWER on IntegriCloud