diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2010-10-02 18:53:12 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2010-10-02 18:53:12 +0000 |
| commit | de1add1e459b22ec054bac16dd34fe5dff0d6704 (patch) | |
| tree | be43fedc87f2ffc4b3d13f6ff4002bb017799ac5 /sys/dev/dc | |
| parent | a03e344a7fbc52b843ac362b6d1929bde4947a9a (diff) | |
Notes
Diffstat (limited to 'sys/dev/dc')
| -rw-r--r-- | sys/dev/dc/dcphy.c | 22 | ||||
| -rw-r--r-- | sys/dev/dc/pnphy.c | 22 |
2 files changed, 2 insertions, 42 deletions
diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c index 031b1e5d1e7e..5d8d6fa43339 100644 --- a/sys/dev/dc/dcphy.c +++ b/sys/dev/dc/dcphy.c @@ -149,7 +149,7 @@ dcphy_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 = dcphy_service; sc->mii_pdata = mii; @@ -159,8 +159,6 @@ dcphy_attach(device_t dev) */ sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - mii->mii_instance++; - /*dcphy_reset(sc);*/ dc_sc = mii->mii_ifp->if_softc; CSR_WRITE_4(dc_sc, DC_10BTSTAT, 0); @@ -204,22 +202,10 @@ dcphy_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) - return (0); - - /* * If the interface is not up, don't do anything. */ if ((mii->mii_ifp->if_flags & IFF_UP) == 0) @@ -276,12 +262,6 @@ dcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) 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) diff --git a/sys/dev/dc/pnphy.c b/sys/dev/dc/pnphy.c index 187089e0eab2..28d02bb4f41d 100644 --- a/sys/dev/dc/pnphy.c +++ b/sys/dev/dc/pnphy.c @@ -132,7 +132,7 @@ pnphy_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 = pnphy_service; sc->mii_pdata = mii; @@ -142,8 +142,6 @@ pnphy_attach(device_t dev) */ sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - mii->mii_instance++; - sc->mii_capabilities = BMSR_100TXFDX | BMSR_100TXHDX | BMSR_10TFDX | BMSR_10THDX; sc->mii_capabilities &= ma->mii_capmask; @@ -162,22 +160,10 @@ pnphy_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) - return (0); - - /* * If the interface is not up, don't do anything. */ if ((mii->mii_ifp->if_flags & IFF_UP) == 0) @@ -212,12 +198,6 @@ pnphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) 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) |
