summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-05-16 22:35:25 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-05-16 22:35:25 +0000
commitf29806a8732407f312d3c005f0f38b278516e810 (patch)
treef1d30cee746552aab4347d25cf803e47e92c9766
parent9053ac67d7663d4553bb644f01faab1e088140e4 (diff)
Optimize this further. We actually should check the framer ASAP, so that its interrupt gets cleared
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2516 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--wct4xxp/base.c32
-rw-r--r--wct4xxp/wct4xxp.h4
2 files changed, 16 insertions, 20 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c
index 9072ab4..3f0e3a3 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -2808,19 +2808,6 @@ ZAP_IRQ_HANDLER(t4_interrupt)
static void t4_isr_bh(unsigned long data)
{
struct t4 *wc = (struct t4 *)data;
- unsigned char cis;
-
- if (test_and_clear_bit(T4_CHECK_FRAMER, &wc->checkflag)) {
- cis = t4_framer_in(wc, 0, FRMR_CIS);
- if (cis & FRMR_CIS_GIS1)
- t4_framer_interrupt(wc, 0);
- if (cis & FRMR_CIS_GIS2)
- t4_framer_interrupt(wc, 1);
- if (cis & FRMR_CIS_GIS3)
- t4_framer_interrupt(wc, 2);
- if (cis & FRMR_CIS_GIS4)
- t4_framer_interrupt(wc, 3);
- }
#ifdef VPM_SUPPORT
if (wc->vpm) {
@@ -2900,8 +2887,19 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2)
#endif
}
- if (unlikely(status & 0x1))
- set_bit(T4_CHECK_FRAMER, &wc->checkflag);
+ if (unlikely(status & 0x1)) {
+ unsigned char cis;
+
+ cis = t4_framer_in(wc, 0, FRMR_CIS);
+ if (cis & FRMR_CIS_GIS1)
+ t4_framer_interrupt(wc, 0);
+ if (cis & FRMR_CIS_GIS2)
+ t4_framer_interrupt(wc, 1);
+ if (cis & FRMR_CIS_GIS3)
+ t4_framer_interrupt(wc, 2);
+ if (cis & FRMR_CIS_GIS4)
+ t4_framer_interrupt(wc, 3);
+ }
if (wc->vpm) {
if (wc->vpm450m) {
@@ -2939,8 +2937,8 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2)
spin_unlock(&wc->reglock);
- if (unlikely(test_bit(T4_CHECK_VPM, &wc->checkflag) || test_bit(T4_CHECK_FRAMER, &wc->checkflag)))
- tasklet_hi_schedule(&wc->t4_tlet);
+ if (unlikely(test_bit(T4_CHECK_VPM, &wc->checkflag)))
+ tasklet_schedule(&wc->t4_tlet);
#ifndef ENABLE_WORKQUEUES
__t4_pci_out(wc, WC_INTR, 0);
diff --git a/wct4xxp/wct4xxp.h b/wct4xxp/wct4xxp.h
index 8b9de68..42dc2bd 100644
--- a/wct4xxp/wct4xxp.h
+++ b/wct4xxp/wct4xxp.h
@@ -105,9 +105,7 @@ struct t4_regs {
unsigned char regs[NUM_REGS];
};
-#define T4_CHECK_FRAMER 0
-#define T4_CHECK_VPM 1
-#define T4_UPDATE_TIMERS 2
+#define T4_CHECK_VPM 0
#define WCT4_GET_REGS _IOW (ZT_CODE, 60, struct t4_regs)