[svn-commits] sruffell: linux/trunk r10212 - /linux/trunk/drivers/dahdi/wcte12xp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 29 11:11:54 CDT 2011


Author: sruffell
Date: Thu Sep 29 11:11:50 2011
New Revision: 10212

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10212
Log:
wcte12xp: Set uncollected performance counters to -1.

The intent here is to flag to users that the maintenance counters are
not collected for spans exported by the wcte12xp driver.

dahdi_maint before this change:

  # dahdi_maint -s 1
  Span 1:
  >Framing Errors : 0:
  >CRC Errors : 0:
  >Code Violations : 0:
  >E-bit Count : 0:
  >General Errored Seconds : 0:

And after:

  # dahdi_maint -s 1
  Span 1:
  >Framing Errors : -1:
  >CRC Errors : -1:
  >Code Violations : -1:
  >E-bit Count : -1:
  >General Errored Seconds : -1:

This can be combined with a change to dahdi_maint to recognize that the
errors are -1 and print an even more explicit warning.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wcte12xp/base.c

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=10212&r1=10211&r2=10212
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Thu Sep 29 11:11:50 2011
@@ -2565,6 +2565,10 @@
 	if (!wc)
 		return -ENOMEM;
 
+	/* Set the performance counters to -1 since this card currently does
+	 * not support collecting them. */
+	memset(&wc->span.count, -1, sizeof(wc->span.count));
+
 	wc->not_ready = 1;
 
 	ifaces[index] = wc;




More information about the svn-commits mailing list