summaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-11-06 21:46:19 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-11-06 21:46:19 +0000
commit8f8e785946ac9cc8201200572f864d93eb3d0537 (patch)
treebaf255a68e106e14afd2e1794cfc9d020603d45c /sys/dev/mii
parent87bd04832a7d7b02af2d0a83ab362b4a7d27e9c8 (diff)
correctly track the falling edge of a media state change in mii_phy_tick().
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/mii_physubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index d40b3214472..7819763afe3 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii_physubr.c,v 1.26 2005/03/26 04:40:09 krw Exp $ */
+/* $OpenBSD: mii_physubr.c,v 1.27 2005/11/06 21:46:18 brad Exp $ */
/* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */
/*-
@@ -254,7 +254,7 @@ mii_phy_tick(struct mii_softc *sc)
if (!sc->mii_anegticks)
sc->mii_anegticks = MII_ANEGTICKS;
- if (++sc->mii_ticks != sc->mii_anegticks)
+ if (++sc->mii_ticks <= sc->mii_anegticks)
return (EJUSTRETURN);
sc->mii_ticks = 0;