From ad05721aaa734fbf81a68b9738b51081da33e32f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sat, 19 Mar 2011 16:14:26 -0500 Subject: wctdm24xxp: Change intcount to framecount. The variable does not necessarily have anything to do with the frequency of interrupts but is instead a count of sframes received. Signed-off-by: Shaun Ruffell --- drivers/dahdi/wctdm24xxp/base.c | 32 ++++++++++++++++---------------- drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 07c2627..4968673 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -641,7 +641,7 @@ static void cmd_dequeue_vpmadt032(struct wctdm *wc, u8 *eframe) struct vpmadt032_cmd *curcmd = NULL; struct vpmadt032 *vpmadt032 = wc->vpmadt032; int x; - unsigned char leds = ~((wc->intcount / 1000) % 8) & 0x7; + unsigned char leds = ~((wc->framecount / 1000) % 8) & 0x7; /* Skip audio */ eframe += 24; @@ -1547,16 +1547,16 @@ wctdm_proslic_check_oppending(struct wctdm *wc, struct wctdm_module *const mod) if (debug & DEBUG_CARD) { dev_info(&wc->vb.pdev->dev, "SLIC_LF OK: card=%d shadow=%02x " - "lasttxhook=%02x intcount=%d\n", mod->card, - res, fxs->lasttxhook, wc->intcount); + "lasttxhook=%02x framecount=%ld\n", mod->card, + res, fxs->lasttxhook, wc->framecount); } } else if (fxs->oppending_ms && (--fxs->oppending_ms == 0)) { wctdm_setreg_intr(wc, mod, LINE_STATE, fxs->lasttxhook); if (debug & DEBUG_CARD) { dev_info(&wc->vb.pdev->dev, "SLIC_LF RETRY: card=%d shadow=%02x " - "lasttxhook=%02x intcount=%d\n", mod->card, - res, fxs->lasttxhook, wc->intcount); + "lasttxhook=%02x framecount=%ld\n", mod->card, + res, fxs->lasttxhook, wc->framecount); } } else { /* Start 100ms Timeout */ fxs->oppending_ms = 100; @@ -1597,18 +1597,18 @@ wctdm_proslic_recheck_sanity(struct wctdm *wc, struct wctdm_module *const mod) if ((res & SLIC_LF_SETMASK) == (fxs->lasttxhook & SLIC_LF_SETMASK)) { fxs->lasttxhook &= SLIC_LF_SETMASK; if (debug & DEBUG_CARD) { - dev_info(&wc->vb.pdev->dev, "SLIC_LF OK: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook); + dev_info(&wc->vb.pdev->dev, "SLIC_LF OK: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook); } - } else if (!(wc->intcount & 0x03)) { + } else if (!(wc->framecount & 0x03)) { mod->sethook = CMD_WR(LINE_STATE, fxs->lasttxhook); if (debug & DEBUG_CARD) { - dev_info(&wc->vb.pdev->dev, "SLIC_LF RETRY: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook); + dev_info(&wc->vb.pdev->dev, "SLIC_LF RETRY: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook); } } } if (debug & DEBUG_CARD) { - if (!(wc->intcount % 100)) { - dev_info(&wc->vb.pdev->dev, "SLIC_LF DEBUG: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook); + if (!(wc->framecount % 100)) { + dev_info(&wc->vb.pdev->dev, "SLIC_LF DEBUG: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook); } } #endif @@ -1816,7 +1816,7 @@ wctdm_voicedaa_check_hook(struct wctdm *wc, struct wctdm_module *const mod) abs_voltage = abs(b); if (fxovoltage) { - if (!(wc->intcount % 100)) { + if (!(wc->framecount % 100)) { dev_info(&wc->vb.pdev->dev, "Port %d: Voltage: %d Debounce %d\n", mod->card + 1, b, fxo->battdebounce); } } @@ -2063,8 +2063,8 @@ wctdm_fxs_hooksig(struct wctdm *wc, struct wctdm_module *const mod, if (debug & DEBUG_CARD) { dev_info(&wc->vb.pdev->dev, "Setting FXS hook state " - "to %d (%02x) intcount=%d\n", txsig, x, - wc->intcount); + "to %d (%02x) framecount=%ld\n", txsig, x, + wc->framecount); } } else { spin_unlock_irqrestore(&fxs->lasttxhooklock, flags); @@ -2211,7 +2211,7 @@ static void wctdm_isr_misc_fxs(struct wctdm *wc, struct wctdm_module *const mod) struct fxs *const fxs = &mod->mod.fxs; unsigned long flags; - if (!(wc->intcount % 10000)) { + if (!(wc->framecount % 10000)) { /* Accept an alarm once per 10 seconds */ if (fxs->palarms) fxs->palarms--; @@ -2220,7 +2220,7 @@ static void wctdm_isr_misc_fxs(struct wctdm *wc, struct wctdm_module *const mod) wctdm_proslic_check_oppending(wc, mod); - if (!(wc->intcount & 0xfc)) /* every 256ms */ + if (!(wc->framecount & 0xfc)) /* every 256ms */ wctdm_proslic_recheck_sanity(wc, mod); if (SLIC_LF_RINGING == fxs->lasttxhook) { /* RINGing, prepare for OHT */ @@ -2319,7 +2319,7 @@ static void handle_transmit(struct voicebus *vb, struct list_head *buffers) memset(vbb->data, 0, sizeof(vbb->data)); wctdm_transmitprep(wc, vbb->data); wctdm_isr_misc(wc); - wc->intcount++; + wc->framecount++; } } diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 7f0e60f..721d26c 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -241,7 +241,7 @@ struct wctdm { spinlock_t frame_list_lock; struct list_head frame_list; - unsigned int intcount; + unsigned long framecount; unsigned char txident; unsigned char rxident; -- cgit v1.2.3