summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/if_macb.c
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/arm/at91/if_macb.c
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/arm/at91/if_macb.c')
-rw-r--r--sys/arm/at91/if_macb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm/at91/if_macb.c b/sys/arm/at91/if_macb.c
index dfe7182..02dedac 100644
--- a/sys/arm/at91/if_macb.c
+++ b/sys/arm/at91/if_macb.c
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
#include <arm/at91/if_macbvar.h>
#include <arm/at91/at91_piovar.h>
-#include <arm/at91/at91_pio_sam9.h>
#include <arm/at91/at91sam9g20reg.h>
#include <machine/bus.h>
@@ -1365,9 +1364,10 @@ macb_attach(device_t dev)
write_4(sc, EMAC_NCR, MPE_ENABLE); //enable MPE
sc->ifp = ifp = if_alloc(IFT_ETHER);
- if (mii_phy_probe(dev, &sc->miibus, macb_ifmedia_upd, macb_ifmedia_sts)) {
- device_printf(dev, "Cannot find my PHY.\n");
- err = ENXIO;
+ err = mii_attach(dev, &sc->miibus, ifp, macb_ifmedia_upd,
+ macb_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+ if (err != 0) {
+ device_printf(dev, "attaching PHYs failed\n");
goto out;
}
OpenPOWER on IntegriCloud