[zaptel-commits] sruffell: branch 1.4 r3659 - in /branches: 1.2/wcte12xp/ 1.4/wcte12xp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Jan 11 13:40:42 CST 2008


Author: sruffell
Date: Fri Jan 11 13:40:42 2008
New Revision: 3659

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3659
Log:
Elimates a recursive grab of a spinlock in the interrupt handler for the wcte12xp.

Modified:
    branches/1.2/wcte12xp/base.c
    branches/1.4/wcte12xp/base.c

Modified: branches/1.2/wcte12xp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte12xp/base.c?view=diff&rev=3659&r1=3658&r2=3659
==============================================================================
--- branches/1.2/wcte12xp/base.c (original)
+++ branches/1.2/wcte12xp/base.c Fri Jan 11 13:40:42 2008
@@ -379,7 +379,8 @@
 
 
 	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 @@
 				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;

Modified: branches/1.4/wcte12xp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wcte12xp/base.c?view=diff&rev=3659&r1=3658&r2=3659
==============================================================================
--- branches/1.4/wcte12xp/base.c (original)
+++ branches/1.4/wcte12xp/base.c Fri Jan 11 13:40:42 2008
@@ -379,7 +379,8 @@
 
 
 	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 @@
 				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;




More information about the zaptel-commits mailing list