diff options
author | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-11 19:40:42 +0000 |
---|---|---|
committer | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-11 19:40:42 +0000 |
commit | 1decce60ed467ad7e0c082f29f9a36ebf5600f69 (patch) | |
tree | 67eb8d1db1a2d9d43f368a51b3a23ebdf0b97e45 | |
parent | 0342e370fe8e021adf8302088399f6b4b8020b4d (diff) |
Elimates a recursive grab of a spinlock in the interrupt handler for the wcte12xp.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3659 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | wcte12xp/base.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wcte12xp/base.c b/wcte12xp/base.c index 5791a6c..bdf9b9b 100644 --- a/wcte12xp/base.c +++ b/wcte12xp/base.c @@ -379,7 +379,8 @@ static inline int t1_setreg_full(struct t1 *wc, int addr, int val, int inisr, in do { - spin_lock_irqsave(&wc->reglock, flags); + if (!inisr) + spin_lock_irqsave(&wc->reglock, flags); hit = empty_slot(wc); if (hit > -1) { wc->cmdq.cmds[hit].address = addr; @@ -390,9 +391,10 @@ static inline int t1_setreg_full(struct t1 *wc, int addr, int val, int inisr, in wc->cmdq.cmds[hit].vpm_num = vpm_num; } } - spin_unlock_irqrestore(&wc->reglock, flags); if (inisr) break; + else + spin_unlock_irqrestore(&wc->reglock, flags); if (hit < 0) { if ((ret = schluffen(&wc->regq))) return ret; |