[zaptel-commits] trunk r1109 - /trunk/pciradio.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Thu Jun 8 01:51:38 MST 2006


Author: jdixon
Date: Thu Jun  8 03:51:37 2006
New Revision: 1109

URL: http://svn.digium.com/view/zaptel?rev=1109&view=rev
Log:
Fixed problem with spinlocks crashing remote control I/O
especially with the 2.6 kernel

Modified:
    trunk/pciradio.c

Modified: trunk/pciradio.c
URL: http://svn.digium.com/view/zaptel/trunk/pciradio.c?rev=1109&r1=1108&r2=1109&view=diff
==============================================================================
--- trunk/pciradio.c (original)
+++ trunk/pciradio.c Thu Jun  8 03:51:37 2006
@@ -1172,7 +1172,6 @@
 			rad->bursttime[chan->chanpos - 1] = stack.p.data;
 			break;
 		case ZT_RADPAR_UIODATA:
-			spin_lock_irqsave(&rad->lock,flags);
 			byte1 = __pciradio_getcreg(rad,8);
 			byte1 &= ~(1 << (chan->chanpos - 1));
 			byte1 &= ~(1 << (chan->chanpos + 3));
@@ -1182,7 +1181,6 @@
 			spin_unlock_irqrestore(&rad->lock,flags);
 			break;
 		case ZT_RADPAR_UIOMODE:
-			spin_lock_irqsave(&rad->lock,flags);
 			byte1 = __pciradio_getcreg(rad,0xe);
 			byte1 &= ~(1 << (chan->chanpos - 1));
 			byte1 &= ~(1 << (chan->chanpos + 3));
@@ -1205,7 +1203,6 @@
 			if (rad->remmode[chan->chanpos - 1] == ZT_RADPAR_REM_RBI1)
 			{
 				/* set UIOA and UIOB for output */
-				spin_lock_irqsave(&rad->lock,flags);
 				byte1 = __pciradio_getcreg(rad,0xe);
 				mask = (1 << (chan->chanpos - 1)) | 
 					(1 << (chan->chanpos + 3));
@@ -1222,10 +1219,10 @@
 					interruptible_sleep_on_timeout(&mywait,10);
 				rad->lastremcmd = jiffies;
 				rbi_out(rad,chan->chanpos - 1,(unsigned char *)&stack.p.data);
+				spin_lock_irqsave(&rad->lock,flags);
 				break;
 			}
 			/* set UIOA and UIOB for output */
-			spin_lock_irqsave(&rad->lock,flags);
 			byte1 = __pciradio_getcreg(rad,0xe);
 			mask = 1 << (chan->chanpos + 3); /* B an output */
 			byte2 = byte1 & (~mask);



More information about the zaptel-commits mailing list