[Asterisk-cvs] zaptel wct4xxp.c,1.22,1.23
citats at lists.digium.com
citats at lists.digium.com
Thu Apr 1 02:05:40 CST 2004
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/home/citats/cvs/zaptel
Modified Files:
wct4xxp.c
Log Message:
spin_lock in t4_set_timing_source in wct4xxp.c (fixes panic on SMP)
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- wct4xxp.c 31 Mar 2004 19:42:17 -0000 1.22
+++ wct4xxp.c 1 Apr 2004 07:04:31 -0000 1.23
@@ -627,11 +627,15 @@
printk("Successfully initialized serial bus for unit %d\n", unit);
}
+static spinlock_t synclock = SPIN_LOCK_UNLOCKED;
+
static void t4_set_timing_source(struct t4 *wc, int unit)
{
unsigned int timing;
+ unsigned long flags;
int x;
timing = 0x34; /* CMR1: RCLK unit, 8.192 Mhz TCLK, RCLK is 8.192 Mhz */
+ spin_lock_irqsave(&synclock, flags);
if ((unit > -1) && (unit < 4)) {
timing |= (unit << 6);
} else {
@@ -654,6 +658,7 @@
wc->syncsrc = unit;
for (x=0;x<4;x++)
wc->spans[x].syncsrc = unit;
+ spin_unlock_irqrestore(&synclock, flags);
}
static void t4_set_timing_source_auto(struct t4 *wc)
More information about the svn-commits
mailing list