dahdi/tools.git
2 years agoxpp: README: hwid attribute of the xpd sysfs node
Tzafrir Cohen [Tue, 21 Mar 2017 15:53:01 +0000 (17:53 +0200)]
xpp: README: hwid attribute of the xpd sysfs node

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2 years agoxpp_fxloader: Also load PIC of FXS module type 6
Dima Stoliarov [Tue, 7 Feb 2017 09:42:16 +0000 (11:42 +0200)]
xpp_fxloader: Also load PIC of FXS module type 6

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2 years agoxpp: run xpp_sync when an Astribank is connected
Tzafrir Cohen [Wed, 22 Feb 2017 10:15:22 +0000 (12:15 +0200)]
xpp: run xpp_sync when an Astribank is connected

This was originally done in the init script after all Astribanks were
connected. But now there is no single point in the startup sequence
where we can guarantee all of them were loaded.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2 years agoDon't install xtalk_send
Tzafrir Cohen [Tue, 15 Nov 2016 13:39:28 +0000 (15:39 +0200)]
Don't install xtalk_send

xtalk_send is a helper tool for xtalk, a low-level libary used by some
Xorcom DAHDI userspace tools. It is hardly needed by most people.

2 years agoTypos. Mostly by Lintian
Tzafrir Cohen [Sun, 26 Jun 2016 20:54:07 +0000 (22:54 +0200)]
Typos. Mostly by Lintian

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agobuild fix: external CFLAGS are ignored
Oron Peled [Sun, 6 Mar 2016 10:26:20 +0000 (12:26 +0200)]
build fix: external CFLAGS are ignored

* When passing CFLAGS to ./configure, they are ignored.
* The reason is that in Makefile.am CFLAGS are clobbered.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: perl man pages: Perl may be upper case v2.11.1 v2.11.1-rc1
Tzafrir Cohen [Wed, 17 Feb 2016 15:40:54 +0000 (17:40 +0200)]
xpp: perl man pages: Perl may be upper case

In file's output Perl scripts may be 'awk or perl script',
'/usr/bin/perl script' or 'Perl script' (with some minor variants). The
latter was not detected by current code and thus perld man pages were
not created.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agolink libtonezone directly to libm
Oron Peled [Mon, 28 Dec 2015 17:34:39 +0000 (19:34 +0200)]
link libtonezone directly to libm

* Now we properly '-lm' to libtonezone itself.
  Tools that link with libtonezone get it automatically without having
  to individually link it.
  - dahdi_cfg historically needed -lm, but no longer does.

* Also use "autoscan" to refresh "configure.ac":
  - Added missing tests
  - Move AC_CHECK_HEADERS() to their correct location (before testing
    libraries).
