summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/nsphyter.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/nsphyter.c')
-rw-r--r--sys/dev/mii/nsphyter.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/sys/dev/mii/nsphyter.c b/sys/dev/mii/nsphyter.c
index f07e62c..6317a52 100644
--- a/sys/dev/mii/nsphyter.c
+++ b/sys/dev/mii/nsphyter.c
@@ -138,13 +138,11 @@ nsphyter_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 = nsphyter_service;
sc->mii_pdata = mii;
- mii->mii_instance++;
-
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
nic = device_get_name(device_get_parent(sc->mii_dev));
@@ -178,30 +176,13 @@ nsphyter_attach(device_t dev)
static int
nsphyter_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
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)
@@ -211,11 +192,6 @@ nsphyter_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
break;
case MII_TICK:
- /*
- * If we're not currently selected, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
if (mii_phy_tick(sc) == EJUSTRETURN)
return (0);
break;
OpenPOWER on IntegriCloud