[zaptel-commits] mattf: branch 1.2 r2680 - /branches/1.2/wct4xxp/base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Jul 3 11:39:34 CDT 2007


Author: mattf
Date: Tue Jul  3 11:39:34 2007
New Revision: 2680

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2680
Log:
Fix for span shutdown issue

Modified:
    branches/1.2/wct4xxp/base.c

Modified: branches/1.2/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/base.c?view=diff&rev=2680&r1=2679&r2=2680
==============================================================================
--- branches/1.2/wct4xxp/base.c (original)
+++ branches/1.2/wct4xxp/base.c Tue Jul  3 11:39:34 2007
@@ -2443,6 +2443,21 @@
 	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 @@
 #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 @@
 
 	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)) {




More information about the zaptel-commits mailing list