* Fixes the following (on Ubuntu-14.04):
      CCLD     dahdi_cfg
    ./.libs/libtonezone.so: undefined reference to `sin'
    ./.libs/libtonezone.so: undefined reference to `cos'
    ./.libs/libtonezone.so: undefined reference to `pow'
    collect2: error: ld returned 1 exit status
    make[2]: *** [dahdi_cfg] Error 1

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoRemove rcsid: Unused since move to Git
Tzafrir Cohen [Tue, 26 Jan 2016 13:12:30 +0000 (15:12 +0200)]
Remove rcsid: Unused since move to Git

* While technically Git can support $ID keywords, in practice they are not
  used.
* GCC now give a warning about ''rcsid' defined but not used' for some
  of those.

Let's just remove the unused rcsid.

3 years agoxpp: move tools man-pages into PBX_USB conditional v2.11.0
Oron Peled [Sun, 13 Dec 2015 13:41:12 +0000 (15:41 +0200)]
xpp: move tools man-pages into PBX_USB conditional

* Otherwise, they pull compilation of xpp tools via implicit rules.
* This breaks build without libusb/libusbx
* To test this scenario:
    ./configure .... --without-libusb --without-libusbx

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

3 years agoconfigure.ac: remove unused PKG_CONFIG_LIBUSB
Oron Peled [Sun, 13 Dec 2015 13:41:11 +0000 (15:41 +0200)]
configure.ac: remove unused PKG_CONFIG_LIBUSB

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

3 years agodahdi_cfg: -S has assumtions on system.conf order
Tzafrir Cohen [Mon, 16 Nov 2015 13:01:52 +0000 (15:01 +0200)]
dahdi_cfg: -S has assumtions on system.conf order

dahdi_cfg's -S (apply only to a specific span) uses the array chan2span
to map channel numbers to span numbers.

The problem is that it assumes that channels first appear in system.conf
immediately after the span line of a specific span. Thus the following
configuration breaks it:

span=1,...
span=2,...
clear=1-2,4-5
dchan=3,6

The best fix for that is to require -C to be used when -S is used (which
is already the case in our udev hooks).

Fixes DAHTOOL-69.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: refactor manual pages out of conditionals
Oron Peled [Mon, 11 May 2015 11:10:02 +0000 (14:10 +0300)]
xpp: refactor manual pages out of conditionals

* So they are always included in 'make dist' even if PBX_USB is false.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: Move astribank_license to libastribank
Oron Peled [Mon, 11 May 2015 11:08:51 +0000 (14:08 +0300)]
xpp: Move astribank_license to libastribank

* So it's available to all utilities

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: allow XTALK_OPTIONS from a file
Oron Peled [Mon, 22 Dec 2014 18:32:33 +0000 (20:32 +0200)]
xpp: allow XTALK_OPTIONS from a file

* The file is defined as XTALK_OPTIONS_FILE (/etc/dahdi/xpp.conf):
  - Lines beginning with '#' are skipped.
  - Line beginning with "XTALK_OPTIONS" are used.
  - Anything after whitespaces (with optional "=" characters) is part
    of the value.

* An environment variable named "XTALK_OPTIONS" may override file contents.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoconfigure.ac: xpp: now libusbx is the default
Oron Peled [Mon, 22 Dec 2014 14:06:25 +0000 (14:06 +0000)]
configure.ac: xpp: now libusbx is the default

* Fallback to old libusb-0.1 if libusbx isn't found.
* Can force either: --{with,without}-{libusb,libusbx}

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: strict compilation flags in oct612x/
Oron Peled [Sun, 21 Dec 2014 16:26:29 +0000 (11:26 -0500)]
xpp: strict compilation flags in oct612x/

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: don't use USB "clear-halt" by default
Oron Peled [Mon, 15 Dec 2014 16:15:28 +0000 (11:15 -0500)]
xpp: don't use USB "clear-halt" by default

* Problematic with USB3 controllers

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: xtalk -- no private status range
Oron Peled [Mon, 15 Dec 2014 16:14:21 +0000 (11:14 -0500)]
xpp: xtalk -- no private status range

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: migrate everything to libxtalk
Oron Peled [Sun, 21 Dec 2014 19:58:03 +0000 (14:58 -0500)]
xpp: migrate everything to libxtalk

 * Build new libxtalk as local convenience library
 * Have new mpptalk.[ch] and astribank.[ch] wrap the new API
 * Modify all tools to use the new API

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: add all base libxtalk files
Oron Peled [Sun, 21 Dec 2014 15:39:19 +0000 (10:39 -0500)]
xpp: add all base libxtalk files

* Do not remove yet the old ones.
* So new files are built, but not used yet.
* Build as a "noinst_" convenience library.
* Also, compile with '-Wno-unknown-pragmas' because we use some pragmas.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoconfigure.ac: add libusb/libusbx support (for xpp)
Oron Peled [Mon, 15 Dec 2014 11:40:14 +0000 (06:40 -0500)]
configure.ac: add libusb/libusbx support (for xpp)

* Use pkg-config
* For tight control have: --with-libusbx, --with-libusb
  - For now, we choose libusb (AKA libusb-0.1)
  - After committing support for libusbx (AKA libusb-1.0)
    we'll change the default.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: automake: cleanup $man_MANS handling
Oron Peled [Mon, 25 May 2015 15:24:25 +0000 (15:24 +0000)]
xpp: automake: cleanup $man_MANS handling

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp.rules: increase xpp_fxloader timeout to 180s
Tzafrir Cohen [Sun, 25 Oct 2015 17:08:30 +0000 (19:08 +0200)]
xpp.rules: increase xpp_fxloader timeout to 180s

Allow firmware loading to take much longer (up to 180 seconds) before
it is killed. The default timeout is 30 seconds.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoignore: dahdi_pcap and .version
Tzafrir Cohen [Tue, 3 Nov 2015 09:15:40 +0000 (11:15 +0200)]
ignore: dahdi_pcap and .version

.version is generated in the git tree.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

3 years agomake_version: cut off slashes in git
Tzafrir Cohen [Wed, 21 Oct 2015 09:08:41 +0000 (12:08 +0300)]
make_version: cut off slashes in git

If we are based on a git tag with a name (such as 'upstream/2.10.2'),
remove everything up to the slash.

While we're at it, remove a leading '1%' that gets into the version
string as part of the version tag (a Debian version with an epoch: '1:'
is converted to '1%').

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

3 years agoMakefile: build asciidoc with TZ=UTC
Tzafrir Cohen [Tue, 18 Aug 2015 21:42:05 +0000 (23:42 +0200)]
Makefile: build asciidoc with TZ=UTC

In order to support a reproducable build, always run asciidoc with the
timezone UTC. This makes sure that the time shown in the file will be
the same, regardless of the location from which it is run.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agowcb4xxp: Adds support for b43x/b23x products v2.11.0-rc1
Russ Meyerriecks [Mon, 26 Oct 2015 21:51:50 +0000 (16:51 -0500)]
wcb4xxp: Adds support for b43x/b23x products

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

3 years agoxpp: bugfix: waitfor_xpds twinstar, auto_assign_spans
Oron Peled [Mon, 13 Jul 2015 16:09:42 +0000 (19:09 +0300)]
xpp: bugfix: waitfor_xpds twinstar, auto_assign_spans

Exposed in twinstar setups where dahdi has auto_assign_spans=1:
* We start configuration with an empty /etc/dahdi/xpp_order
* If "XPP_HOTPLUG_DAHDI=yes", the astribank_hook removes
  the asterisk_is_starting semaphore too early.
* There's no point in waiting for non-existant or empty /etc/dahdi/xpp_order

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoREADME: document the need for autoreconf
Tzafrir Cohen [Fri, 26 Jun 2015 22:55:02 +0000 (01:55 +0300)]
README: document the need for autoreconf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

3 years agoxpp: Fix a logical not being applied to the wrong operand
Russ Meyerriecks [Wed, 17 Jun 2015 16:36:16 +0000 (11:36 -0500)]
xpp: Fix a logical not being applied to the wrong operand

gcc 5 found this with the new -Werror=logical-not-parenthesis warning. Since we
have -Wall by default, it would also fail the compile.

Internal-Issue-ID: DAHLIN-347

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

4 years agoForce-link libtonezone.so.2.0 on make install
Tzafrir Cohen [Sun, 14 Jun 2015 13:27:51 +0000 (16:27 +0300)]
Force-link libtonezone.so.2.0 on make install

Use ln -sf to create libtonezone.so.2.0 on the install target

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoA placeholder for the m4 directory
Tzafrir Cohen [Tue, 2 Jun 2015 11:41:34 +0000 (14:41 +0300)]
A placeholder for the m4 directory

The m4/ directory needs to exist

4 years agoautotools: now "make distcheck" also works.
Oron Peled [Sun, 21 Dec 2014 15:29:35 +0000 (10:29 -0500)]
autotools: now "make distcheck" also works.

* Fix distcheck by having all the targets installed under $prefix
* But by default (no prefix or prefix=/usr), revert to older pathes:
  - /etc/dahdi
  - udev rules in /etc/udev/rules.d
  - perl in perl sitelib
  - man pages in /usr/share/man
* Add configure options:
  --with-udevrules= (e.g.: /lib/udev/rules.d)
  --with-perllib= (e.g.: `perl -V:vendorlib)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: remove unused stuff from Makefile.legacy
