Creating branch for 2.6


git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10407 17933a7a-c749-41c5-a318-cba88f637d49
xpp: clean 'Extrainfo' EEPROM field

* 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>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10491

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10515 17933a7a-c749-41c5-a318-cba88f637d49
xpp: xpp_fxloader: improve output

* 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>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10495

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10516 17933a7a-c749-41c5-a318-cba88f637d49
new build_tools/dahdi_sysfs_copy

Short perl script to copy dahdi related sysfs trees
into a designated directory.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10496

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10517 17933a7a-c749-41c5-a318-cba88f637d49
improve build_tools/dump_sys_state

* Use the new dahdi_sysfs_copy script
* Clean old/unused code
* Add notification output
* Now always creates a tarball - the gzipped copy is many times smaller.
* Without arguments, tarball name is:
    sys_dump.<hostname>_<date>_<time>.tar.gz

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10497

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10518 17933a7a-c749-41c5-a318-cba88f637d49
xpp: echo_loader.c: add AB id to messages

* 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>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10498

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10519 17933a7a-c749-41c5-a318-cba88f637d49
xpp: bugfix: handle echo_loader errors

* 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>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10499

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10520 17933a7a-c749-41c5-a318-cba88f637d49
xpp: Customizable license markers

* 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>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10502

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10521 17933a7a-c749-41c5-a318-cba88f637d49
xpp: fix manpage of astribank_hexload

* Fixed 'astribanks_tool' string

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10503

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10522 17933a7a-c749-41c5-a318-cba88f637d49
xpp: Update product ID's in Dahdi::Hardware::USB

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10505

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10523 17933a7a-c749-41c5-a318-cba88f637d49
xpp: oct612x: fix build warnings

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

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10542

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10547 17933a7a-c749-41c5-a318-cba88f637d49
xpp: fix build warnings

Unlike original: also fixed fpga_load.

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

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10543

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10548 17933a7a-c749-41c5-a318-cba88f637d49
xpp: astribank_allow: useless debug on write

Remove a useless debug message in the "write" operation.

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

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10549

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10555 17933a7a-c749-41c5-a318-cba88f637d49
xpp: astribank_hook: wait for udev to settle

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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10585

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10596 17933a7a-c749-41c5-a318-cba88f637d49
dahdi_hardware: Detect the Digium TE820 card.

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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10680

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10682 17933a7a-c749-41c5-a318-cba88f637d49
README.Astribank: load module => module load

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

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10701

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10703 17933a7a-c749-41c5-a318-cba88f637d49
xpp: improved waitfor_xpds

* 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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10465

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/branches/2.6@10737 17933a7a-c749-41c5-a318-cba88f637d49