No subject
Thu Jan 15 22:29:28 CST 2009
Modified:
linux/trunk/drivers/dahdi/xpp/card_fxs.c
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=6377&r1=6376&r2=6377
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Thu Apr 16 13:16:29 2009
@@ -100,6 +100,7 @@
#define REG_BATTERY_BATSL BIT(1) /* Battery Feed Select */
#define REG_LOOPCLOSURE 0x44 /* 68 - Loop Closure/Ring Trip Detect Status */
+#define REG_LOOPCLOSURE_ZERO 0xF8 /* Loop Closure zero bits. */
#define REG_LOOPCLOSURE_LCR BIT(0) /* Loop Closure Detect Indicator. */
/*---------------- FXS Protocol Commands ----------------------------------*/
@@ -1307,11 +1308,17 @@
xpp_line_t mask = BIT(info->portnum);
xpp_line_t offhook;
- offhook = (val & REG_LOOPCLOSURE_LCR) ? mask : 0;
- LINE_DBG(SIGNAL, xpd, info->portnum,
- "REG_LOOPCLOSURE: dataL=0x%X (offhook=0x%X mask=0x%X\n",
- val, offhook, mask);
- process_hookstate(xpd, offhook, mask);
+ /*
+ * Validate reply. Non-existing/disabled ports
+ * will reply with 0xFF. Ignore these.
+ */
+ if((val & REG_LOOPCLOSURE_ZERO) == 0) {
+ offhook = (val & REG_LOOPCLOSURE_LCR) ? mask : 0;
+ LINE_DBG(SIGNAL, xpd, info->portnum,
+ "REG_LOOPCLOSURE: dataL=0x%X (offhook=0x%X mask=0x%X\n",
+ val, offhook, mask);
+ process_hookstate(xpd, offhook, mask);
+ }
} else {
#if 0
XPD_NOTICE(xpd, "Spurious register reply(ignored): %s reg_num=0x%X, dataL=0x%X dataH=0x%X\n",
More information about the dahdi-commits
mailing list