aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii/ciphy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/ciphy.c')
-rw-r--r--sys/dev/mii/ciphy.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c
index 9bd37d3ccfd1d..31913baa5b9ab 100644
--- a/sys/dev/mii/ciphy.c
+++ b/sys/dev/mii/ciphy.c
@@ -118,18 +118,16 @@ ciphy_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 = ciphy_service;
sc->mii_pdata = mii;
sc->mii_flags |= MIIF_NOISOLATE;
- mii->mii_instance++;
ciphy_reset(sc);
- sc->mii_capabilities =
- PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
+ sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
device_printf(dev, " ");
@@ -148,25 +146,10 @@ ciphy_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)
@@ -239,12 +222,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)