[dahdi-commits] rmeyerriecks: branch linux/rmeyerriecks/dahdi-linux-maintmodes r7678 - in /li...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Dec 10 17:26:15 CST 2009
Author: rmeyerriecks
Date: Thu Dec 10 17:26:02 2009
New Revision: 7678
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7678
Log:
Added errsec to the span structure to count errored seconds.
Added a counter initialization function to prevent reads of
uninitialized variables.
Squelched interrupt seconds reporting from the interrupt
instrumentation line, this was spamming the logs and
watering down the useful information.
Modified:
linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c
linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/kernel.h
Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c?view=diff&rev=7678&r1=7677&r2=7678
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c Thu Dec 10 17:26:02 2009
@@ -1467,12 +1467,14 @@
t4_framer_out(wc, span->offset, LCR1_T, reg);
break;
case DAHDI_RESET_COUNTERS:
+ // TODO Replace this with the call to t4_error_counters
ts->span.fecount = 0;
ts->span.crc4count = 0;
ts->span.cvcount = 0;
ts->span.ebitcount = 0;
ts->span.becount = 0;
ts->span.prbscount = 0;
+ ts->span.errsec = 0;
dev_info(&wc->dev->dev, "Reset error counters\n");
break;
default:
@@ -1480,6 +1482,23 @@
break;
}
}
+ return 0;
+}
+
+static int t4_reset_counters(struct dahdi_span *span)
+{
+ struct t4_span *ts = span->pvt;
+ struct t4 *wc = ts->owner;
+
+ ts->span.fecount = 0;
+ ts->span.crc4count = 0;
+ ts->span.cvcount = 0;
+ ts->span.ebitcount = 0;
+ ts->span.becount = 0;
+ ts->span.prbscount = 0;
+ ts->span.errsec = 0;
+ dev_info(&wc->dev->dev, "Reset error counters\n");
+
return 0;
}
@@ -2834,7 +2853,7 @@
isr3 = (gis & FRMR_GIS_ISR3) ? t4_framer_in(wc, span, FRMR_ISR3) : 0;
isr4 = (gis & FRMR_GIS_ISR4) ? t4_framer_in(wc, span, FRMR_ISR4) : 0;
- if (debug & DEBUG_FRAMER)
+ if (debug & DEBUG_FRAMER & !(isr3 & ISR3_SEC))
printk(KERN_DEBUG "gis: %02x, isr0: %02x, isr1: %02x, isr2: %02x, isr3: %08x, isr4: %02x\n", gis, isr0, isr1, isr2, isr3, isr4);
if (isr3 & ISR3_SEC) {
@@ -2847,6 +2866,7 @@
}
if (isr3 & ISR3_ES) {
+ ts->span.errsec += 1;
dev_info(&wc->dev->dev, "Errored second\n");
}
Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/kernel.h?view=diff&rev=7678&r1=7677&r2=7678
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/kernel.h (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/kernel.h Thu Dec 10 17:26:02 2009
@@ -767,6 +767,7 @@
unsigned int fascount; /*!< current FAS error count */
unsigned int becount; /*!< current bit error count */
unsigned int prbscount; /*!< current PRBS detected pattern */
+ unsigned int errsec; /*!< errored seconds */
int maintstat; /*!< Maintenance state */
wait_queue_head_t maintq; /*!< Maintenance queue */
More information about the dahdi-commits
mailing list