[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-updates r10131 - /linux/team/sruff...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 12 19:36:28 CDT 2011
Author: sruffell
Date: Fri Aug 12 19:36:24 2011
New Revision: 10131
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10131
Log:
wctdm24xxp: Use interval for checking on hook transfer timer.
Part of moving more of the module specific processing out of the interrupt
handler.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c
linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
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=10131&r1=10130&r2=10131
==============================================================================
--- 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:24 2011
@@ -2395,15 +2395,14 @@
if (SLIC_LF_RINGING == fxs->lasttxhook) {
/* RINGing, prepare for OHT */
- fxs->ohttimer = OHT_TIMER << 3;
+ fxs->ohttimer = wc->framecount + OHT_TIMER;
/* OHT mode when idle */
fxs->idletxhookstate = POLARITY_XOR(fxs) ? SLIC_LF_OHTRAN_REV :
SLIC_LF_OHTRAN_FWD;
- } else if (fxs->ohttimer) {
+ } else if (fxs->oht_active) {
/* check if still OnHook */
if (!fxs->oldrxhook) {
- fxs->ohttimer -= DAHDI_CHUNKSIZE;
- if (fxs->ohttimer)
+ if (time_before(wc->framecount, fxs->ohttimer))
return;
/* Switch to active */
@@ -2433,7 +2432,7 @@
}
spin_unlock(&wc->reglock);
} else {
- fxs->ohttimer = 0;
+ fxs->oht_active = 0;
/* Switch to active */
fxs->idletxhookstate = POLARITY_XOR(fxs) ? SLIC_LF_ACTIVE_REV : SLIC_LF_ACTIVE_FWD;
if (debug & DEBUG_CARD) {
@@ -3649,7 +3648,6 @@
return -EINVAL;
if (get_user(x, (__user int *) data))
return -EFAULT;
- fxs->ohttimer = x << 3;
/* Active mode when idle */
fxs->idletxhookstate = POLARITY_XOR(fxs) ?
@@ -3678,6 +3676,10 @@
}
}
+
+ fxs->ohttimer = wc->framecount + x;
+ fxs->oht_active = 1;
+
break;
case DAHDI_VMWI_CONFIG:
if (mod->type != FXS)
Modified: linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=10131&r1=10130&r2=10131
==============================================================================
--- linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Fri Aug 12 19:36:24 2011
@@ -166,11 +166,11 @@
};
struct fxs {
+ u8 oht_active:1;
int oldrxhook;
int debouncehook;
int lastrxhook;
int debounce;
- int ohttimer;
int idletxhookstate; /* IDLE changing hook state */
/* lasttxhook reflects the last value written to the proslic's reg
* 64 (LINEFEED_CONTROL) in bits 0-2. Bit 4 indicates if the last
@@ -193,6 +193,7 @@
unsigned long check_alarm;
unsigned long check_proslic;
unsigned long oppending_timeout;
+ unsigned long ohttimer;
};
struct qrv {
More information about the svn-commits
mailing list