diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2009-03-19 20:08:29 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2009-03-19 20:08:29 +0000 |
commit | d8562c778088ff6ab3383df5ceead41eff4bf124 (patch) | |
tree | 43e394ae225fd7183018c2ae08d3fb1e5bcb12cb /kernel/xpp/utils/zt_registration | |
parent | b6b3226735f5e3b3fb000fa92daa7a574265c817 (diff) |
xpp: a massive backport from DAHDI. From Xorcom branch-rel-6839-r6908 .
Sun Mar 1 2009 Oron Peled <oron@actcom.co.il> - xpp.r6795
* 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.
Mon, Dec 8 2008 Oron Peled <oron@actcom.co.il> - xpp.r6430
* PRI:
- Match our span clocking priorities (in system.conf)
to Digium -- this is a reversal of the previous state.
Now lower numbers (greater than 0) are better.
- Synchronization fixes for PRI ports other than 0.
- Fix T1 CRC for some countries (e.g: China).
* FXS: fix bug in VMWI detection if using old asterisk
which does not provide ZT_VMWI ioctl().
* FXO:
- Improve caller_id_style module parameter. This provide a workaround
for countries that send this information without any notification
(reverse polarity, ring, etc.)
- Don't force on-hook upon power-denial. So, loopstart devices
would ignore these as expected.
* Implement a flow-control to prevent user space (init_card_* scripts)
from pressuring our command queue.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4631 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/xpp/utils/zt_registration')
-rwxr-xr-x | kernel/xpp/utils/zt_registration | 69 |
1 files changed, 53 insertions, 16 deletions
diff --git a/kernel/xpp/utils/zt_registration b/kernel/xpp/utils/zt_registration index 3bdc642..4ae5a66 100755 --- a/kernel/xpp/utils/zt_registration +++ b/kernel/xpp/utils/zt_registration @@ -15,11 +15,26 @@ use Zaptel; use Zaptel::Span; use Zaptel::Xpp; use Zaptel::Xpp::Xbus; +use Getopt::Std; sub usage { die "Usage: $0 [on|off|1|0]\n"; } +my %opts; +getopts('s:', \%opts); + +my $sort_order = $opts{s} || $ENV{XBUS_SORT} || 'SORT_CONNECTOR'; +my $sorter = Zaptel::Xpp::sorters($sort_order); + +if(!defined $sorter) { + my @sorter_names = Zaptel::Xpp::sorters; + print STDERR "Unknown sort order $sort_order. Select from:\n\t"; + print STDERR join("\n\t", @sorter_names); + print STDERR "\n"; + exit 1; +} + @ARGV == 0 or @ARGV == 1 or usage; my $on = shift; my $verbose = 0; @@ -42,7 +57,7 @@ sub myprintf { my @spans = Zaptel::spans; -foreach my $xbus (Zaptel::Xpp::xbuses('SORT_CONNECTOR')) { +foreach my $xbus (Zaptel::Xpp::xbuses($sorter)) { myprintf "%-10s\t%s\t%s\n", $xbus->name, $xbus->label, $xbus->connector; next unless $xbus->status eq 'CONNECTED'; foreach my $xpd ($xbus->xpds()) { @@ -61,6 +76,7 @@ foreach my $xbus (Zaptel::Xpp::xbuses('SORT_CONNECTOR')) { myprintf "%3s ==> %3s\n", state2str($prev), state2str($on); } } +myprintf "# Sorted: $sort_order\n"; __END__ @@ -70,7 +86,7 @@ zt_registration - Handle registration of Xorcom XPD modules in zaptel. =head1 SYNOPSIS -zt_registration [on|off] +zt_registration [-s sortorder] [on|off] =head1 DESCRIPTION @@ -90,25 +106,46 @@ off -- deregisters all XPD's from zaptel. on -- registers all XPD's to zaptel. +=head2 Options + +=over + +=item -s I<sort_order> + +The sort order to use. + +=back + +If the option is not used, the sort order is taken from the environment +variable XBUS_SORT and failing that: the hard-coded default of +SORT_CONNECTOR. + +The available sorting orders are documented in Zaptel::Xpp manual. + + + =head2 Sample Output An example of the output of zt_registration for some registered Astribanks: - $ zt_registration - XBUS-02 [] usb-0000:00:1d.7-4 - XBUS-00/XPD-00: on Span 1 - XBUS-00/XPD-10: on Span 2 - XBUS-00 [usb:00000126] usb-0000:00:1d.7-2 - XBUS-02/XPD-00: on Span 3 - XBUS-02/XPD-10: on Span 4 - XBUS-02/XPD-20: on Span 5 - XBUS-02/XPD-30: on Span 6 - XBUS-01 [usb:00000128] usb-0000:00:1d.7-1 - XBUS-01/XPD-00: on Span 7 - XBUS-01/XPD-10: on Span 8 - XBUS-01/XPD-20: on Span 9 - XBUS-01/XPD-30: on Span 10 + $ zt_registration -s type + XBUS-01 usb:0000153 usb-0000:00:10.4-2 + XBUS-01/XPD-00: on Span 1 + XBUS-01/XPD-01: on Span 2 + XBUS-00 usb:0000157 usb-0000:00:10.4-4 + XBUS-00/XPD-00: on Span 3 + XBUS-00/XPD-01: on Span 4 + XBUS-00/XPD-02: on Span 5 + XBUS-00/XPD-03: on Span 6 + XBUS-00/XPD-04: on Span 7 + XBUS-00/XPD-05: on Span 8 + XBUS-00/XPD-06: on Span 9 + XBUS-00/XPD-07: on Span 10 + XBUS-02 usb-0000:00:10.4-1 + XBUS-02/XPD-00: on Span 11 + XBUS-02/XPD-10: on Span 12 + # Sorted: type =head1 FILES |