summaryrefslogtreecommitdiff
path: root/sys/dev/mii/rgephy.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-03-26 04:40:10 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-03-26 04:40:10 +0000
commit4383940392fe74c2d2b7fb9bb4bfab1af48e1459 (patch)
treed25ae963abc328866ffe27d4d2c49a5a92019347 /sys/dev/mii/rgephy.c
parenteedef93b45432d311e3a186545b98b7c3634d0b6 (diff)
Cleanup. Use defines, standard names, consistant comparison operators, etc.
for auto negotiation ticks code. No functional change. ok brad@
Diffstat (limited to 'sys/dev/mii/rgephy.c')
-rw-r--r--sys/dev/mii/rgephy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index 522ba91dd96..e1d60ca36fe 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rgephy.c,v 1.8 2005/02/19 06:00:04 brad Exp $ */
+/* $OpenBSD: rgephy.c,v 1.9 2005/03/26 04:40:09 krw Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
@@ -128,8 +128,7 @@ rgephyattach(struct device *parent, struct device *self, void *aux)
sc->mii_rev = MII_REV(ma->mii_id2);
sc->mii_pdata = mii;
sc->mii_flags = ma->mii_flags;
- sc->mii_ticks = 0; /* XXX */
- sc->mii_anegticks = 5;
+ sc->mii_anegticks = MII_ANEGTICKS;
sc->mii_flags |= MIIF_NOISOLATE;
@@ -273,9 +272,9 @@ setit:
break;
/*
- * Only retry autonegotiation every 5 seconds.
+ * Only retry autonegotiation every mii_anegticks seconds.
*/
- if (++sc->mii_ticks <= sc->mii_anegticks /*10*/)
+ if (++sc->mii_ticks <= sc->mii_anegticks)
break;
sc->mii_ticks = 0;