summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/qsphy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/qsphy.c')
-rw-r--r--sys/dev/mii/qsphy.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c
index f97d371..55d7943 100644
--- a/sys/dev/mii/qsphy.c
+++ b/sys/dev/mii/qsphy.c
@@ -133,17 +133,14 @@ qsphy_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 = qsphy_service;
sc->mii_pdata = mii;
- mii->mii_instance++;
-
qsphy_reset(sc);
- sc->mii_capabilities =
- PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
+ sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
device_printf(dev, " ");
mii_phy_add_media(sc);
printf("\n");
@@ -155,21 +152,6 @@ qsphy_attach(device_t dev)
static int
qsphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
-
- /*
- * If we're not selected, then do nothing, just isolate, if
- * changing media.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- if (cmd == MII_MEDIACHG) {
- reg = PHY_READ(sc, MII_BMCR);
- PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
- }
-
- return (0);
- }
switch (cmd) {
case MII_POLLSTAT:
OpenPOWER on IntegriCloud