[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-wcte12xp-latency r8799 - /linux/t...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Jun 23 16:11:39 CDT 2010


Author: sruffell
Date: Wed Jun 23 16:11:36 2010
New Revision: 8799

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8799
Log:
wip: missed a few spin_lock instances

Modified:
    linux/team/sruffell/dahdi-linux-wcte12xp-latency/drivers/dahdi/wcte12xp/base.c

Modified: linux/team/sruffell/dahdi-linux-wcte12xp-latency/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-wcte12xp-latency/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8799&r1=8798&r2=8799
==============================================================================
--- linux/team/sruffell/dahdi-linux-wcte12xp-latency/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/team/sruffell/dahdi-linux-wcte12xp-latency/drivers/dahdi/wcte12xp/base.c Wed Jun 23 16:11:36 2010
@@ -152,10 +152,10 @@
 	list_splice_init(&wc->active_cmds, &wc->pending_cmds);
 	spin_unlock_irqrestore(&wc->cmd_list_lock, flags);
 
-	spin_lock(&wc->reglock);
+	spin_lock_irqsave(&wc->reglock, flags);
 	if (wc->vpmadt032)
 		vpmadt032_resend(wc->vpmadt032);
-	spin_unlock(&wc->reglock);
+	spin_unlock_irqrestore(&wc->reglock, flags);
 }
 
 static void cmd_dequeue(struct t1 *wc, unsigned char *writechunk, int eframe, int slot)
@@ -1856,6 +1856,7 @@
 	int x;
 	int y;
 	int chan;
+	unsigned long flags;
 
 	/* Calculate Transmission */
 	if (likely(test_bit(INITIALIZED, &wc->bit_flags))) {
@@ -1873,10 +1874,10 @@
 			cmd_dequeue(wc, writechunk, x, y);
 
 #ifdef VPM_SUPPORT
-		spin_lock(&wc->reglock);
+		spin_lock_irqsave(&wc->reglock, flags);
 		if (wc->vpmadt032)
 			cmd_dequeue_vpmadt032(wc, writechunk, x);
-		spin_unlock(&wc->reglock);
+		spin_unlock_irqrestore(&wc->reglock, flags);
 #endif
 
 		if (x < DAHDI_CHUNKSIZE - 1) {
@@ -1901,6 +1902,7 @@
 static inline void t1_receiveprep(struct t1 *wc, const u8* readchunk)
 {
 	int x,chan;
+	unsigned long flags;
 	unsigned char expected;
 
 	if (!is_good_frame(readchunk))
@@ -1928,10 +1930,10 @@
 		}
 		cmd_decipher(wc, readchunk);
 #ifdef VPM_SUPPORT
-		spin_lock(&wc->reglock);
+		spin_lock_irqsave(&wc->reglock, flags);
 		if (wc->vpmadt032)
 			cmd_decipher_vpmadt032(wc, readchunk);
-		spin_unlock(&wc->reglock);
+		spin_unlock_irqrestore(&wc->reglock, flags);
 #endif
 		readchunk += (EFRAME_SIZE + EFRAME_GAP);
 	}
@@ -2049,6 +2051,7 @@
 
 static void te12xp_timer(unsigned long data)
 {
+	unsigned long flags;
 	struct t1 *wc = (struct t1 *)data;
 
 	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
@@ -2056,7 +2059,7 @@
 
 	queue_work(wc->wq, &wc->timer_work);
 
-	spin_lock(&wc->reglock);
+	spin_lock_irqsave(&wc->reglock, flags);
 	if (!wc->vpmadt032)
 		goto unlock_exit;
 
@@ -2066,7 +2069,7 @@
 	queue_work(wc->vpmadt032->wq, &wc->vpm_check_work);
 
 unlock_exit:
-	spin_unlock(&wc->reglock);
+	spin_unlock_irqrestore(&wc->reglock, flags);
 	return;
 }
 




More information about the dahdi-commits mailing list