Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Fix a bug in last commit that mii_ticks isn't in...
details: https://anonhg.NetBSD.org/src/rev/f669d8fbf868
branches: trunk
changeset: 787285:f669d8fbf868
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sun Jun 09 09:56:17 2013 +0000
description:
Fix a bug in last commit that mii_ticks isn't inclemented.
diffstat:
sys/dev/mii/mii_physubr.c | 11 ++++-------
sys/dev/mii/urlphy.c | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
diffs (74 lines):
diff -r c4e56e3f3c23 -r f669d8fbf868 sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Sun Jun 09 09:44:51 2013 +0000
+++ b/sys/dev/mii/mii_physubr.c Sun Jun 09 09:56:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mii_physubr.c,v 1.77 2013/06/09 09:31:32 msaitoh Exp $ */
+/* $NetBSD: mii_physubr.c,v 1.78 2013/06/09 09:56:17 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.77 2013/06/09 09:31:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.78 2013/06/09 09:56:17 msaitoh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -350,16 +350,13 @@
}
/*
- * mii_tick == 0 means it's the first tick after changing the media or
+ * mii_ticks == 0 means it's the first tick after changing the media or
* the link became down since the last tick (see above), so return with
* 0 to update the status.
*/
- if (sc->mii_ticks == 0)
+ if (sc->mii_ticks++ == 0)
return (0);
- /* Now increment the tick */
- sc->mii_ticks++;
-
/*
* Only retry autonegotiation every N seconds.
*/
diff -r c4e56e3f3c23 -r f669d8fbf868 sys/dev/mii/urlphy.c
--- a/sys/dev/mii/urlphy.c Sun Jun 09 09:44:51 2013 +0000
+++ b/sys/dev/mii/urlphy.c Sun Jun 09 09:56:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: urlphy.c,v 1.28 2013/06/09 09:31:32 msaitoh Exp $ */
+/* $NetBSD: urlphy.c,v 1.29 2013/06/09 09:56:17 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002
* Shingo WATANABE <nabe%nabechan.org@localhost>. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.28 2013/06/09 09:31:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.29 2013/06/09 09:56:17 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -197,16 +197,13 @@
}
/*
- * mii_tick == 0 means it's the first tick after changing the
+ * mii_ticks == 0 means it's the first tick after changing the
* media or the link became down since the last tick (see
* above), so break to update the status.
*/
- if (sc->mii_ticks == 0)
+ if (sc->mii_ticks++ == 0)
break;
- /* Now increment the tick */
- sc->mii_ticks++;
-
/*
* Only retry autonegotiation every N seconds.
*/
Home |
Main Index |
Thread Index |
Old Index