summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/gentbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/gentbi.c')
-rw-r--r--sys/dev/mii/gentbi.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/sys/dev/mii/gentbi.c b/sys/dev/mii/gentbi.c
index 19f50e9..05dc3a3 100644
--- a/sys/dev/mii/gentbi.c
+++ b/sys/dev/mii/gentbi.c
@@ -55,7 +55,7 @@
*/
/*
- * Driver for generic ten-bit (1000BASE-SX) interfaces, built in to
+ * Driver for generic ten-bit (1000BASE-SX) interfaces, built into
* many Gigabit Ethernet chips.
*
* All we have to do here is correctly report speed and duplex.
@@ -166,13 +166,11 @@ gentbi_attach(device_t dev)
MII_OUI(ma->mii_id1, ma->mii_id2),
MII_MODEL(ma->mii_id2), MII_REV(ma->mii_id2));
- sc->mii_inst = mii->mii_instance;
+ sc->mii_inst = mii->mii_instance++;
sc->mii_phy = ma->mii_phyno;
sc->mii_service = gentbi_service;
sc->mii_pdata = mii;
- mii->mii_instance++;
-
mii_phy_reset(sc);
/*
@@ -195,30 +193,13 @@ gentbi_attach(device_t dev)
static int
gentbi_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)
@@ -228,12 +209,6 @@ gentbi_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