[dahdi-commits] sruffell: branch linux/sruffell/wctdm24xxp-updates r10126 - /linux/team/sruff...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Aug 12 19:36:06 CDT 2011
Author: sruffell
Date: Fri Aug 12 19:36:03 2011
New Revision: 10126
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10126
Log:
wctdm24xxp: Use fact that handle_transmit/receive are called in hard-irq
We can spend less time in interrupt context by not saving and restoring the
local interrupt state.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c
Modified: linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10126&r1=10125&r2=10126
==============================================================================
--- linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c Fri Aug 12 19:36:03 2011
@@ -1154,7 +1154,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;
@@ -1164,7 +1163,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);
@@ -1177,7 +1176,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 */
@@ -1203,7 +1202,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 */
@@ -1427,7 +1426,6 @@
static inline void wctdm_receiveprep(struct wctdm *wc, const u8 *sframe)
{
- unsigned long flags;
int x, y;
bool irqmiss = false;
unsigned char expected;
@@ -1436,7 +1434,7 @@
if (unlikely(!is_good_frame(sframe)))
return;
- spin_lock_irqsave(&wc->reglock, flags);
+ spin_lock(&wc->reglock);
if (likely(is_initialized(wc)))
extract_tdm_data(wc, sframe);
@@ -1461,7 +1459,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(is_initialized(wc))) {
@@ -1472,7 +1470,7 @@
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
if ((wc->vpmoct) &&
(wchan->timeslot == wc->vpmoct->preecho_timeslot) &&
@@ -1499,7 +1497,7 @@
}
#endif
- dahdi_receive(s);
+ _dahdi_receive(s);
if (unlikely(irqmiss))
++s->irqmisses;
}
More information about the dahdi-commits
mailing list