summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-08-30 16:38:01 +0000
committerShaun Ruffell <sruffell@digium.com>2011-08-30 16:38:01 +0000
commit45e3c5c351593b2336f29b9c0b72b231dc016ccf (patch)
tree3d748ffeaa1d8c9e42d458a48a974c43a8215939 /drivers/dahdi/wctdm24xxp
parent505318cd5dd7fbfaf6cb92986497ea83d9a5a1e1 (diff)
wctdm24xxp: Reset the polarity debounce setting when battery is lost.
Wait until we have de-bounced the presence of battery before moving on the check for changes in polarity. This removes the sometimes random polarity messages generated on an FXO port when the far side drops battery from a supervisor disconnect. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10161 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 69cd139..50cc618 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1965,6 +1965,9 @@ wctdm_voicedaa_check_hook(struct wctdm *wc, struct wctdm_module *const mod)
battery present or unknown, debounce timer (going to battery lost)
*/
+ fxo->lastpol = fxo->polarity;
+ fxo->polaritydebounce = 0;
+
if (fxo->battery == BATTERY_LOST) {
if (fxo->battdebounce) {
/* we were going to BATTERY_PRESENT, but battery was lost again,