From 1decce60ed467ad7e0c082f29f9a36ebf5600f69 Mon Sep 17 00:00:00 2001 From: sruffell Date: Fri, 11 Jan 2008 19:40:42 +0000 Subject: 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 --- wcte12xp/base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wcte12xp') 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; -- cgit v1.2.3