[svn-commits] rmeyerriecks: branch linux/rmeyerriecks/dahdi-linux-maintmodes r7553 - in /li...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 10 11:55:25 CST 2009


Author: rmeyerriecks
Date: Tue Nov 10 11:55:21 2009
New Revision: 7553

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7553
Log:
New feature for resetting the error counters

Modified:
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c?view=diff&rev=7553&r1=7552&r2=7553
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c Tue Nov 10 11:55:21 2009
@@ -4433,6 +4433,7 @@
 		case DAHDI_MAINT_PRBS_DEFECT:
 		case DAHDI_MAINT_BIPOLAR_DEFECT:
 		case DAHDI_MAINT_PRBS:
+		case DAHDI_RESET_COUNTERS:
 			rv = spans[maint.spanno]->maint(spans[maint.spanno], maint.command);
 			spin_unlock_irqrestore(&spans[maint.spanno]->lock, flags);
 			if (rv)

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=7553&r1=7552&r2=7553
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c Tue Nov 10 11:55:21 2009
@@ -1464,6 +1464,15 @@
 			reg &= ~FLLB;
 			t4_framer_out(wc, span->offset, LCR1_T, reg);
 			break;
+		case DAHDI_RESET_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;
+			dev_info(&wc->dev->dev, "Reset error counters\n");
+			break;
 		default:
 			printk(KERN_NOTICE "TE%dXXP: Unknown T1 maint command: %d\n", wc->numspans, cmd);
 			break;
@@ -2820,19 +2829,12 @@
 		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) {
-		printk(KERN_DEBUG "Received 1sec interrupt\n");
 		ts->span.fecount += t4_framer_in(wc, span, FECL_T);
 		ts->span.crc4count += t4_framer_in(wc, span, CEC1L_T);
 		ts->span.cvcount += t4_framer_in(wc, span, CVCL_T);
 		ts->span.ebitcount += t4_framer_in(wc, span, EBCL_T);
 		ts->span.becount += t4_framer_in(wc, span, BECL_T);
 		ts->span.prbscount = t4_framer_in(wc, span, FRS1_T);
-		printk(KERN_DEBUG "FEC : %d\n", ts->span.fecount);
-		printk(KERN_DEBUG "CEC : %d\n", ts->span.crc4count);
-		printk(KERN_DEBUG "CVC : %d\n", ts->span.cvcount);
-		printk(KERN_DEBUG "EBC : %d\n", ts->span.ebitcount);
-		printk(KERN_DEBUG "BEC : %d\n", ts->span.becount);
-		printk(KERN_DEBUG "PRBS: %d\n", ts->span.prbscount);
 	}
 
 	if (isr3 & 0x08) {

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h?view=diff&rev=7553&r1=7552&r2=7553
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h Tue Nov 10 11:55:21 2009
@@ -320,21 +320,22 @@
 #define DAHDI_ALARM_NOTOPEN		32
 
 /* Maintenance modes */
-#define DAHDI_MAINT_NONE			0	/* Normal Mode */
-#define DAHDI_MAINT_LOCALLOOP			1	/* Local Loopback */
-#define DAHDI_MAINT_REMOTELOOP			2	/* Remote Loopback */
-#define DAHDI_MAINT_NETWORKLINELOOP		2	/* Remote Loopback */
-#define DAHDI_MAINT_NETWORKPAYLOADLOOP		13	/* Remote Loopback */
-#define DAHDI_MAINT_LOOPUP			3	/* send loopup code */
-#define DAHDI_MAINT_LOOPDOWN			4	/* send loopdown code */
-#define DAHDI_MAINT_LOOPSTOP			5	/* stop sending loop codes */
-#define DAHDI_MAINT_FAS_DEFECT			6	/* insert a FAS defect */
-#define DAHDI_MAINT_MULTI_DEFECT		7	/* insert a Multiframe defect */
-#define DAHDI_MAINT_CRC_DEFECT			8	/* insert a FAS defect */
-#define DAHDI_MAINT_CAS_DEFECT			9	/* insert a FAS defect */
-#define DAHDI_MAINT_PRBS_DEFECT			10	/* insert a FAS defect */
-#define DAHDI_MAINT_BIPOLAR_DEFECT		11	/* insert a FAS defect */
-#define DAHDI_MAINT_PRBS			12	/* enable the PRBS gen/mon */
+#define DAHDI_MAINT_NONE		0	/* Normal Mode */
+#define DAHDI_MAINT_LOCALLOOP		1	/* Local Loopback */
+#define DAHDI_MAINT_REMOTELOOP		2	/* Remote Loopback */
+#define DAHDI_MAINT_NETWORKLINELOOP	2	/* Remote Loopback */
+#define DAHDI_MAINT_NETWORKPAYLOADLOOP	13	/* Remote Loopback */
+#define DAHDI_MAINT_LOOPUP		3	/* send loopup code */
+#define DAHDI_MAINT_LOOPDOWN		4	/* send loopdown code */
+#define DAHDI_MAINT_LOOPSTOP		5	/* stop sending loop codes */
+#define DAHDI_MAINT_FAS_DEFECT		6	/* insert a FAS defect */
+#define DAHDI_MAINT_MULTI_DEFECT	7	/* insert a Multiframe defect */
+#define DAHDI_MAINT_CRC_DEFECT		8	/* insert a FAS defect */
+#define DAHDI_MAINT_CAS_DEFECT		9	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS_DEFECT		10	/* insert a FAS defect */
+#define DAHDI_MAINT_BIPOLAR_DEFECT	11	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS		12	/* enable the PRBS gen/mon */
+#define DAHDI_RESET_COUNTERS		14	/* clear the error counters */
 
 /* Flag Value for IOMUX, read avail */
 #define DAHDI_IOMUX_READ	1
@@ -568,7 +569,7 @@
  * Set Maintenance Mode
  */
 struct dahdi_maintinfo {
-	int	spanno;		/* span number 1-2 */
+	int	spanno;		/* span number 1-4 */
 	int	command;	/* command */
 };
 




More information about the svn-commits mailing list