diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-09-29 16:11:50 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-09-29 16:11:50 +0000 |
commit | f9ef9d20b4b213ea0dedc752e6f347c18292635f (patch) | |
tree | f3f16b928ffa4d39c29ef864e887125e58ab1b64 /drivers/dahdi/wcte12xp | |
parent | 07f1c2719d9d929d3da82481c9c5c2085fa6cde9 (diff) |
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@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10212 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte12xp')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 80835c1..3b48b5d 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2565,6 +2565,10 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi 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; |