[svn-commits] mattf: tag 1.2.26 r4329 - in /tags/1.2.26: ./ xpp/ xpp/utils/zconf/Zaptel/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed May 28 12:05:48 CDT 2008
Author: mattf
Date: Wed May 28 12:05:48 2008
New Revision: 4329
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4329
Log:
Merge of revisions 4286, 4304, 4308, and 4314 from branches/1.4
Modified:
tags/1.2.26/README
tags/1.2.26/xpp/.version
tags/1.2.26/xpp/Changelog_xpp
tags/1.2.26/xpp/card_fxo.c
tags/1.2.26/xpp/card_global.c
tags/1.2.26/xpp/init_card_4_30
tags/1.2.26/xpp/utils/zconf/Zaptel/Span.pm
tags/1.2.26/xpp/utils/zconf/Zaptel/Xpp.pm
tags/1.2.26/xpp/xpd.h
tags/1.2.26/xpp/xpp_zap.c
Modified: tags/1.2.26/README
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/README?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/README (original)
+++ tags/1.2.26/README Wed May 28 12:05:48 2008
@@ -315,7 +315,7 @@
* 16: DEBUG_ECHOCAN
* 32: DEBUG_RBS
* 64: DEBUG_FRAMER
- - xpp: Previously (before 1.2.26 / 1.4.12) it was called "print_dbg".
+ - xpp: Previously (before 1.2.26 / 1.4.11) it was called "print_dbg".
See also README.Astribank:
* 1: GENERAL - General debug comments.
* 2: PCM - PCM-related messages. Tend to flood logs.
Modified: tags/1.2.26/xpp/.version
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/.version?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/.version (original)
+++ tags/1.2.26/xpp/.version Wed May 28 12:05:48 2008
@@ -1,1 +1,1 @@
-trunk-r5723
+trunk-r5744
Modified: tags/1.2.26/xpp/Changelog_xpp
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/Changelog_xpp?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/Changelog_xpp (original)
+++ tags/1.2.26/xpp/Changelog_xpp Wed May 28 12:05:48 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.2.26/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/card_fxo.c?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/card_fxo.c (original)
+++ tags/1.2.26/xpp/card_fxo.c Wed May 28 12:05:48 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.2.26/xpp/card_global.c
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/card_global.c?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/card_global.c (original)
+++ tags/1.2.26/xpp/card_global.c Wed May 28 12:05:48 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.2.26/xpp/init_card_4_30
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/init_card_4_30?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/init_card_4_30 (original)
+++ tags/1.2.26/xpp/init_card_4_30 Wed May 28 12:05:48 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;
+ }
}
}
Modified: tags/1.2.26/xpp/utils/zconf/Zaptel/Span.pm
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/utils/zconf/Zaptel/Span.pm?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/utils/zconf/Zaptel/Span.pm (original)
+++ tags/1.2.26/xpp/utils/zconf/Zaptel/Span.pm Wed May 28 12:05:48 2008
@@ -11,6 +11,107 @@
use Zaptel::Utils;
use Zaptel::Chans;
use Zaptel::Xpp::Xpd;
+
+=head1 NAME
+
+Zaptel::Spans - Perl interface to a Zaptel span information
+
+This package allows access from perl to information about a Zaptel
+channel. It is part of the Zaptel Perl package.
+
+A span is a logical unit of Zaptel channels. Normally a port in a
+digital card or a whole analog card.
+
+See documentation of module L<Zaptel> for usage example. Specifically
+C<Zaptel::spans()> must be run initially.
+
+=head1 by_number()
+
+Get a span by its Zaptel span number.
+
+=head1 Span Properties
+
+=head2 num()
+
+The span number.
+
+=head2 name()
+
+The name field of a Zaptel span. E.g.:
+
+ TE2/0/1
+
+=head2 description()
+
+The description field of the span. e.g:
+
+ "T2XXP (PCI) Card 0 Span 1" HDB3/CCS/CRC4 RED
+
+=head2 chans()
+
+The list of the channels (L<Zaptel::Chan> objects) of this span.
+In a scalar context returns the number of channels this span has.
+
+=head2 bchans()
+
+Likewise a list of bchannels (or a count in a scalar context).
+
+=head2 is_sync_master()
+
+Is this span the source of timing for Zaptel?
+
+=head2 type()
+
+Type of span, or "UNKNOWN" if could not be detected. Current known
+types:
+
+BRI_TE, BRI_NT, E1_TE, E1_NT, J1_TE, J1_NT, T1_TE, T1_NT, FXS, FXO
+
+=head2 is_pri()
+
+Is this an E1/J1/T1 span?
+
+=head2 is_bri()
+
+Is this a BRI span?
+
+=head2 is_digital()
+
+Is this a digital (as opposed to analog) span?
+
+=head2 termtype()
+
+Set for digital spans. "TE" or "NT". Will probably be assumed to be "TE"
+if there's no information pointing either way.
+
+=head2 coding()
+
+Suggested sane coding type (e.g.: "hdb3", "b8zs") for this type of span.
+
+=head2 framing()
+
+Suggested sane framing type (e.g.: "ccs", "esf") for this type of span.
+
+=head2 yellow(), crc4()
+
+Likewise, suggestions ofr the respective fields in the span= line in
+zaptel.conf for this span.
+
+=head2 signalling()
+
+Suggested zapata.conf signalling for channels of this span.
+
+=head2 switchtype()
+
+Suggested zapata.conf switchtype for channels of this span.
+
+=head1 Note
+
+Most of those properties are normally used as lower-case functions, but
+actually set in the module as capital-letter propeties. To look at e.g.
+"signalling" is set, look for "SIGNALLING".
+
+=cut
my $proc_base = "/proc/zaptel";
Modified: tags/1.2.26/xpp/utils/zconf/Zaptel/Xpp.pm
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/utils/zconf/Zaptel/Xpp.pm?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/utils/zconf/Zaptel/Xpp.pm (original)
+++ tags/1.2.26/xpp/utils/zconf/Zaptel/Xpp.pm Wed May 28 12:05:48 2008
@@ -173,10 +173,26 @@
=head1 SEE ALSO
-For the documentation of xbus objects, see L<Zaptel::Xpp::Xbus>. For
-information about XPD objects, see L<Zaptel::Xpp::Xpd>.
+=over
-General documentation can be found in the master package L<Zaptel>.
+=item L<Zaptel::Xpp::Xbus>
+
+Xbus (Astribank) object.
+
+=item L<Zaptel::Xpp::Xpd>
+
+XPD (the rough equivalent of a Zaptel span) object.
+
+=item L<Zaptel::Xpp::Line>
+
+Object for a line: an analog port or a time-slot in a adapter.
+Equivalent of a channel in Zaptel.
+
+=item L<Zaptel>
+
+General documentation in the master package.
+
+=back
=cut
Modified: tags/1.2.26/xpp/xpd.h
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/xpd.h?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/xpd.h (original)
+++ tags/1.2.26/xpp/xpd.h Wed May 28 12:05:48 2008
@@ -171,7 +171,7 @@
atomic_t open_counter; /* Number of open channels */
int flags;
- bool blink_mode; /* for visual identification */
+ unsigned long blink_mode; /* bitmask of blinking ports */
#define DEFAULT_LED_PERIOD (1000/8) /* in tick */
#ifdef CONFIG_PROC_FS
Modified: tags/1.2.26/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/tags/1.2.26/xpp/xpp_zap.c?view=diff&rev=4329&r1=4328&r2=4329
==============================================================================
--- tags/1.2.26/xpp/xpp_zap.c (original)
+++ tags/1.2.26/xpp/xpp_zap.c Wed May 28 12:05:48 2008
@@ -622,7 +622,7 @@
BUG_ON(!xpd);
spin_lock_irqsave(&xpd->lock, flags);
- len += sprintf(page + len, "%d\n", xpd->blink_mode);
+ len += sprintf(page + len, "0x%lX\n", xpd->blink_mode);
spin_unlock_irqrestore(&xpd->lock, flags);
if (len <= off+count)
*eof = 1;
@@ -640,7 +640,7 @@
xpd_t *xpd = data;
char buf[MAX_PROC_WRITE];
char *endp;
- unsigned blink;
+ unsigned long blink;
BUG_ON(!xpd);
@@ -654,7 +654,7 @@
blink = simple_strtoul(buf, &endp, 0);
if(*endp != '\0' || blink > 0xFFFF)
return -EINVAL;
- XPD_DBG(GENERAL, xpd, "BLINK channels: 0x%X\n", blink);
+ XPD_DBG(GENERAL, xpd, "BLINK channels: 0x%lX\n", blink);
xpd->blink_mode = blink;
return count;
}
More information about the svn-commits
mailing list