[dahdi-commits] sruffell: linux/trunk r10396 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Jan 3 13:25:50 CST 2012


Author: sruffell
Date: Tue Jan  3 13:25:46 2012
New Revision: 10396

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10396
Log:
wctdm24xxp: Fix bug if hook state on FXS changes before channel configuration.

If the hook state on an FXS port changes before the channel is
configured with dahdi_cfg it is possible to erroneously force the line
feed register open without setting a timer to clear it.

The result would be a "dead" channel that cannot be cleared unless the
driver is reloaded and warning in the kernel log that "0 is an invalid
signaling state for an FXS module".

This change makes the OFF_HOOK to ON_HOOK change behave just as the
ON_HOOK to OFF_HOOK change has.

Internal-Issue-ID: DAHLIN-272
Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10396&r1=10395&r2=10396
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Tue Jan  3 13:25:46 2012
@@ -2256,20 +2256,16 @@
 	switch (txsig) {
 	case DAHDI_TXSIG_ONHOOK:
 		switch (get_dahdi_chan(wc, mod)->sig) {
-		case DAHDI_SIG_EM:
-		case DAHDI_SIG_FXOKS:
-		case DAHDI_SIG_FXOLS:
-			x = fxs->idletxhookstate;
-			break;
 		case DAHDI_SIG_FXOGS:
 			x = (POLARITY_XOR(fxs)) ?
 					SLIC_LF_RING_OPEN :
 					SLIC_LF_TIP_OPEN;
 			break;
+		case DAHDI_SIG_EM:
+		case DAHDI_SIG_FXOKS:
+		case DAHDI_SIG_FXOLS:
 		default:
-			WARN_ONCE(1, "%x is an invalid signaling state for "
-				  "an FXS module.\n",
-				  get_dahdi_chan(wc, mod)->sig);
+			x = fxs->idletxhookstate;
 			break;
 		}
 		break;




More information about the dahdi-commits mailing list