summaryrefslogtreecommitdiffstats
path: root/sys/dev/bce
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/dev/bce
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/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 9d098cc..2d38b8e 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -1140,12 +1140,13 @@ bce_attach(device_t dev)
/* Handle any special PHY initialization for SerDes PHYs. */
bce_init_media(sc);
- /* MII child bus by probing the PHY. */
- if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd,
- bce_ifmedia_sts)) {
- BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n",
- __FILE__, __LINE__);
- rc = ENXIO;
+ /* MII child bus by attaching the PHY. */
+ rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd,
+ bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr,
+ MII_OFFSET_ANY, 0);
+ if (rc != 0) {
+ BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__,
+ __LINE__);
goto bce_attach_fail;
}
OpenPOWER on IntegriCloud