summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/exphy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/exphy.c')
-rw-r--r--sys/dev/mii/exphy.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c
index 3f0286f..7ff8b63 100644
--- a/sys/dev/mii/exphy.c
+++ b/sys/dev/mii/exphy.c
@@ -194,7 +194,7 @@ static int exphy_attach(dev)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
device_printf(dev, " ");
- mii_add_media(sc);
+ mii_phy_add_media(sc);
printf("\n");
#undef ADD
MIIBUS_MEDIAINIT(sc->mii_dev);
@@ -226,28 +226,7 @@ exphy_service(sc, mii, cmd)
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- case IFM_100_T4:
- /*
- * XXX Not supported as a manual setting right now.
- */
- return (EINVAL);
- default:
- /*
- * BMCR data is stored in the ifmedia entry.
- */
- PHY_WRITE(sc, MII_ANAR,
- mii_anar(ife->ifm_media));
- PHY_WRITE(sc, MII_BMCR, ife->ifm_data);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
@@ -279,8 +258,7 @@ exphy_service(sc, mii, cmd)
}
static void
-exphy_reset(sc)
- struct mii_softc *sc;
+exphy_reset(struct mii_softc *sc)
{
mii_phy_reset(sc);
OpenPOWER on IntegriCloud