diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-01 13:56:23 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-01 13:56:23 +0000 |
commit | 7e6e55bbdcd0224bf07de8dd47e4f7a92e7d097f (patch) | |
tree | 34c04ea112c9587bbad7e0593119c09a53c43466 /drivers/dahdi/xpp/card_fxo.c | |
parent | ac9297570200f1f21dff01043baabdba90516722 (diff) |
New XPP code: xpp rev 6795:
* Fix cases where the command_queue overflowed during initialization.
- Also add a 'command_queue_length' parameter to xpp.ko
* More migrations to sysfs:
- Add a 'transport' attribute to our astribank devices which
points to the usb device we use. E.g:
/sys/bus/astribanks/devices/xbus-00/transport is symlinked to
../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4
- Move /proc/xpp/XBUS-??/XPD-??/span to
/sys/bus/xpds/devices/??:?:?/span
- Migrate from /proc/xpp/sync to:
/sys/bus/astribanks/drivers/xppdrv/sync
- New 'offhook' attribute in:
/sys/bus/xpds/devices/??:?:?/offhook
* PRI: change the "timing" priority to match the convention used by
other PRI cards -- I.e: lower numbers (not 0) have higher
priority.
* FXO:
- Power denial: create two module parameters instead of hard-coded
constants (power_denial_safezone, power_denial_minlen).
For sites that get non-standard power-denial signals from central
office on offhook.
- Don't hangup on power-denial, just notify Dahdi and wait for
- Fix caller-id detection for the case central office sends it before
first ring without any indication before.
Asterisk's desicion.
* USB_FW.hex:
- Fixes cases where firmware loading would fail.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6046 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_fxo.c')
-rw-r--r-- | drivers/dahdi/xpp/card_fxo.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index 61ea204..93b5f5b 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -194,6 +194,7 @@ static void reset_battery_readings(xpd_t *xpd, lineno_t pos) priv->nobattery_debounce[pos] = 0; priv->power_denial_delay[pos] = 0; + power_change(xpd, pos, POWER_UNKNOWN); } static const int led_register_mask[] = { BIT(7), BIT(6), BIT(5) }; @@ -357,7 +358,6 @@ static int do_sethook(xpd_t *xpd, int pos, bool to_offhook) if(to_offhook) { priv->power_denial_safezone[pos] = power_denial_safezone; } else { - power_change(xpd, pos, POWER_UNKNOWN); priv->power_denial_length[pos] = 0; priv->power_denial_safezone[pos] = 0; } @@ -664,7 +664,7 @@ static void handle_fxo_power_denial(xpd_t *xpd) continue; } if(priv->power_denial_safezone[i] > 0) { - if(--priv->power_denial_safezone[i]) { + if(--priv->power_denial_safezone[i] == 0) { /* * Poll current, previous answers are meaningless */ @@ -912,8 +912,7 @@ static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno) if(milliseconds > BAT_DEBOUNCE) { LINE_DBG(SIGNAL, xpd, portno, "BATTERY OFF voltage=%d\n", volts); priv->battery[portno] = BATTERY_OFF; - if(SPAN_REGISTERED(xpd)) - dahdi_report_battery(xpd, portno); + dahdi_report_battery(xpd, portno); /* What's the polarity ? */ priv->polarity[portno] = POL_UNKNOWN; priv->polarity_debounce[portno] = 0; @@ -931,8 +930,7 @@ static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno) if(priv->battery[portno] != BATTERY_ON) { LINE_DBG(SIGNAL, xpd, portno, "BATTERY ON voltage=%d\n", volts); priv->battery[portno] = BATTERY_ON; - if(SPAN_REGISTERED(xpd)) - dahdi_report_battery(xpd, portno); + dahdi_report_battery(xpd, portno); } } #if 0 |