[svn-commits] sruffell: branch linux/2.4 r10005 - /linux/branches/2.4/drivers/dahdi/wctdm24...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 29 13:36:38 CDT 2011


Author: sruffell
Date: Wed Jun 29 13:36:34 2011
New Revision: 10005

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10005
Log:
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 at digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10002

Modified:
    linux/branches/2.4/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/branches/2.4/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.4/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10005&r1=10004&r2=10005
==============================================================================
--- linux/branches/2.4/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/branches/2.4/drivers/dahdi/wctdm24xxp/base.c Wed Jun 29 13:36:34 2011
@@ -1817,7 +1817,8 @@
 						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 @@
 	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;
 }




More information about the svn-commits mailing list