From f916f1e91f38e5939e285bde9a5678fad8acb87f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 13 Dec 2012 10:41:46 -0600 Subject: [PATCH] dahdi: Move 'timingslips' in with the other maintenance counters. This allows timingslips to be reset along with the other counters and clarifies the intended use. This came up when Doug Bailey asked why he couldn't use dahdi_maint to clear timing slips in addition to the other counters. Signed-off-by: Shaun Ruffell --- drivers/dahdi/dahdi-base.c | 4 ++-- drivers/dahdi/wct4xxp/base.c | 4 ++-- include/dahdi/kernel.h | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index f4ce805..8121e44 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -932,8 +932,8 @@ static int dahdi_seq_show(struct seq_file *sfile, void *v) seq_printf(sfile, "\tFAS error count: %d\n", s->count.fas); if (s->parent->irqmisses) seq_printf(sfile, "\tIRQ misses: %d\n", s->parent->irqmisses); - if (s->timingslips) - seq_printf(sfile, "\tTiming slips: %d\n", s->timingslips); + if (s->count.timingslips) + seq_printf(sfile, "\tTiming slips: %d\n", s->count.timingslips); seq_printf(sfile, "\n"); for (x = 0; x < s->channels; x++) { diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index be172d2..89bb5ce 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -3682,7 +3682,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span) } if (!ts->span.alarms) { if ((isr3 & 0x3) || (isr4 & 0xc0)) - ts->span.timingslips++; + ts->span.count.timingslips++; if (debug & DEBUG_MAIN) { if (isr3 & 0x02) @@ -3703,7 +3703,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span) wc->numspans, span + 1); } } else - ts->span.timingslips = 0; + ts->span.count.timingslips = 0; spin_lock_irqsave(&wc->reglock, flags); /* HDLC controller checks - receive side */ diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 06f9e4a..c0fe08e 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -750,6 +750,7 @@ struct dahdi_count { __u32 be; /*!< current bit error count */ __u32 prbs; /*!< current PRBS detected pattern */ __u32 errsec; /*!< errored seconds */ + __u32 timingslips; /*!< Clock slips */ }; /* map flagbits to flag masks */ @@ -955,8 +956,6 @@ struct dahdi_span { int maintstat; /*!< Maintenance state */ int mainttimer; /*!< Maintenance timer */ - int timingslips; /*!< Clock slips */ - struct dahdi_chan **chans; /*!< Member channel structures */ const struct dahdi_span_ops *ops; /*!< span callbacks. */