summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/tlphy.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-05-04 11:00:30 +0000
committerphk <phk@FreeBSD.org>2002-05-04 11:00:30 +0000
commit2bdcfd0c1cef53f79a0f3a9c89de2b9353a04cd1 (patch)
tree10060b81297899944fcdaab5c317442881b2dc23 /sys/dev/mii/tlphy.c
parent86e4ff351cfc30a5d4252b6e45c3e240773f3114 (diff)
downloadFreeBSD-src-2bdcfd0c1cef53f79a0f3a9c89de2b9353a04cd1.zip
FreeBSD-src-2bdcfd0c1cef53f79a0f3a9c89de2b9353a04cd1.tar.gz
Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really
do anything at the end of the day except bloat the drivers which has copy&pasted it.
Diffstat (limited to 'sys/dev/mii/tlphy.c')
-rw-r--r--sys/dev/mii/tlphy.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c
index 70a79c7..cbd14d7 100644
--- a/sys/dev/mii/tlphy.c
+++ b/sys/dev/mii/tlphy.c
@@ -125,7 +125,7 @@ static driver_t tlphy_driver = {
DRIVER_MODULE(tlphy, miibus, tlphy_driver, tlphy_devclass, 0, 0);
static int tlphy_service(struct mii_softc *, struct mii_data *, int);
-static int tlphy_auto(struct tlphy_softc *, int);
+static int tlphy_auto(struct tlphy_softc *);
static void tlphy_acomp(struct tlphy_softc *);
static void tlphy_status(struct tlphy_softc *);
@@ -235,7 +235,7 @@ tlphy_service(self, mii, cmd)
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
int reg;
- if ((sc->sc_mii.mii_flags & MIIF_DOINGAUTO) == 0 && sc->sc_need_acomp)
+ if (sc->sc_need_acomp)
tlphy_acomp(sc);
switch (cmd) {
@@ -271,7 +271,7 @@ tlphy_service(self, mii, cmd)
* an autonegotiation cycle, so there's no such
* thing as "already in auto mode".
*/
- (void) tlphy_auto(sc, 1);
+ (void) tlphy_auto(sc);
break;
case IFM_10_2:
case IFM_10_5:
@@ -327,9 +327,8 @@ tlphy_service(self, mii, cmd)
sc->sc_mii.mii_ticks = 0;
mii_phy_reset(&sc->sc_mii);
- if (tlphy_auto(sc, 0) == EJUSTRETURN)
- return (0);
- break;
+ tlphy_auto(sc);
+ return (0);
}
/* Update the media status. */
@@ -384,13 +383,12 @@ tlphy_status(sc)
}
static int
-tlphy_auto(sc, waitfor)
+tlphy_auto(sc)
struct tlphy_softc *sc;
- int waitfor;
{
int error;
- switch ((error = mii_phy_auto(&sc->sc_mii, waitfor))) {
+ switch ((error = mii_phy_auto(&sc->sc_mii))) {
case EIO:
/*
* Just assume we're not in full-duplex mode.
OpenPOWER on IntegriCloud