[svn-commits] tzafrir: branch linux/2.5 r10352 - /linux/branches/2.5/drivers/dahdi/xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 30 04:21:24 CST 2011


Author: tzafrir
Date: Wed Nov 30 04:21:20 2011
New Revision: 10352

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10352
Log:
xpp: fxs: demote SETPOLARITY message to DBG()

Signed-off-by: Oron Peled <oron.peled at xorcom.com>

Modified:
    linux/branches/2.5/drivers/dahdi/xpp/card_fxs.c

Modified: linux/branches/2.5/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.5/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10352&r1=10351&r2=10352
==============================================================================
--- linux/branches/2.5/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/branches/2.5/drivers/dahdi/xpp/card_fxs.c Wed Nov 30 04:21:20 2011
@@ -940,10 +940,25 @@
 		case DAHDI_SETPOLARITY:
 			if (get_user(val, (int __user *)arg))
 				return -EFAULT;
-			/* Can't change polarity while ringing or when open */
+			/*
+			 * Asterisk may send us this if chan_dahdi config
+			 * has "hanguponpolarityswitch=yes" to notify
+			 * that the other side has hanged up.
+			 *
+			 * This has no effect on normal phone (but we may
+			 * be connected to another FXO equipment).
+			 * note that this chan_dahdi settings has different
+			 * meaning for FXO, where it signals polarity
+			 * reversal *detection* logic.
+			 *
+			 * It seems that sometimes we get this from
+			 * asterisk in wrong state (e.g: while ringing).
+			 * In these cases, silently ignore it.
+			 */
 			if (priv->lasttxhook[pos] == FXS_LINE_RING || priv->lasttxhook[pos] == FXS_LINE_OPEN) {
-				LINE_ERR(xpd, pos, "DAHDI_SETPOLARITY: %s Cannot change when lasttxhook=0x%X\n",
-						(val)?"ON":"OFF", priv->lasttxhook[pos]);
+				LINE_DBG(SIGNAL, xpd, pos,
+					"DAHDI_SETPOLARITY: %s Cannot change when lasttxhook=0x%X\n",
+					(val)?"ON":"OFF", priv->lasttxhook[pos]);
 				return -EINVAL;
 			}
 			LINE_DBG(SIGNAL, xpd, pos, "DAHDI_SETPOLARITY: %s\n", (val)?"ON":"OFF");




More information about the svn-commits mailing list