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> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10002 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
a28a982b75
commit
59e277ef5a
@ -2053,7 +2053,8 @@ static void wctdm_fxs_off_hook(struct wctdm *wc, struct wctdm_module *const mod)
|
|||||||
SLIC_LF_ACTIVE_FWD;
|
SLIC_LF_ACTIVE_FWD;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wctdm_fxs_hooksig(wc, mod, DAHDI_TXSIG_OFFHOOK);
|
if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN)
|
||||||
|
wctdm_fxs_hooksig(wc, mod, DAHDI_TXSIG_OFFHOOK);
|
||||||
dahdi_hooksig(get_dahdi_chan(wc, mod), DAHDI_RXSIG_OFFHOOK);
|
dahdi_hooksig(get_dahdi_chan(wc, mod), DAHDI_RXSIG_OFFHOOK);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -2063,6 +2064,17 @@ static void wctdm_fxs_off_hook(struct wctdm *wc, struct wctdm_module *const mod)
|
|||||||
fxs->oldrxhook = 1;
|
fxs->oldrxhook = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wctdm_fxs_on_hook - Report on hook to DAHDI.
|
||||||
|
* @wc: Board hosting the module.
|
||||||
|
* @card: Index of the module / port to place on hook.
|
||||||
|
*
|
||||||
|
* If we are intentionally dropping battery to signal a forward
|
||||||
|
* disconnect we do not want to place the line "On-Hook". In this
|
||||||
|
* case, the core of DAHDI will place us on hook when one of the RBS
|
||||||
|
* timers expires.
|
||||||
|
*
|
||||||
|
*/
|
||||||
static void wctdm_fxs_on_hook(struct wctdm *wc, struct wctdm_module *const mod)
|
static void wctdm_fxs_on_hook(struct wctdm *wc, struct wctdm_module *const mod)
|
||||||
{
|
{
|
||||||
struct fxs *const fxs = &mod->mod.fxs;
|
struct fxs *const fxs = &mod->mod.fxs;
|
||||||
@ -2070,7 +2082,8 @@ static void wctdm_fxs_on_hook(struct wctdm *wc, struct wctdm_module *const mod)
|
|||||||
dev_info(&wc->vb.pdev->dev,
|
dev_info(&wc->vb.pdev->dev,
|
||||||
"fxs_on_hook: Card %d Going on hook\n", mod->card);
|
"fxs_on_hook: Card %d Going on hook\n", mod->card);
|
||||||
}
|
}
|
||||||
wctdm_fxs_hooksig(wc, mod, DAHDI_TXSIG_ONHOOK);
|
if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN)
|
||||||
|
wctdm_fxs_hooksig(wc, mod, DAHDI_TXSIG_ONHOOK);
|
||||||
dahdi_hooksig(get_dahdi_chan(wc, mod), DAHDI_RXSIG_ONHOOK);
|
dahdi_hooksig(get_dahdi_chan(wc, mod), DAHDI_RXSIG_ONHOOK);
|
||||||
fxs->oldrxhook = 0;
|
fxs->oldrxhook = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user