[svn-commits] mattf: trunk r2472 - in /trunk: wct4xxp/base.c
zaptel.c zaptel.h
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Sat Apr 28 15:23:52 MST 2007
Author: mattf
Date: Sat Apr 28 17:23:52 2007
New Revision: 2472
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2472
Log:
Enable slip debugging by default, as well as add a parameter to report slips in /proc/zaptel/x
Modified:
trunk/wct4xxp/base.c
trunk/zaptel.c
trunk/zaptel.h
Modified: trunk/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/base.c?view=diff&rev=2472&r1=2471&r2=2472
==============================================================================
--- trunk/wct4xxp/base.c (original)
+++ trunk/wct4xxp/base.c Sat Apr 28 17:23:52 2007
@@ -165,7 +165,7 @@
#endif
-static int debug=0xff;
+static int debug=0x0;
static int timingcable = 0;
static int highestorder;
static int t1e1override = -1; //0xFF; // -1 = jumper; 0xFF = E1
@@ -187,7 +187,6 @@
aggressive cards. Please note that burst mode has no effect on CPU
utilization / max number of calls / etc. */
static int noburst = 1;
-static int debugslips = 0;
/* For 56kbps links, set this module parameter to 0x7f */
static int hardhdlcmode = 0xff;
@@ -1856,18 +1855,8 @@
__t4_framer_out(wc, unit, FRMR_IMR0, 0xff & ~((wc->tspans[unit]->sigchan) ? HDLC_IMR0_MASK : 0)); /* IMR0: We care about CAS changes, etc */
__t4_framer_out(wc, unit, FRMR_IMR1, 0xff & ~((wc->tspans[unit]->sigchan) ? HDLC_IMR1_MASK : 0)); /* IMR1: We care about nothing */
__t4_framer_out(wc, unit, 0x16, 0x00); /* IMR2: We care about all the alarm stuff! */
- if (debugslips) {
- __t4_framer_out(wc, unit, 0x17, 0xf4); /* IMR3: We care about AIS and friends */
- __t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
- } else {
- __t4_framer_out(wc, unit, 0x17, 0xf7); /* IMR3: We care about AIS and friends */
- __t4_framer_out(wc, unit, 0x18, 0xff); /* IMR4: We don't care about slips on transmit */
- }
-
-#if 0
- t4_check_alarms(wc, unit);
- t4_check_sigbits(wc, unit);
-#endif
+ __t4_framer_out(wc, unit, 0x17, 0xf4); /* IMR3: We care about AIS and friends */
+ __t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
printk("TE%dXXP: Span %d configured for %s/%s\n", wc->numspans, unit + 1, framing, line);
}
@@ -1945,17 +1934,9 @@
__t4_framer_out(wc, unit, FRMR_IMR0, 0xff & ~((wc->tspans[unit]->sigchan) ? HDLC_IMR0_MASK : 0)); /* IMR0: We care about CRC errors, CAS changes, etc */
__t4_framer_out(wc, unit, FRMR_IMR1, 0x3f & ~((wc->tspans[unit]->sigchan) ? HDLC_IMR1_MASK : 0)); /* IMR1: We care about loopup / loopdown */
__t4_framer_out(wc, unit, 0x16, 0x00); /* IMR2: We care about all the alarm stuff! */
- if (debugslips) {
- __t4_framer_out(wc, unit, 0x17, 0xc4 | imr3extra); /* IMR3: We care about AIS and friends */
- __t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
- } else {
- __t4_framer_out(wc, unit, 0x17, 0xc7 | imr3extra); /* IMR3: We care about AIS and friends */
- __t4_framer_out(wc, unit, 0x18, 0xff); /* IMR4: We don't care about slips on transmit */
- }
-#if 0
- t4_check_alarms(wc, unit);
- t4_check_sigbits(wc, unit);
-#endif
+ __t4_framer_out(wc, unit, 0x17, 0xc4 | imr3extra); /* IMR3: We care about AIS and friends */
+ __t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
+
printk("TE%dXXP: Span %d configured for %s/%s%s\n", wc->numspans, unit + 1, framing, line, crc4);
}
@@ -2039,6 +2020,7 @@
t4_check_alarms(wc, span->offset);
t4_check_sigbits(wc, span->offset);
+
if (wc->tspans[0]->sync == span->spanno) printk("SPAN %d: Primary Sync Source\n",span->spanno);
if (wc->tspans[1]->sync == span->spanno) printk("SPAN %d: Secondary Sync Source\n",span->spanno);
if (wc->numspans == 4) {
@@ -2615,7 +2597,8 @@
if (isr2 || (isr3 & 0x08))
t4_check_alarms(wc, span);
}
- if (debugslips && !ts->span.alarms) {
+ if (!ts->span.alarms) {
+ ts->span.timingslips++;
if (isr3 & 0x02)
printk("TE%d10P: RECEIVE slip NEGATIVE on span %d\n", wc->numspans, span + 1);
if (isr3 & 0x01)
@@ -3357,7 +3340,7 @@
unsigned int version;
version = t4_pci_in(wc, WC_VERSION);
- printk("TE%dXXP version %08x, burst %s, slip debug: %s\n", wc->numspans, version, noburst ? "OFF" : "ON", debugslips ? "ON" : "OFF");
+ printk("TE%dXXP version %08x, burst %s\n", wc->numspans, version, noburst ? "OFF" : "ON");
#ifdef ENABLE_WORKQUEUES
printk("TE%dXXP running with work queues.\n", wc->numspans);
#endif
@@ -3797,7 +3780,6 @@
module_param(debug, int, 0600);
module_param(loopback, int, 0600);
module_param(noburst, int, 0600);
-module_param(debugslips, int, 0600);
module_param(timingcable, int, 0600);
module_param(t1e1override, int, 0600);
module_param(alarmdebounce, int, 0600);
@@ -3813,7 +3795,6 @@
MODULE_PARM(debug, "i");
MODULE_PARM(loopback, "i");
MODULE_PARM(noburst, "i");
-MODULE_PARM(debugslips, "i");
MODULE_PARM(hardhdlcmode, "i");
MODULE_PARM(timingcable, "i");
MODULE_PARM(t1e1override, "i");
Modified: trunk/zaptel.c
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.c?view=diff&rev=2472&r1=2471&r2=2472
==============================================================================
--- trunk/zaptel.c (original)
+++ trunk/zaptel.c Sat Apr 28 17:23:52 2007
@@ -602,6 +602,8 @@
len += sprintf(page + len, "\tFAS error count: %d\n", spans[span]->fascount);
if (spans[span]->irqmisses)
len += sprintf(page + len, "\tIRQ misses: %d\n", spans[span]->irqmisses);
+ if (spans[span]->timingslips)
+ len += sprintf(page + len, "\tTiming slips: %d\n", spans[span]->timingslips);
len += sprintf(page + len, "\n");
Modified: trunk/zaptel.h
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.h?view=diff&rev=2472&r1=2471&r2=2472
==============================================================================
--- trunk/zaptel.h (original)
+++ trunk/zaptel.h Sat Apr 28 17:23:52 2007
@@ -1364,6 +1364,8 @@
int irqmisses; /* Interrupt misses */
+ int timingslips; /* Clock slips */
+
struct zt_chan *chans; /* Member channel structures */
/* ==== Span Callback Operations ==== */
More information about the svn-commits
mailing list