diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-29 18:36:34 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-29 18:36:34 +0000 |
commit | 6368821328756ed49035ce1243835374b5a4cb2a (patch) | |
tree | 2d9d13838eeffa7c70cc5e56a68179be7a55d54f | |
parent | 8bd28c459f61fcf4362e27a3c09ee5e8c8e4e7d3 (diff) |
wctdm24xxp: Ensure battery drops on FXS hangups honor the channel otimer.
If an FXS port is configured to use kewl start signalling, when the FXS port
is "hungup" it should drop battery for 500ms so that any attached devices can
detect that the remote side has disconnected. The wctdm24xxp driver
since version 2.4.0 was only dropping battery for ~5-10 ms because it would
set "open" on the line, but then the next time it read the line feed register
state, it was setting the LINE feed register to the idle state.
This change checks if the line is forced open before setting the FXS port back
"onhook" so as to not turn on battery prematurely.
This fixes a regression introduced in r9070 "wctdm24xxp: Prevent FXS Proslic
staying in "Forward/Reverse OnHookTransfer...". DAHDI-849.
Checking for open on the line feed registered was originally suggested by Alec
Davis.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10002
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10005 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index e28dc49..9029b62 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -1817,7 +1817,8 @@ static void wctdm_fxs_off_hook(struct wctdm *wc, const int card) SLIC_LF_ACTIVE_FWD; break; } - wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_OFFHOOK); + if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN) + wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_OFFHOOK); dahdi_hooksig(wc->aspan->span.chans[card], DAHDI_RXSIG_OFFHOOK); #ifdef DEBUG @@ -1833,7 +1834,8 @@ static void wctdm_fxs_on_hook(struct wctdm *wc, const int card) if (debug & DEBUG_CARD) dev_info(&wc->vb.pdev->dev, "fxs_on_hook: Card %d Going on hook\n", card); - wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_ONHOOK); + if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN) + wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_ONHOOK); dahdi_hooksig(wc->aspan->span.chans[card], DAHDI_RXSIG_ONHOOK); fxs->oldrxhook = 0; } |