Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Initialize and reset curtxeps to zero each time t...



details:   https://anonhg.NetBSD.org/src/rev/7ecfb8ed2579
branches:  trunk
changeset: 547368:7ecfb8ed2579
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 17 16:46:03 2003 +0000

description:
Initialize and reset curtxeps to zero each time the error rate is exceeded.
This stops the continuous spewing of error messages, making it just sporadic.

diffstat:

 sys/dev/ic/wi.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 106712cc0b7a -r 7ecfb8ed2579 sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c   Sat May 17 16:11:52 2003 +0000
+++ b/sys/dev/ic/wi.c   Sat May 17 16:46:03 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi.c,v 1.125 2003/05/16 01:26:18 dyoung Exp $  */
+/*     $NetBSD: wi.c,v 1.126 2003/05/17 16:46:03 christos Exp $        */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.125 2003/05/16 01:26:18 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.126 2003/05/17 16:46:03 christos Exp $");
 
 #define WI_HERMES_AUTOINC_WAR  /* Work around data write autoinc bug. */
 #define WI_HERMES_STATS_WAR    /* Work around stats counter bug. */
@@ -153,7 +153,7 @@
 }
 
 static struct timeval lasttxerror;     /* time of last tx error msg */
-static int curtxeps;                   /* current tx error msgs/sec */
+static int curtxeps = 0;               /* current tx error msgs/sec */
 static int wi_txerate = 0;             /* tx error rate: max msgs/sec */
 
 #ifdef WI_DEBUG
@@ -1323,6 +1323,7 @@
                 */
                if ((status & WI_TXSTAT_DISCONNECT) == 0) {
                        if (ppsratecheck(&lasttxerror, &curtxeps, wi_txerate)) {
+                               curtxeps = 0;
                                printf("%s: tx failed", sc->sc_dev.dv_xname);
                                if (status & WI_TXSTAT_RET_ERR)
                                        printf(", retry limit exceeded");



Home | Main Index | Thread Index | Old Index