diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-11-29 23:36:17 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-11-29 23:36:17 +0000 |
commit | 9f4ca623fcd6fe50c8a53dcda8ebc6e8705f8f37 (patch) | |
tree | 9fd8effd42b51e704f33db23070e606db001c5d1 /drivers/dahdi | |
parent | f72edf6b7dc062e44dd1e961ad0f8e89fb873514 (diff) |
xpp: fxs: demote SETPOLARITY message to DBG()
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10345 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r-- | drivers/dahdi/xpp/card_fxs.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index e1e952e..a6b5d08 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -940,10 +940,25 @@ static int FXS_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a 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"); |