summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-10-15 15:00:30 +0000
committermarius <marius@FreeBSD.org>2010-10-15 15:00:30 +0000
commitac757f20ddc830f07633b578212e7bed65957067 (patch)
treedebadee7b9221daaf40bb137a65e66c245f99886 /sys/mips
parent385153aa98ec9bc0cd0bde471d7b89b6f7304427 (diff)
downloadFreeBSD-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/mips')
-rw-r--r--sys/mips/atheros/if_arge.c9
-rw-r--r--sys/mips/idt/if_kr.c8
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c
index 39e377c..a12ace8 100644
--- a/sys/mips/atheros/if_arge.c
+++ b/sys/mips/atheros/if_arge.c
@@ -424,10 +424,11 @@ arge_attach(device_t dev)
if (phys_total == 1) {
/* Do MII setup. */
- if (mii_phy_probe(dev, &sc->arge_miibus,
- arge_ifmedia_upd, arge_ifmedia_sts)) {
- device_printf(dev, "MII without any phy!\n");
- error = ENXIO;
+ error = mii_attach(dev, &sc->arge_miibus, ifp,
+ arge_ifmedia_upd, arge_ifmedia_sts, BMSR_DEFCAPMASK,
+ MII_PHY_ANY, MII_OFFSET_ANY, 0);
+ if (error != 0) {
+ device_printf(dev, "attaching PHYs failed\n");
goto fail;
}
}
diff --git a/sys/mips/idt/if_kr.c b/sys/mips/idt/if_kr.c
index bbc800f..edba950 100644
--- a/sys/mips/idt/if_kr.c
+++ b/sys/mips/idt/if_kr.c
@@ -265,10 +265,10 @@ kr_attach(device_t dev)
CSR_WRITE_4(sc, KR_MIIMCFG, 0);
/* Do MII setup. */
- if (mii_phy_probe(dev, &sc->kr_miibus,
- kr_ifmedia_upd, kr_ifmedia_sts)) {
- device_printf(dev, "MII without any phy!\n");
- error = ENXIO;
+ error = mii_attach(dev, &sc->kr_miibus, ifp, kr_ifmedia_upd,
+ kr_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+ if (error != 0) {
+ device_printf(dev, "attaching PHYs failed\n");
goto fail;
}
OpenPOWER on IntegriCloud