diff options
author | citats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-04-01 07:04:31 +0000 |
---|---|---|
committer | citats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-04-01 07:04:31 +0000 |
commit | 6b02a94804912a552c9febcfd0ccb3adde2395c7 (patch) | |
tree | a29e4eb7049baec4d1efa97fa586e9a84cb463be /wct4xxp.c | |
parent | fc4e1a29b489ba41a466b7116628d4dc6814d68d (diff) |
spin_lock in t4_set_timing_source in wct4xxp.c (fixes panic on SMP)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@336 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp.c')
-rwxr-xr-x | wct4xxp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -627,11 +627,15 @@ static void t4_serial_setup(struct t4 *wc, int unit) 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 @@ static void t4_set_timing_source(struct t4 *wc, int unit) 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) |