[svn-commits] mattf: branch 1.4 r4223 - /branches/1.4/kernel/wct4xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 2 13:04:05 CDT 2008
Author: mattf
Date: Fri May 2 13:04:05 2008
New Revision: 4223
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4223
Log:
Fix for #12387. Cannot unload wct4xxp module on FC8
Modified:
branches/1.4/kernel/wct4xxp/base.c
Modified: branches/1.4/kernel/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wct4xxp/base.c?view=diff&rev=4223&r1=4222&r2=4223
==============================================================================
--- branches/1.4/kernel/wct4xxp/base.c (original)
+++ branches/1.4/kernel/wct4xxp/base.c Fri May 2 13:04:05 2008
@@ -2918,6 +2918,19 @@
struct t4 *wc = dev_id;
unsigned int status;
+ /* Check this first in case we get a spurious interrupt */
+ if (unlikely(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);
+ spin_lock(&wc->reglock);
+ __t4_set_timing_source(wc, 4, 0, 0);
+ spin_unlock(&wc->reglock);
+ return IRQ_RETVAL(1);
+ }
+
/* Make sure it's really for us */
status = __t4_pci_in(wc, WC_INTR);
@@ -3013,16 +3026,6 @@
if (unlikely(wc->checktiming > 0)) {
__t4_set_timing_source_auto(wc);
- }
-
- if (unlikely(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, 0, 0);
- wc->stopdma = 0x0;
}
spin_unlock(&wc->reglock);
@@ -3781,30 +3784,16 @@
destroy_workqueue(wc->workq);
}
#endif
-#if 0
- /* Stop any DMA */
- __t1xxp_stop_dma(wc);
-
- /* In case hardware is still there */
- __t1xxp_disable_interrupts(wc);
-
- t1xxp_stop_stuff(wc);
-#endif
+
+ free_irq(pdev->irq, wc);
if (wc->membase)
iounmap((void *)wc->membase);
pci_release_regions(pdev);
-#if 0
- if (wc->memaddr)
- release_mem_region(wc->memaddr, wc->memlen);
-#endif
/* Immediately free resources */
pci_free_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 32 * 4, (void *)wc->writechunk, wc->writedma);
-#if 1
- free_irq(pdev->irq, wc);
-#endif
order_index[wc->order]--;
More information about the svn-commits
mailing list