Oron Peled [Mon, 18 May 2015 19:06:21 +0000 (19:06 +0000)]
automake: remove unused stuff from Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: bugfix: fix installation paths
Oron Peled [Mon, 25 May 2015 15:22:01 +0000 (15:22 +0000)]
automake: bugfix: fix installation paths

* Install to $datadir/dahdi and not $datadir/dahdi-tools
* Install to $includedir/dahdi and not $includedir/dahdi-tools

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoUpdate README review-automake
Tzafrir Cohen [Tue, 19 May 2015 17:52:22 +0000 (20:52 +0300)]
Update README

Reflect recent changes as well as soem long-due fixes.

4 years agoautomake: handle "make dist"
Oron Peled [Mon, 18 May 2015 17:19:47 +0000 (17:19 +0000)]
automake: handle "make dist"

* "make distcheck" still fails

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: migrate dahdi_pcap from Makefile.legacy
Oron Peled [Mon, 18 May 2015 18:59:33 +0000 (18:59 +0000)]
automake: migrate dahdi_pcap from Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: migrated "--enable-dev-mode"
Oron Peled [Sun, 21 Dec 2014 14:21:57 +0000 (09:21 -0500)]
automake: migrated "--enable-dev-mode"

* Fix small compile warnings (which are now errors):
  - hdlcgen.c
  - hdlcstress.c (remove return value which isn't checked)
  - patlooptest.c

* Also added dev-mode to xpp with relevant compile fixes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: migrate tools from Makefile.legacy
Oron Peled [Sun, 21 Dec 2014 20:10:31 +0000 (15:10 -0500)]
automake: migrate tools from Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: handle doc/ man-pages
Oron Peled [Sun, 21 Dec 2014 14:52:38 +0000 (09:52 -0500)]
automake: handle doc/ man-pages

* Install via doc/Makefile.am
* Remove relevant code from Makefile.legacy
* For now, leave the conversion to HTML in Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: xpp: remove xpp/Makefile.legacy
Oron Peled [Mon, 18 May 2015 16:23:12 +0000 (16:23 +0000)]
automake: xpp: remove xpp/Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: xpp: handle /usr/share/dahdi
Oron Peled [Mon, 18 May 2015 15:49:08 +0000 (15:49 +0000)]
automake: xpp: handle /usr/share/dahdi

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: xpp: handle udev rules
Oron Peled [Mon, 18 May 2015 15:42:38 +0000 (15:42 +0000)]
automake: xpp: handle udev rules

* Set udev installation directory to $sysconfdir/udev/rules.d
* Add definitions to xpp/Makefile.am and remove them from xpp/Makefile.legacy
* TODO: add "--with-udev-rulesdir=" for packagers (/lib/udev/rules.d)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: xpp: man-pages and perl-scripts
Oron Peled [Mon, 18 May 2015 15:25:03 +0000 (15:25 +0000)]
automake: xpp: man-pages and perl-scripts

* Now man-pages and perl-script are handled by xpp/Makefile.am
* Removed from xpp/Makefile.legacy
* Detect perl and set perllibdir in configure.ac
* Handle modules in their own xpp/perl_modules/Makefile.am
* Enclose perl-related stuff in conditional
* Updates for "make dist"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: handle xpp/ compilation via Makefile.am:
Oron Peled [Sun, 21 Dec 2014 14:13:58 +0000 (09:13 -0500)]
automake: handle xpp/ compilation via Makefile.am:

* Added xpp/oct612x/Makefile.am:
  - Compile octasic sources into a convenience library (static, not installed)
  - Set OCTASIC_CFLAGS in configure.ac, as they are used in two
    Makefile.am's
  - Added relevant Makefile.in and Makefile into build_tools/make_dist

* In xpp/Makefile.am:
  - Have USE_OCTASIC conditional (currently configure.ac always set it to true)

* Added PBX_USB automake conditional, so we only build our tools if
  configure'd for libusb.

* Create two convenience libraries (libastribank and libecholoader)
  Statically link them into our tools.

* Handle man-pages for the tools.

* Remove all new functionality from xpp/Makefile.legacy -- it now
  contains:
  - All perl related tools and man-pages
  - Other misc stuff (udev files, etc.)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: full ppp/ support
Oron Peled [Sun, 21 Dec 2014 14:11:11 +0000 (09:11 -0500)]
automake: full ppp/ support

* Remove ppp/Makefile.legacy
* The ppp/Makefile.am includes complete functionality

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: add basic libtool support
Oron Peled [Sun, 7 Dec 2014 19:00:42 +0000 (14:00 -0500)]
automake: add basic libtool support

* Also:
  - Add libtool-related files into "make dist"
  - Update .gitignore

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautomake: add basic framwork
Oron Peled [Sun, 21 Dec 2014 20:07:59 +0000 (15:07 -0500)]
automake: add basic framwork

* Added needed boilerplate to configure.ac

* Wrap original Makefile's with automake:
  - Renamed all original Makefile -> Makefile.legacy
  - Force automake generated Makefile to call Makefile.legacy:
    Currently handle: all, install, clean, distclean, dist, docs, config
  - Note: our temporary 'dist' target conflicts with automake 'dist' target.

* Temporarily added extra dist files into build_tools/make_dist
  (until we move "make dist" functionality into automake)

* For now, we don't try to compile ppp/ as it wasn't compiled
  from the top-level Makefile before.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoautoconf: rename "dahdi" to "dahdi-tools"
Oron Peled [Mon, 18 May 2015 17:22:47 +0000 (17:22 +0000)]
autoconf: rename "dahdi" to "dahdi-tools"

Autoconf use this name as the "PACKAGE_NAME":
 * Available as a macro to compiled code and Makefile's
 * With automake, this determines the name of the tarball
   produced in "make dist"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: remove unused "update" target from Makefile
Oron Peled [Sun, 21 Dec 2014 20:06:07 +0000 (15:06 -0500)]
build: remove unused "update" target from Makefile

The 'update' makefile target seems unused as it has not been
updated to use git.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: generate version.c during configure
Oron Peled [Sun, 14 Dec 2014 22:37:33 +0000 (17:37 -0500)]
build: generate version.c during configure

The TOOLSVERSION was inconsistent in configure.ac and Makefile:
* Rename the second parameter to AC_INIT() into short_version
* Calculate TOOLSVERSION during configure and use it to
  generate version.c from version.c.in
* For now, leave duplicate TOOLSVERSION in Makefile (for make dist)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: xpp -- remove legacy usb-hotplug
Oron Peled [Mon, 8 Dec 2014 15:24:50 +0000 (10:24 -0500)]
build: xpp -- remove legacy usb-hotplug

Hotplug is the system that predated udev. No longer supported anywhere
sane.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: fix ppp/Makefile CFLAGS
Oron Peled [Sun, 7 Dec 2014 18:36:37 +0000 (13:36 -0500)]
build: fix ppp/Makefile CFLAGS

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: remove unused xpp/oct612x/Makefile
Oron Peled [Sun, 7 Dec 2014 11:53:01 +0000 (06:53 -0500)]
build: remove unused xpp/oct612x/Makefile

* Octasic sources are built from xpp/Makefile

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: remove unused build_tools/menuselect-deps.in
Oron Peled [Sun, 18 May 2014 12:41:21 +0000 (08:41 -0400)]
build: remove unused build_tools/menuselect-deps.in

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agobuild: remove autoconf generated files
Oron Peled [Mon, 28 Apr 2014 12:21:34 +0000 (08:21 -0400)]
build: remove autoconf generated files

* Remove autoconf related files
* Add needed ones to "dist"
* Ignore config.guess, config.sub (currently they aren't used)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp_fxloader: handle empty span-type.conf
Tzafrir Cohen [Tue, 31 Mar 2015 19:37:10 +0000 (22:37 +0300)]
xpp_fxloader: handle empty span-type.conf

If we have /etc/dahdi/span-types.conf but it doesn't have any
line, we should avoid using the option -S to astribank_hexload.
Fix the test for this.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agono astribank_is_starting with hotplug asterisk v2.10.1 v2.10.1-rc2
Tzafrir Cohen [Wed, 21 Jan 2015 16:43:19 +0000 (18:43 +0200)]
no astribank_is_starting with hotplug asterisk

Don't run the final astribank_is_starting if asterisk is hotpluggable.

Likewise, if there's no xpp_order file, waiting is pointless as the hook
can't count Astribanks.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoastribank_hook: remove useless 'time' v2.10.1-rc1
Tzafrir Cohen [Sun, 7 Dec 2014 09:51:19 +0000 (11:51 +0200)]
astribank_hook: remove useless 'time'

* 'time' was added here for debugging and never actually needed.
* It actually causes a minor bashism issue.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: waitfor_xpds: Always remove Astribank semaphore
Oron Peled [Tue, 28 Oct 2014 17:56:10 +0000 (13:56 -0400)]
xpp: waitfor_xpds: Always remove Astribank semaphore

If we waited -- no Astribanks are "in initialization"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp/astribank_hook: remove Astribank initialization
Oron Peled [Tue, 28 Oct 2014 17:43:48 +0000 (13:43 -0400)]
xpp/astribank_hook: remove Astribank initialization

If this is the last seen Astribank

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: waitfor_xpds: documentation
Oron Peled [Tue, 28 Oct 2014 17:50:30 +0000 (13:50 -0400)]
xpp: waitfor_xpds: documentation

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: can use modern Asterisk hotplug support
Oron Peled [Wed, 22 Oct 2014 19:02:58 +0000 (15:02 -0400)]
xpp: can use modern Asterisk hotplug support

* New asynchronous behavior is used only when two conditions are met:
  - Finding new $ASTERISK_SUPPORTS_DAHDI_HOTPLUG=yes in /etc/dahdi/init.conf
    This should be set only when Asterisk support hotplug and configured
    to use it (no_failed_channels==1).
  - DAHDI auto_assign_spans==0

* Adapt /usr/share/dahdi/astribank_hook:
  - Refactor old twinstar behavior into functions
  - Add new behavior in a function (just enable the Asrribank watchdog)
  - Call the correct function.

* Adapt init script:
  If asynchronous behavior is on, don't wait for all Astribanks to
  finish initialization (it's enough that we saw all/some of them)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

4 years agoxpp: waitfor_xpds: assume astribank_is_starting exists
Oron Peled [Tue, 28 Oct 2014 17:48:16 +0000 (13:48 -0400)]
xpp: waitfor_xpds: assume astribank_is_starting exists

It's in the same package (dahdi-tools) for a long time

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: waitfor_xpds: expansion error with no ABs
Oron Peled [Tue, 28 Oct 2014 15:53:29 +0000 (11:53 -0400)]
xpp: waitfor_xpds: expansion error with no ABs

Fix an exansion error in case there were no Astribanks on the system.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: astribank_is_starting: improve '-v' output
Oron Peled [Tue, 28 Oct 2014 17:28:04 +0000 (13:28 -0400)]
xpp: astribank_is_starting: improve '-v' output

Do print a message if no semaphore exists. It means that either there
are no Astribanks, or existing Astribanks were already initialized.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agotonezone: Fix regression in Australian tone patch v2.10.0.1
Russ Meyerriecks [Tue, 19 Aug 2014 20:22:30 +0000 (15:22 -0500)]
tonezone: Fix regression in Australian tone patch

Initialize db to 1.0 instead of doing it in a few, but not all, logic contexts.

Reported-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

4 years agoxpp: revert USB "clear_halt" change and better overrides.
Oron Peled [Sun, 17 Aug 2014 14:07:19 +0000 (17:07 +0300)]
xpp: revert USB "clear_halt" change and better overrides.

Why:
 * Doing "clear_halt" is normally the right thing to do on startup.
 * The original observed problem is better fixed via USB bios settings.
 * Defaulting to no "clear_halt" cause more problems on other platform
   combinations (hardware/kernel).

The change:
 * We now reverted to do "clear_halt" by default.
 * The XTALK_OPTIONS may now contain either "use-clear-halt" (the default)
   or "no-use-clear-halt" to override for debugging/testing.

Original commit: ca7c04e9cbdfc182c9c9672dec884f5ac87f90b9

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: astribank_hexload: allow empty span specs v2.10.0 v2.10.0-rc1
Tzafrir Cohen [Thu, 31 Jul 2014 14:57:32 +0000 (17:57 +0300)]
xpp: astribank_hexload: allow empty span specs

DAHDI 2.9.2 added support for -S (span specs). However if this option
was not specified, it fails to run.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp_fxloader: rename variable: default_law -> law
Tzafrir Cohen [Thu, 31 Jul 2014 11:54:49 +0000 (14:54 +0300)]
xpp_fxloader: rename variable: default_law -> law

The variable 'default_law' was the result of a partial renaming of the
original variable 'law'. Let's keep all of them in sync.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agotonezone: Fix congestion tone for Australia
Armen Karlozian [Tue, 13 May 2014 17:46:31 +0000 (12:46 -0500)]
tonezone: Fix congestion tone for Australia

The Congestion tone in Australia must be reduced by 10 to 15 dB
at every other cadence and the frequencies for both at cadences are 425 Hz.

From: Armen Karlozian <armeniki@hotmail.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

4 years agozonedata: Ensure all zones have a default DAHDI_TONE_DIALRECALL.
Shaun Ruffell [Tue, 18 Dec 2012 19:21:04 +0000 (13:21 -0600)]
zonedata: Ensure all zones have a default DAHDI_TONE_DIALRECALL.

The default 'us' tone is most likely better than silence when Asterisk tries to
generate the recall tone on a DAHDI channel.

Internal-Issue-ID: DAHTOOL-63
Reported-By: Igor Kravets
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

4 years agodahdi_cfg: Reduce mass ioctls on non-existing channels
Russ Meyerriecks [Wed, 23 Jul 2014 18:20:14 +0000 (13:20 -0500)]
dahdi_cfg: Reduce mass ioctls on non-existing channels

Logic was calling DAHDI_SPECIFY ioctl on all channels up to maximum channel
limit. Added a short circuit to prevent the ioctl on channels that aren't
configured.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

4 years agodahdi_cfg: minor: Rename fo_real to dry_run
Russ Meyerriecks [Tue, 22 Jul 2014 21:24:26 +0000 (16:24 -0500)]
dahdi_cfg: minor: Rename fo_real to dry_run

Minor readability change

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

4 years agowcte43xp: Teach tools about te436 and te236 products
Russ Meyerriecks [Thu, 24 Apr 2014 20:18:35 +0000 (15:18 -0500)]
wcte43xp: Teach tools about te436 and te236 products

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

4 years agodahdi_cfg: Warn if idle bits are set on invalid channel type. v2.9.2 v2.9.2-rc2
Shaun Ruffell [Tue, 8 Jul 2014 21:41:04 +0000 (16:41 -0500)]
dahdi_cfg: Warn if idle bits are set on invalid channel type.

Hopefully will save a little time in the future if anyone ever types into
/etc/dahdi/system.conf:

  bchan=1-15,17-30:1101

when they meant:

  cas=1-15,17-30:1101

in the future.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

4 years agodahdi_cfg: Unlink semaphore on early exit.
Shaun Ruffell [Mon, 7 Jul 2014 20:12:57 +0000 (15:12 -0500)]
dahdi_cfg: Unlink semaphore on early exit.

If dahdi_cfg is terminated while holding the named semaphore, it is possible to
leave it behind and all subsequenct invocations of dahdi_cfg will block waiting
for it.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

4 years agoMakefile: A typo in a comment
Tzafrir Cohen [Mon, 30 Jun 2014 10:47:23 +0000 (13:47 +0300)]
Makefile: A typo in a comment

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoadded autoconfig.h to .gitignore
Oron Peled [Wed, 28 May 2014 10:44:17 +0000 (06:44 -0400)]
added autoconfig.h to .gitignore

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: support per-port E1/T1 EC
Oron Peled [Wed, 28 May 2014 12:58:54 +0000 (08:58 -0400)]
xpp: support per-port E1/T1 EC

* Added optional '-S <span-spec>' argument to astribank_hexload:
  - Allow passing PRI span specification to EC firmware loader.
  - The span specifications is whitespace/comma separate list
    of items.
  - Each item is: <span>:<type> (Example: 3:T1)
  - The <span> may use shell-like globbing (e.g: *:E1 or [12]:T1)
  - Any span not matched in the span specification will be set
    as without the new '-S' option (i.e: depends on the '-A' option).

* Adapted xpp_fxloader:
  - Read specification for both device label and wildcard from
    /etc/dahdi/span-types.conf
  - If the result is non-empty, pass it as '-S <span-spec>' to
    the EC firmware loader.

4 years agoxpp: set EC firmware according to PRI settings:
Oron Peled [Tue, 27 May 2014 13:50:21 +0000 (09:50 -0400)]
xpp: set EC firmware according to PRI settings:

* Read first from modern configuration files
  (/etc/dahdi/span-types.conf)
  - Support either exact label match or complete '*' match in the
    configuration file.

* Fallback to legacy /etc/dahdi/xpp.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

4 years agoxpp: better dahdi_registration
Oron Peled [Sun, 6 Apr 2014 18:33:12 +0000 (14:33 -0400)]
xpp: better dahdi_registration

Improvements to the xpp tool dahdi_registration:

* Use the new xpp driver with support for dahdi_registration sysfs
  attribute in each device.

* Wait for UDEV to finish handling span assignments (via
  dahdi_waitfor_span_assignments).

* Still supports legacy drivers without this, by falling back
  to old style iterative "registration" on each xpd.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

5 years agoxpp: Don't generate .depends if there's no libusb v2.9.2-rc1
Tzafrir Cohen [Thu, 5 Jun 2014 10:20:36 +0000 (13:20 +0300)]
xpp: Don't generate .depends if there's no libusb

Creating the The .depends file requires libusb support.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

5 years agoxpp: better error checking (echo_loader)
Oron Peled [Sun, 11 May 2014 15:48:07 +0000 (11:48 -0400)]
xpp: better error checking (echo_loader)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

5 years agoxpp: fix usb "clear_halt" problem
Oron Peled [Sun, 11 May 2014 13:41:46 +0000 (09:41 -0400)]
xpp: fix usb "clear_halt" problem

 * Don't use "usb_clear_halt" by default anymore
   - It caused problems with specific devices in the past
   - Now it cause problems with specific servers as well (64 bits, USB3)

 * Add an "XTALK_OPTIONS" environment variable to pass options:
   - Use it to implement a "use-clear-halt" boolean option that
     restore original behavior.
   - Also use it for "no-lock" option which replace the legacy
     environment variable "XUSB_NOLOCK".

5 years agoxpp: safer compilation
Oron Peled [Sun, 4 May 2014 15:09:05 +0000 (11:09 -0400)]
xpp: safer compilation

* Compile with "-Wall -Werror"
* Better dependency calculation:
  - Explicit listing of sources, don't use wildcards.
  - Pass various CFLAGS to dependency calculation as well.
  - Make sure a failure is propagated

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

5 years agosystem.conf.sample: Remove reference to single frequency signalling.
Shaun Ruffell [Mon, 5 May 2014 14:42:38 +0000 (09:42 -0500)]
system.conf.sample: Remove reference to single frequency signalling.

Single frequency signalling has not been supported in dahdi_cfg since the switch
to DAHDI. Before DAHDI, in the Zaptel days, it was only suported in the
ztcfg_dude utility which wasn't mainlined. So this removes references to those
signalling modes unless support is added back into the driver.

Internal-Issue-ID: DAHLIN-335
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

5 years agodahdi_genconf: remove hard-coded E1 default
Oron Peled [Sun, 6 Apr 2014 17:01:32 +0000 (13:01 -0400)]
dahdi_genconf: remove hard-coded E1 default

* The "spantypes" generator had E1 default if no 'line-mode' parameter
  was passed.

* As a result the new logic in "dahdi_span_types dumpconfig" had no
  effect when called from dahdi_genconf, as it was always called
  with "--line-mode=" argument.

* Now "dahdi_genconf spantype" behaves just like
  "dahdi_span_types dumpconfig":
  - The "--line-mode=" forces generation of provided line-mode (E1/J1/T1)
  - Without this option, the generated config matches the current spans
    state according to new dahd_span_types default logic:
    - Wildcard rule if all spans have same line-mode.
    - Uncommented specific matches if spans have different line-modes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

5 years agoxpp: waitfor_xpds: handle missing serial numbers
Oron Peled [Mon, 31 Mar 2014 10:35:34 +0000 (13:35 +0300)]
xpp: waitfor_xpds: handle missing serial numbers

Fixes a regression since 949ea4ca9f9c9050811af9e80d44530beb10fd8f
(2.7.0) - allows using an Astribank with no serial.

* Some of the olderst Astribanks don't have a serial number burned in
  them. Thus there is no serial attribute for the sysfs USB device node.

* waitfor_xpds identifies the Astribanks by their serial numbers.

* An lone Astribank without serial number would thus block waitfor_xpds
  (until timeout).

* Now we warn about them.

* We also try to handle it gracefully. As long as there's only one
  of thease, it would be counted as "NO-SERIAL".

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

5 years agoxpp: dahdi_registration: force re-assignment
Oron Peled [Sun, 30 Mar 2014 18:38:52 +0000 (21:38 +0300)]
xpp: dahdi_registration: force re-assignment

* The system state causing the bug:
  - DAHDI has auto_assign_spans==1
  - No /etc/dahdi/assigned-spans.conf

* The bug scenario:
  - During initial device detection, they are assigned by
    DAHDI driver.
  - Later we run "dahdi_span_assignment remove"
  - Then, a "dahdi_registration on" would not assign any span.

* The fix:
  - Using the '-R' option, force "dahdi_registration on" to also
    do "dahdi_span_assignment auto" on relevant devices.
  - This is the way it's called by /usr/share/dahdi/dahdi_auto_assign_compat

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

5 years agoimproved dahdi_span_types dumpconfig
Oron Peled [Mon, 31 Mar 2014 16:48:30 +0000 (19:48 +0300)]
improved dahdi_span_types dumpconfig

* Better defaults:
  - A wildcard match:
    - If '--line-mode' option is given, generate a wildcard entry.
      (existing behavior).

    - Otherwise, if *all spans* are of the same type (E1/T1),
      generate a wildcard entry for this type.
      This is the most common use-case and now it work without
      any command line flags.

    - Otherwise (mixed E1/T1 spans), do not generate a wildcard entry.
      This isn't common case (except from our labs), but regardless
      without '--line-mode' any guess could be wrong.

  - Specific device matches:
    - If all spans are of the same type, generate commented out
      specific entries (for manual overrides).

    - If spans have mixed E1/T1 types, generate specific entries
      In this case, specific entries MUST NOT be commented out
      otherwise, the configuration file is wrong!

* Generated header with better organization:
  - Shows what is generated:
    - Generating wildcard / Not generating wildcard
    - Generating specific lines / Generating *commented-out* specific lines

  - For each decision, show *why* it was taken.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

5 years agoregistration-order: Added dahdi_auto_assign_compat v2.9.1 v2.9.1-rc2
Oron Peled [Sun, 9 Mar 2014 12:20:17 +0000 (14:20 +0200)]
registration-order: Added dahdi_auto_assign_compat

Maintains the original registration order as was before span
assignments. Should allow seemless trannsition to
dahdi.auto_assign_spans=0

* The idea:
  - We stop handling in udev the case of missing
    /etc/dahdi/assigned-spans.conf
  - Instead we rely on "registration_time" dahdi_device attribute from
    DAHDI-linux
  - Then, we can sort the devices and assign their spans in
    /etc/init.d/dahdi
* Mechanics:
  - From /etc/init.d/dahdi, we run a new 'dahdi_auto_assign_compat'
    script (after "waitfor_xpds" etc.)
  - In this script we "auto" assign spans of non-Astribank devices
  - In the end of the script we run "dahdi_registration" which
    does the same for Astribank devices.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

5 years agohotplug: call handle_device.d/ actions for remove
Oron Peled [Sun, 9 Mar 2014 12:03:00 +0000 (14:03 +0200)]
hotplug: call handle_device.d/ actions for remove

* Original actions didn't care about remove (10-span-types, 20-span-assignments)
* But others need to know about removals too.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

5 years agodahdi_cfg: error()->perror() when sem_open fails. v2.9.1-rc1
Shaun Ruffell [Wed, 12 Feb 2014 17:49:39 +0000 (11:49 -0600)]
dahdi_cfg: error()->perror() when sem_open fails.

This fixes a confusing error message. When sem_open failed, the system.conf line
number was being printed and the system error code was not.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

5 years agowaitfor_xpds: handle the case of a failing AB
Aslan Laoz [Tue, 14 Jan 2014 15:34:24 +0000 (15:34 +0000)]
waitfor_xpds: handle the case of a failing AB

If an Astribank failed initialization, don't keep waiting for it.

5 years agoauto_assign_spans may be true even if not '1'
Tzafrir Cohen [Thu, 6 Feb 2014 16:46:00 +0000 (18:46 +0200)]
auto_assign_spans may be true even if not '1'

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>

5 years agohotplug: Check for auto_assign_spans only when ACTION is add.
Shaun Ruffell [Sat, 21 Dec 2013 06:17:01 +0000 (00:17 -0600)]
hotplug: Check for auto_assign_spans only when ACTION is add.

Removes a potentially confusing error message. This is a reapplication of
(4f259cd569f6 "dahdi_handle_device, dahdi_span_config: Check for
auto_assign_spans only when ACTION is add.") which appears to have been
accidentally removed when moving the hotplug scripts into a subdirectory.

From the original commit:

When dahdi.ko is unloaded, it may be possible for the driver to be removed from
the kernel before the udev scripts are run.  When this happens, you'll see
messages like the following which are not accurate:

    'dahdi_handle_device'[24567]: Old driver (no auto_assign_spans parameter). Skip /devices/pci0000:00/0000:00:1e.0/0000:11:01.0/pci:0000:11:01.0

Now instead you will see:

    'dahdi_handle_device'[28008]: remove: /devices/pci0000:00/0000:00:1e.0/0000:11:01.0/pci:0000:11:01.0

Also, all the udev events will be logged in the system log even when they are
ignored because of legacy auto span assignment. This will help show what is
going on during the transition period to full udev configuration of spans.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>

5 years agohotplug: Do not run auto span configuration if spans are auto assigned. v2.9.0.1
Shaun Ruffell [Fri, 31 Jan 2014 16:31:20 +0000 (10:31 -0600)]
hotplug: Do not run auto span configuration if spans are auto assigned.

This reapplies the change made in commit (6ed0adc08 "dahdi_span_config: Do not run auto
span configuration if spans are auto assigned.") which appears to have been
accidentally removed in (7f826a7d35 "hotplug modularization: split logic to
scriptlets").

To rationale from commit 6ed0adc08:

I have seen cases were users run:

  # modprobe <driver>; dahdi_cfg -c <custom config file>

and the spans end up misconfigured because dahdi_span_assignments ends up
running, via udev, after the user configured the span the way it wanted.

dahdi_span_assignments now looks at auto_assign_spans module parameter on
dahdi.ko, like dahdi_handle_device already does, to determine if legacy or udev
based configuration is being done.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>