[svn-commits] mattf: branch 1.4 r4224 - in /branches/1.4/kernel/wct4xxp: base.c wct4xxp.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 2 13:09:23 CDT 2008
Author: mattf
Date: Fri May 2 13:09:23 2008
New Revision: 4224
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4224
Log:
Switch to using bitflags instead of variables for stopdma field
Modified:
branches/1.4/kernel/wct4xxp/base.c
branches/1.4/kernel/wct4xxp/wct4xxp.h
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=4224&r1=4223&r2=4224
==============================================================================
--- branches/1.4/kernel/wct4xxp/base.c (original)
+++ branches/1.4/kernel/wct4xxp/base.c Fri May 2 13:09:23 2008
@@ -306,7 +306,6 @@
int ledreg; /* LED Register */
unsigned int gpio;
unsigned int gpioctl;
- int stopdma; /* Set to stop DMA */
int e1recover; /* E1 recovery timer */
spinlock_t reglock; /* lock register access */
int spansstarted; /* number of spans started */
@@ -1429,7 +1428,7 @@
(!(wc->tspans[1]->span.flags & ZT_FLAG_RUNNING)))) {
/* No longer in use, disable interrupts */
printk("TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans);
- wc->stopdma = 1;
+ set_bit(T4_STOP_DMA, &wc->checkflag);
} else wc->checktiming = 1;
spin_unlock_irqrestore(&wc->reglock, flags);
@@ -1472,6 +1471,10 @@
wc->tspans[lc->sync - 1]->psync = span->offset + 1;
}
wc->checktiming = 1;
+
+ /* Make sure this is clear in case of multiple startup and shutdown
+ * iterations */
+ clear_bit(T4_STOP_DMA, &wc->checkflag);
/* If we're already running, then go ahead and apply the changes */
if (span->flags & ZT_FLAG_RUNNING)
@@ -2919,7 +2922,7 @@
unsigned int status;
/* Check this first in case we get a spurious interrupt */
- if (unlikely(wc->stopdma)) {
+ if (unlikely(test_bit(T4_STOP_DMA, &wc->checkflag))) {
/* Stop DMA cleanly if requested */
wc->dmactrl = 0x0;
t4_pci_out(wc, WC_DMACTRL, 0x00000000);
@@ -3734,7 +3737,7 @@
{
/* Turn off DMA, leave interrupts enabled */
- wc->stopdma = 1;
+ set_bit(T4_STOP_DMA, &wc->checkflag);
current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout((25 * HZ) / 1000);
Modified: branches/1.4/kernel/wct4xxp/wct4xxp.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wct4xxp/wct4xxp.h?view=diff&rev=4224&r1=4223&r2=4224
==============================================================================
--- branches/1.4/kernel/wct4xxp/wct4xxp.h (original)
+++ branches/1.4/kernel/wct4xxp/wct4xxp.h Fri May 2 13:09:23 2008
@@ -107,6 +107,7 @@
#define T4_CHECK_VPM 0
#define T4_LOADING_FW 1
+#define T4_STOP_DMA 2
#define WCT4_GET_REGS _IOW (ZT_CODE, 60, struct t4_regs)
More information about the svn-commits
mailing list