diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-08-04 21:52:38 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-08-04 21:52:38 +0000 |
commit | 9138cd6acd7a92e386b982721e596c5a69e51c0d (patch) | |
tree | aacbf88eb44805e3accba2a8261eebefd27ed08b /sys/dev/mii/dcphy.c | |
parent | 3c5a961958ca3b350f21cb02c4b4111e63ab821d (diff) |
allow dcphy_status() to be called even when the parent interface
is in the down state. on some dc's with dcphy this will now allow
the card to show carrier state and some link speed though not
necessarily full-duplex for some reason. something to look into
still.
Diffstat (limited to 'sys/dev/mii/dcphy.c')
-rw-r--r-- | sys/dev/mii/dcphy.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c index 9cd25cd39f5..5b6a516b525 100644 --- a/sys/dev/mii/dcphy.c +++ b/sys/dev/mii/dcphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcphy.c,v 1.15 2005/05/27 08:04:15 brad Exp $ */ +/* $OpenBSD: dcphy.c,v 1.16 2005/08/04 21:52:37 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -193,9 +193,8 @@ dcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) /* * If we're not polling our PHY instance, just return. */ - if (IFM_INST(ife->ifm_media) != sc->mii_inst) { + if (IFM_INST(ife->ifm_media) != sc->mii_inst) return (0); - } break; case MII_MEDIACHG: @@ -203,9 +202,8 @@ dcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) * If the media indicates a different PHY instance, * isolate ourselves. */ - if (IFM_INST(ife->ifm_media) != sc->mii_inst) { + if (IFM_INST(ife->ifm_media) != sc->mii_inst) return (0); - } /* * If the interface is not up, don't do anything. @@ -225,11 +223,6 @@ dcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) sc->mii_flags &= ~MIIF_DOINGAUTO; (void) dcphy_mii_phy_auto(sc, 0); break; - case IFM_100_T4: - /* - * XXX Not supported as a manual setting right now. - */ - return (EINVAL); case IFM_100_TX: PHY_RESET(sc); DC_CLRBIT(dc_sc, DC_10BTCTRL, DC_TCTL_AUTONEGENBL); @@ -326,9 +319,6 @@ dcphy_status(struct mii_softc *sc) mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; - if ((mii->mii_ifp->if_flags & IFF_UP) == 0) - return; - reg = CSR_READ_4(dc_sc, DC_10BTSTAT); if (!(reg & DC_TSTAT_LS10) || !(reg & DC_TSTAT_LS100)) mii->mii_media_status |= IFM_ACTIVE; |