[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-cmdlist r9867 - /linux/team/sruffe...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 16 16:41:21 CDT 2011


Author: sruffell
Date: Wed Mar 16 16:41:18 2011
New Revision: 9867

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9867
Log:
wctdm24xxp: Use fact that handle_transmit/recieve are called in hard-irq

We can save on saving and restoring the local interrupt state.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9867&r1=9866&r2=9867
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c Wed Mar 16 16:41:18 2011
@@ -1063,7 +1063,6 @@
 
 static inline void wctdm_transmitprep(struct wctdm *wc, unsigned char *sframe)
 {
-	unsigned long flags;
 	int x, y;
 	struct dahdi_span *s;
 	unsigned char *eframe = sframe;
@@ -1073,7 +1072,7 @@
 		for (x = 0; x < MAX_SPANS; x++) {
 			if (wc->spans[x]) {
 				s = &wc->spans[x]->span;
-				dahdi_transmit(s);
+				_dahdi_transmit(s);
 			}
 		}
 		insert_tdm_data(wc, sframe);
@@ -1086,7 +1085,7 @@
 #endif
 	}
 
-	spin_lock_irqsave(&wc->reglock, flags);
+	spin_lock(&wc->reglock);
 	for (x = 0; x < DAHDI_CHUNKSIZE; x++) {
 		/* Send a sample, as a 32-bit word */
 
@@ -1116,7 +1115,7 @@
 		}
 		eframe += (EFRAME_SIZE + EFRAME_GAP);
 	}
-	spin_unlock_irqrestore(&wc->reglock, flags);
+	spin_unlock(&wc->reglock);
 }
 
 /* Must be called with wc.reglock held and local interrupts disabled */
@@ -1317,7 +1316,6 @@
 
 static inline void wctdm_receiveprep(struct wctdm *wc, const u8 *sframe)
 {
-	unsigned long flags;
 	int x, y;
 	bool irqmiss = false;
 	unsigned char expected;
@@ -1329,7 +1327,7 @@
 	if (likely(wc->initialized))
 		extract_tdm_data(wc, sframe);
 
-	spin_lock_irqsave(&wc->reglock, flags);
+	spin_lock(&wc->reglock);
 	for (x = 0; x < DAHDI_CHUNKSIZE; x++) {
 		if (x < DAHDI_CHUNKSIZE - 1) {
 			expected = wc->rxident + 1;
@@ -1347,7 +1345,7 @@
 
 		eframe += (EFRAME_SIZE + EFRAME_GAP);
 	}
-	spin_unlock_irqrestore(&wc->reglock, flags);
+	spin_unlock(&wc->reglock);
 
 	/* XXX We're wasting 8 taps.  We should get closer :( */
 	if (likely(wc->initialized)) {
@@ -1357,9 +1355,9 @@
 			unsigned char buffer[DAHDI_CHUNKSIZE];
 			__dahdi_fifo_get(wc->ec_reference[x], buffer,
 				    ARRAY_SIZE(buffer));
-			dahdi_ec_chunk(c, c->readchunk, buffer);
+			_dahdi_ec_chunk(c, c->readchunk, buffer);
 #else
-			dahdi_ec_chunk(c, c->readchunk, c->writechunk);
+			_dahdi_ec_chunk(c, c->readchunk, c->writechunk);
 #endif
 		}
 
@@ -1375,7 +1373,7 @@
 
 				}
 #endif
-				dahdi_receive(s);
+				_dahdi_receive(s);
 				if (unlikely(irqmiss))
 					++s->irqmisses;
 			}




More information about the svn-commits mailing list