diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-19 12:42:19 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-19 12:42:19 +0000 |
commit | 619379a49371ac44c87a89e237bb7f60c841d23a (patch) | |
tree | 9207951e6474eb627744f159b58cb0ef7d41cb34 /kernel/xpp | |
parent | dd3fad8de5df2f25630d66154f209b6b7cbf4049 (diff) |
* Zaptel-1.2.x does not have zt_alarm_channel(). Move up the backward
compatibility kludge so it actually affect code (failed compilation on
zaptel-1.2 from Digium without (Closes issue #12654 ).
* Cleanup a compile warning in xpp/card_global.c .
* Fix regression in PRI init script (case of less than 4 modules).
* Update changelog and bump version.
Merged revisions 4304 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4305 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/xpp')
-rw-r--r-- | kernel/xpp/.version | 2 | ||||
-rw-r--r-- | kernel/xpp/Changelog_xpp | 18 | ||||
-rw-r--r-- | kernel/xpp/card_fxo.c | 10 | ||||
-rw-r--r-- | kernel/xpp/card_global.c | 2 | ||||
-rwxr-xr-x | kernel/xpp/init_card_4_30 | 14 |
5 files changed, 28 insertions, 18 deletions
diff --git a/kernel/xpp/.version b/kernel/xpp/.version index 27a9d19..e39d44b 100644 --- a/kernel/xpp/.version +++ b/kernel/xpp/.version @@ -1 +1 @@ -trunk-r5723 +trunk-r5744 diff --git a/kernel/xpp/Changelog_xpp b/kernel/xpp/Changelog_xpp index 52db601..348bc1c 100644 --- a/kernel/xpp/Changelog_xpp +++ b/kernel/xpp/Changelog_xpp @@ -1,6 +1,5 @@ -Tue, 13 May 2008 Oron Peled <oron@actcom.co.il> - xpp.r5723 - * [A temporary changelog. More to come] - * New firmware protocol version: 3.0 . +Tue, 13 May 2008 Oron Peled <oron@actcom.co.il> - xpp.r5744 + * New firmware protocol version: 30 * New numbers for the device types: (e.g. in card_init* scripts) - FXS: 1 (was: 3) - FXO: 2 (was: 4) @@ -9,15 +8,22 @@ Tue, 13 May 2008 Oron Peled <oron@actcom.co.il> - xpp.r5723 * Init scripts of FXS and FXO modules are now written in Perl as well (be sure to have File::Basename, e.g: perl-modules in Debian). * calibrate_slics merged into init_card_1_30 . - * Module parameter print_dbg replaced with debug . Same meaning. + * Each of the init_card_* scripts now runs no more than once per card even + if this card represents several XPD's (e.g: quad PRI, BRI). This means + maximum of 4 script runs per Astribank. + * Zaptel registration now briefly flash all LED's (not just the green ones as + before). + * Module parameter print_dbg was renamed to debug for consistency with + the rest of zaptel. * init_fxo_modes removed: content moved into init_card_2_30, verified at build time. + * FXO: removed polling for power-denial. New firmware notifies us. * Code tested with sparse. Most warnings were fixed. * Set ZT_SIG_DACS for the bchans in the PRI and BRI modules to not get ignored by ztscan. - * Handle null config_desc we get from some crazy USB controllers. + * fpga_load: Handle null config_desc we get from some crazy USB controllers. * genzaptelconf: Fix reporting of empty slots in list mode. - * xpp_blink can now blink a single analog port. + * xpp_blink can now blink the led of a single analog port. * "slics" has been renamed "chipregs". * Fixed a small typo in fpga_load(8). * Fixed bashism in xpp_fxloader. diff --git a/kernel/xpp/card_fxo.c b/kernel/xpp/card_fxo.c index 0bb30ff..2e48dca 100644 --- a/kernel/xpp/card_fxo.c +++ b/kernel/xpp/card_fxo.c @@ -41,6 +41,12 @@ static DEF_PARM(uint, poll_metering_interval, 500, 0644, "Poll metering interval static DEF_PARM(int, ring_debounce, 50, 0644, "Number of ticks to debounce a false RING indication"); static DEF_PARM(int, caller_id_style, 0, 0444, "Caller-Id detection style: 0 - [BELL], 1 - [BT], 2 - [PASS]"); +/* Backward compatibility plug */ +#ifndef ZT_GET_PARAMS_V1 +#define zt_alarm_channel(a,b) zt_qevent_lock(a,( (b)==ZT_ALARM_NONE )? \ + ZT_EVENT_NOALARM : ZT_EVENT_ALARM) +#endif + enum cid_style { CID_STYLE_BELL = 0, /* E.g: US (Bellcore) */ CID_STYLE_ETSI_POLREV = 1, /* E.g: UK (British Telecom) */ @@ -826,10 +832,6 @@ HANDLER_DEF(FXO, SIG_CHANGED) return 0; } -#ifndef ZT_GET_PARAMS_V1 -#define zt_alarm_channel(a,b) zt_qevent_lock(a,( (b)==ZT_ALARM_NONE )? \ - ZT_EVENT_NOALARM : ZT_EVENT_ALARM) -#endif static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno) { struct FXO_priv_data *priv; diff --git a/kernel/xpp/card_global.c b/kernel/xpp/card_global.c index 091ceaf..7a3d101 100644 --- a/kernel/xpp/card_global.c +++ b/kernel/xpp/card_global.c @@ -96,7 +96,7 @@ static int execute_chip_command(xpd_t *xpd, const int argc, char *argv[]) bool writing; int op; /* [W]rite, [R]ead */ int addr_mode; /* [D]irect, [I]ndirect, [Mm]ulti */ - bool do_indirect; + bool do_indirect = 0; int regnum; int subreg; int data_low; diff --git a/kernel/xpp/init_card_4_30 b/kernel/xpp/init_card_4_30 index 872c695..25e6ec7 100755 --- a/kernel/xpp/init_card_4_30 +++ b/kernel/xpp/init_card_4_30 @@ -227,7 +227,6 @@ sub port_setup($) { my $LIM1_RL = 0 << 1; # RL (Remote Loopback) my $lim1 = 0xB0 | $LIM1_RL; - main::select_subunit($portno); PRI::gen "$portno WD 26 F6"; # XPM0: Pulse Shape Programming for R1=18Ohms PRI::gen "$portno WD 27 02"; # XPM1: ...3V Pulse Level at the line (Vp-p=6v) PRI::gen "$portno WD 28 00"; # XPM2: ~XLT (transmit line is not in the high impedance state) @@ -356,23 +355,26 @@ sub main() { my @ports; my $subunit; - logit "main(): Initializing chip"; + logit "main(): Initializing chip ($ENV{UNIT_SUBUNITS} ports)"; PRI::init_quad; - for($subunit = 0; $subunit < $ENV{UNIT_SUBUNITS}; $subunit++) { + # Must initialize all 4 ports, regardless how much there are + for($subunit = 0; $subunit < 4; $subunit++) { my $is_nt = 0; - main::select_subunit($subunit); #logit "main(): Initializing subunit $subunit is_nt=$is_nt"; my $p = PRI::Port->new( 'PORT_NUM' => $subunit, - 'PRI_NT' => $is_nt + 'PRI_NT' => $is_nt, + 'EXIST' => ($subunit < $ENV{UNIT_SUBUNITS}) ); $p->port_setup; push(@ports, $p); } PRI::finish_quad; foreach my $p (@ports) { - $p->write_pri_info; + if($p->{EXIST}) { + $p->write_pri_info; + } } } |