aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vge
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-10-15 14:52:11 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-10-15 14:52:11 +0000
commit8e5d93dbb40452863b266a378868255bf986af67 (patch)
tree6dd0ca5b178547c1f20c8ce1f607ac42d4afe2ae /sys/dev/vge
parentd1457e3703928a249a45a6dd996918bc7eb6ba20 (diff)
downloadsrc-8e5d93dbb40452863b266a378868255bf986af67.tar.gz
src-8e5d93dbb40452863b266a378868255bf986af67.zip
Notes
Diffstat (limited to 'sys/dev/vge')
-rw-r--r--sys/dev/vge/if_vge.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c
index 127a123cc63d..20a0df4b242a 100644
--- a/sys/dev/vge/if_vge.c
+++ b/sys/dev/vge/if_vge.c
@@ -368,9 +368,6 @@ vge_miibus_readreg(device_t dev, int phy, int reg)
sc = device_get_softc(dev);
- if (phy != sc->vge_phyaddr)
- return (0);
-
vge_miipoll_stop(sc);
/* Specify the register we want to read. */
@@ -404,9 +401,6 @@ vge_miibus_writereg(device_t dev, int phy, int reg, int data)
sc = device_get_softc(dev);
- if (phy != sc->vge_phyaddr)
- return (0);
-
vge_miipoll_stop(sc);
/* Specify the register we want to write. */
@@ -1091,10 +1085,11 @@ vge_attach(device_t dev)
}
/* Do MII setup */
- if (mii_phy_probe(dev, &sc->vge_miibus,
- vge_ifmedia_upd, vge_ifmedia_sts)) {
- device_printf(dev, "MII without any phy!\n");
- error = ENXIO;
+ error = mii_attach(dev, &sc->vge_miibus, ifp, vge_ifmedia_upd,
+ vge_ifmedia_sts, BMSR_DEFCAPMASK, sc->vge_phyaddr, MII_OFFSET_ANY,
+ 0);
+ if (error != 0) {
+ device_printf(dev, "attaching PHYs failed\n");
goto fail;
}