auto_assign_spans is an int and may have legal values other than 1. It
is legal (though pointless) to use: modprobe dahdi auto_assign_spans=3.
Any value != 0 is true.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Fixes a regression introduced in
3572bb5a13 (before 2.7.0) - most of the
dahdi_perl tools will fail for an Astribank with no modules claiming
"No XPDs for '/sys/bus/astribanks/devices/xbus-00'"
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Add '--line-mode=<E1|T1|J1>' option to dahdi_span_types:
- Will first generate a wildcard entry (* *:<type>)
- All later entries will be commented-out.
- Manually uncommenting any of them will create an "override"
(e.g: mixed system with all spans T1, but some E1)
* Now dahdi_genconf does not generate span-types.conf by default:
- Added '--line-mode=<E1|T1|J1>' option to trigger generation
- This parameter will be passed to "dahdi_span_types dumpconfig"
- Also explicit specification of 'spantypes' as an argument will
trigger a similar generation (with a default of 'E1').
- The line-mode may also be passed to the generator directly
with identical results. Example:
dahdi_genconf spantypes=line-mode=T1
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>
This is a documentation change, that hopefully will help until I can remember
the names of the new generators.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
A sane value for span-types.conf is either "all E1" or "all T1". Either
way it is not hardware-dependent, and hence no point in regenerating on
when the hardware changes.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
All new dahdi tools and utilities will be prefixed with "dahdi_" in order to
avoid any future conflicts with other packages.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>
If you installed dahdi tools and did not specify DAHDI_PINNED=yes on the
makefile, when you run dahdi_genconf you would get an error like the following:
# dahdi_genconf
sh: span_types: command not found
Command failed (status=32512): 'span_types dumpconfig > /etc/dahdi/span-types.conf' at ...
This change allows the generator for span-types.conf and span-assignements.conf
check for the existence of the utilities before attempting to call them.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
* If xpp.dahdi_autoreg parameter is 'Y' -- Skip actuall registration.
* If dahdi.auto_assign_spans is '0' and there's no /etc/dahdi/pinned-spans.conf
Than use 'span_assignments auto ...' to assign device spans.
* Since dahdi_registration iterate in correct xpp_order, the span
assignment logic provides migration path for users who did not
generate their pinned-spans.conf configuration yet.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
One line change to re-include a missing header
Reported-By: Anthony Messina
Internal-Issue-ID: DAHTOOL-60
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
* This xusb_spec:
- Is a dummy struct used for this xusb instance only.
- Is now passed by reference from caller.
- So caller now manage the life cycle of this struct
* Also, demote one INFO() to DBG() (library should not print
on its own)
* Also minor fix to DBG() output of spec initialization (leading 0)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Origin: Xorcom xtalk (r9303)
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10711 17933a7a-c749-41c5-a318-cba88f637d49
xtalk: dump_packet() may now be used without debug flags by passing
mask == 0.
Origin: Xorcom xtalk (r9302)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10710 17933a7a-c749-41c5-a318-cba88f637d49
Adding the TE820 vendor and device ID into PCI.pm allows dahdi_hardware to
recognize the card.
Reported-by: Xavier Hienne
Internal-Issue-ID: DAHTOOL-58
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10680 17933a7a-c749-41c5-a318-cba88f637d49
When running the astribank_hook (only on Astribanks, in XPP_HOTPLUG_DAHDI
mode), wait for all other Astribanks to create all the required device
files.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10585 17933a7a-c749-41c5-a318-cba88f637d49
* It was replaced long ago by astribank_hexload/astribank_tool/astribank_allow
* It hasn't been used for several releases now, nor updated.
* Time to move into the eternal bit-bucket.
* Left (very) few strings as a tribute...
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10504 17933a7a-c749-41c5-a318-cba88f637d49
* License strings markers (BEGIN.../END...) can be customized
* By default, generate a "generic" license markers
* We accept any (paired) markers from the valid list
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10502 17933a7a-c749-41c5-a318-cba88f637d49
* In MPP serial protocol add support for SER_STAT_GET command
* Use it to query firmware for:
- FPGA build configuration number (1 - old main, 2 - new main)
- Watchdog timer state bit (ready/expired)
- XPD Alive timer state bit (yes/no)
* Also cleanup the code in mpps_card_info():
- In all MPP serial commands the send/recive buffers must
have identical size
- No need to alias struct pointers to byte-buffers, just use
the structs themselves as buffers.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10501 17933a7a-c749-41c5-a318-cba88f637d49
* I/O errors of the device were not propagated up by echo_loader
* As a result, Octasic load failure did not prevented USB renumeration
* Make consistent return values:
- In our functions: ret < 0 is error
- In Octasic functions (UINT32): return Octasic error codes
* All error paths prints error messages (so we see how the error propagates)
* Also changed error order testing in init_octasic():
Return status should be tested before the values of by-reference parameters
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10499 17933a7a-c749-41c5-a318-cba88f637d49
* Define new macros AB_INFO(), AB_ERR() that prefix their message
with the astribank information (usb device + serial number)
* Replace all INFO()/ERR() messages in echo_loader.c with the new macros
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10498 17933a7a-c749-41c5-a318-cba88f637d49
* Replaced (almost) all $LOGGER to echo:
- In interactive use -- that what we want anyway
- When called from UDEV, the subprocess stdout/stderr is piped to
$LOGGER anyway (at the end of the script)
- No need for many $LOGGER instances (each with its own pid)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10495 17933a7a-c749-41c5-a318-cba88f637d49
With /proc/xpp code removed, some cleanup can be done.
* No need to search alternative attribute names, so xbus_attr_path() is
redundant.
* Don't compose xbus sysfs directory in multiple code locations.
Do it once in Xbus->new() and use the result ($xbus->sysfs_dir)
* Pass XPD directory strings directly to Xpd->new()
- So we parse it for unit/subunit only in Xpd->new()
* Don't parse xbus sysfs name:
- Toplevel scan, pass it as is to Xbus->new()
- Xbus->new() deduce the xbus->num from the naming
of Xpd's inside (nnⓂ️k) -- this is a hack until
we add xbus number as an xbus sysfs attribute
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10494 17933a7a-c749-41c5-a318-cba88f637d49
* All references to old /proc/xpp interface were removed.
* Everything is now done via sysfs
Information has been available from /sys/bus/astribanks since before
Dahdi-linux 2.2 .
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10492 17933a7a-c749-41c5-a318-cba88f637d49
* Extrainfo field contains junk data
* Caused by:
- The field is initialized to 0xFF values
- There was no null termination (and no room to add it)
* New code:
- Ensure that show_extrainfo() have null termination even if EEPROM
field is full.
- Replace trailing 0xFF characters with '\0' when reading this field
- Since our default burned EEPROM contain Extrainfo field full of
0xFF characters, this would make them look as null filled.
Internal Issue-Id: #1341
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10491 17933a7a-c749-41c5-a318-cba88f637d49
* Fix an issue due to long firmware load time:
- When one Astribank has an echo canceler (long firmware loading) and
and another one does not.
- The EC-less Astribank finishes initialization before the Astribank
with EC is detected.
- Thus waitfor_xpds terminates too early.
* We now iteratively build two sets of serial numbers:
- One from wha we see in all Xorcom (e4e4:11[3456]x) USB devices.
- The other is those that were detected in the driver.
- Only when the two sets are equal (and > 0) we know we are done.
- This is resilient to many problems (e.g: disconnect/reconnect of
same device during initialization).
* The progress output was also improved: Now each detected AB
show the total number so far.
* The timeout was also increased to 100sec
* Woraround for an Astribank with no serial (but just a single one on
the system).
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10465 17933a7a-c749-41c5-a318-cba88f637d49
Two extra USB product IDs used in some odd maintenance scenarios.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10368 17933a7a-c749-41c5-a318-cba88f637d49
* Avoid a duplicated run of udev on some systems.
* Fix usage of astribank_tool's output.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10366 17933a7a-c749-41c5-a318-cba88f637d49
USB_RECOV.hex is an extra firmware that may be useful for recovering
from certain Astribank hardware faults in some scenarios. This adds
support for either loading it manually
('/usr/share/dahdi/xpp_fxloader recover-sb') or through udev, *if*
the required udev rules were set on the system.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10349 17933a7a-c749-41c5-a318-cba88f637d49