[zaptel-commits] mattf: tag 1.4.11 r4324 - /tags/1.4.11/kernel/xpp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed May 28 11:39:09 CDT 2008


Author: mattf
Date: Wed May 28 11:39:08 2008
New Revision: 4324

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4324
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:
    tags/1.4.11/kernel/xpp/.version
    tags/1.4.11/kernel/xpp/Changelog_xpp
    tags/1.4.11/kernel/xpp/card_fxo.c
    tags/1.4.11/kernel/xpp/card_global.c
    tags/1.4.11/kernel/xpp/init_card_4_30

Modified: tags/1.4.11/kernel/xpp/.version
URL: http://svn.digium.com/view/zaptel/tags/1.4.11/kernel/xpp/.version?view=diff&rev=4324&r1=4323&r2=4324
==============================================================================
--- tags/1.4.11/kernel/xpp/.version (original)
+++ tags/1.4.11/kernel/xpp/.version Wed May 28 11:39:08 2008
@@ -1,1 +1,1 @@
-trunk-r5723
+trunk-r5744

Modified: tags/1.4.11/kernel/xpp/Changelog_xpp
URL: http://svn.digium.com/view/zaptel/tags/1.4.11/kernel/xpp/Changelog_xpp?view=diff&rev=4324&r1=4323&r2=4324
==============================================================================
--- tags/1.4.11/kernel/xpp/Changelog_xpp (original)
+++ tags/1.4.11/kernel/xpp/Changelog_xpp Wed May 28 11:39:08 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: tags/1.4.11/kernel/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/tags/1.4.11/kernel/xpp/card_fxo.c?view=diff&rev=4324&r1=4323&r2=4324
==============================================================================
--- tags/1.4.11/kernel/xpp/card_fxo.c (original)
+++ tags/1.4.11/kernel/xpp/card_fxo.c Wed May 28 11:39:08 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: tags/1.4.11/kernel/xpp/card_global.c
URL: http://svn.digium.com/view/zaptel/tags/1.4.11/kernel/xpp/card_global.c?view=diff&rev=4324&r1=4323&r2=4324
==============================================================================
--- tags/1.4.11/kernel/xpp/card_global.c (original)
+++ tags/1.4.11/kernel/xpp/card_global.c Wed May 28 11:39:08 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: tags/1.4.11/kernel/xpp/init_card_4_30
URL: http://svn.digium.com/view/zaptel/tags/1.4.11/kernel/xpp/init_card_4_30?view=diff&rev=4324&r1=4323&r2=4324
==============================================================================
--- tags/1.4.11/kernel/xpp/init_card_4_30 (original)
+++ tags/1.4.11/kernel/xpp/init_card_4_30 Wed May 28 11:39:08 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