[zaptel-commits] tzafrir: branch 1.2 r4304 - /branches/1.2/xpp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon May 19 07:17:39 CDT 2008


Author: tzafrir
Date: Mon May 19 07:17:33 2008
New Revision: 4304

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4304
Log:
* 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.

Modified:
    branches/1.2/xpp/.version
    branches/1.2/xpp/Changelog_xpp
    branches/1.2/xpp/card_fxo.c
    branches/1.2/xpp/card_global.c
    branches/1.2/xpp/init_card_4_30

Modified: branches/1.2/xpp/.version
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/.version?view=diff&rev=4304&r1=4303&r2=4304
==============================================================================
--- branches/1.2/xpp/.version (original)
+++ branches/1.2/xpp/.version Mon May 19 07:17:33 2008
@@ -1,1 +1,1 @@
-trunk-r5723
+trunk-r5744

Modified: branches/1.2/xpp/Changelog_xpp
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/Changelog_xpp?view=diff&rev=4304&r1=4303&r2=4304
==============================================================================
--- branches/1.2/xpp/Changelog_xpp (original)
+++ branches/1.2/xpp/Changelog_xpp Mon May 19 07:17:33 2008
@@ -1,6 +1,5 @@
-Tue, 13 May 2008 Oron Peled <oron at actcom.co.il> - xpp.r5723
-  * [A temporary changelog. More to come]
-  * New firmware protocol version: 3.0 .
+Tue, 13 May 2008 Oron Peled <oron at 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 @@
   * 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.

Modified: branches/1.2/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxo.c?view=diff&rev=4304&r1=4303&r2=4304
==============================================================================
--- branches/1.2/xpp/card_fxo.c (original)
+++ branches/1.2/xpp/card_fxo.c Mon May 19 07:17:33 2008
@@ -41,6 +41,12 @@
 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 @@
 	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;

Modified: branches/1.2/xpp/card_global.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_global.c?view=diff&rev=4304&r1=4303&r2=4304
==============================================================================
--- branches/1.2/xpp/card_global.c (original)
+++ branches/1.2/xpp/card_global.c Mon May 19 07:17:33 2008
@@ -96,7 +96,7 @@
 	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;

Modified: branches/1.2/xpp/init_card_4_30
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/init_card_4_30?view=diff&rev=4304&r1=4303&r2=4304
==============================================================================
--- branches/1.2/xpp/init_card_4_30 (original)
+++ branches/1.2/xpp/init_card_4_30 Mon May 19 07:17:33 2008
@@ -227,7 +227,6 @@
 	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 @@
 	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;
+		}
 	}
 }
 




More information about the zaptel-commits mailing list