diff options
Diffstat (limited to 'sys/dev/mii/rgephy.c')
-rw-r--r-- | sys/dev/mii/rgephy.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c index 1d7d60b..c1d6703 100644 --- a/sys/dev/mii/rgephy.c +++ b/sys/dev/mii/rgephy.c @@ -122,13 +122,11 @@ rgephy_attach(device_t dev) mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - sc->mii_inst = mii->mii_instance; + sc->mii_inst = mii->mii_instance++; sc->mii_phy = ma->mii_phyno; sc->mii_service = rgephy_service; sc->mii_pdata = mii; - mii->mii_instance++; - rsc->mii_model = MII_MODEL(ma->mii_id2); rsc->mii_revision = MII_REV(ma->mii_id2); @@ -137,7 +135,7 @@ rgephy_attach(device_t dev) #if 0 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), - BMCR_LOOP|BMCR_S100); + MII_MEDIA_100_TX); #endif sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; @@ -171,25 +169,10 @@ rgephy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) switch (cmd) { case MII_POLLSTAT: - /* - * If we're not polling our PHY instance, just return. - */ - if (IFM_INST(ife->ifm_media) != sc->mii_inst) - return (0); break; case MII_MEDIACHG: /* - * If the media indicates a different PHY instance, - * isolate ourselves. - */ - if (IFM_INST(ife->ifm_media) != sc->mii_inst) { - reg = PHY_READ(sc, MII_BMCR); - PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO); - return (0); - } - - /* * If the interface is not up, don't do anything. */ if ((mii->mii_ifp->if_flags & IFF_UP) == 0) @@ -271,12 +254,6 @@ setit: case MII_TICK: /* - * If we're not currently selected, just return. - */ - if (IFM_INST(ife->ifm_media) != sc->mii_inst) - return (0); - - /* * Is the interface even up? */ if ((mii->mii_ifp->if_flags & IFF_UP) == 0) |