diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-03 16:39:34 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-03 16:39:34 +0000 |
commit | 13d45d04cc0f078e6db246a3885431aab63929f6 (patch) | |
tree | f1d23247609ed6fbbc0da487a183d366cb978ebe /wct4xxp | |
parent | c0457fbb70aef2b96566adb74bbc87f9359666bc (diff) |
Fix for span shutdown issue
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2680 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp')
-rw-r--r-- | wct4xxp/base.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c index b74948f..0cb69dd 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -2443,6 +2443,21 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) if (wc->intcount < 20) printk("2G: Pre-interrupt\n"); #endif + + spin_lock_irqsave(&wc->reglock, flags); + + if (wc->stopdma) { + /* Stop DMA cleanly if requested */ + wc->dmactrl = 0x0; + __t4_pci_out(wc, WC_DMACTRL, 0x00000000); + /* Acknowledge any pending interrupts */ + __t4_pci_out(wc, WC_INTR, 0x00000000); + __t4_set_timing_source(wc, 4); + wc->stopdma = 0x0; + } + + spin_unlock_irqrestore(&wc->reglock, flags); + inirq = 1; /* Make sure it's really for us */ @@ -2460,7 +2475,6 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) #ifdef ENABLE_WORKQUEUES t4_pci_out(wc, WC_INTR, status & 0x00000008); #endif - if (!wc->spansstarted) { printk("Not prepped yet!\n"); #ifdef LINUX26 @@ -2598,15 +2612,6 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) if (wc->checktiming > 0) __t4_set_timing_source_auto(wc); - if (wc->stopdma) { - /* Stop DMA cleanly if requested */ - wc->dmactrl = 0x0; - __t4_pci_out(wc, WC_DMACTRL, 0x00000000); - /* Acknowledge any pending interrupts */ - __t4_pci_out(wc, WC_INTR, 0x00000000); - __t4_set_timing_source(wc, 4); - wc->stopdma = 0x0; - } spin_unlock_irqrestore(&wc->reglock, flags); if (needcheckvpm450 && (vpmdtmfsupport == 1)) { |