The test originally did not check any input from the hardware.
Fix it to check the actual (and proper) input from the hardware.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Centos 5 has perl 5.8.8 . It does not support the '//' operator that was
added in perl 5.10. So sadly we have to avoid using it.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Don't enable debug by default.
* Demote some logging messages to debug.
* Remove a duplicate message about SLIC numbers.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Generation of metering tone (a feture normally disabled at build time)
is not yet implemented on the new FXS type 6 module.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The new FXS chip supports two ports for each chip and hence we once
again need to look at hardware differently.
Struct unit_description includes information about all chips/port in a
specific module.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Prepare for different types of commands: replace XFRAME_NEW_CMD with
XFRAME_NEW_REG_CMD in some places.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Currently we only have REG (register) commands. Refactor it to allow
MEM (memory) commands.
* A common header
* Don't assume a constant size.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* wctdm: set to SPANTYPE_ANALOG_MIXED. Maybe it could be improved if all
slots have modules of the same type.
* wcfxo: type FXO.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The xpp modules use time differences for various statistics. In one case
xpp_usb creates a histogram of the time it took the system to send USB
packets (URBs). The time difference is used (after adjustments) as an
index to that array.
However if the clock happens to go back at that exact point in time, we
get to write to an arbitrary negative index in this array.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
A script that performs the module loading / unloading instead of the
init script.
Other functionality of the init script is performed by udev hooks. But
manual initiation of modules loading or unloading is still needed on
several occasions.
This script should help enable the removal of the init script from the
DAHDI package.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Drop PCM during sluggish events:
- Drop both rx/tx (was only tx)
- Drop almost all pcm until sluggishness stops (used to drop only
single pcm each time).
- Renamed: "drop_next_pcm" -> "drop_pcm" (to match new semantics)
- Still allow "keep alive" PCM so Astribank will not reset FXS high-voltage.
The "sluggish_pcm_keepalive" parameter set the rate (1/50 by default)
- Added rx/tx drop statistics counters
- Removed "pcm_tx_drops" (replaced by new statistics counters)
* Also improved format of /proc/xpp/XBUS-*/xpp_usb:
- Show cummulative number of sluggish events.
- Clearly show range (in usec) of usb_tx_delay[]
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Now prints the serial number of the card to the kernel log for cards which
support this feature. This include the wcb23x and wcb43x series.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Adds support for Digium's new dual span wcb23x series cards. Also other minor
improvements for the new generation cards including the wcb23x and wcb43x
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
A few of the indirect register writes to the A_ST_* indirect registers weren't
being protected by any kind of sequence lock. This could lead to potential race
conditions of two spans were configured simultaneously.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
The hw init function gets called on a module remove in order to reset the
hardware before shutdown. This was causing "Initializing zarlink echocan" to
print on shutdown which could be confusing.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This logic was reading and printing the bri chips automatic selection of sync
source. We always use manual sync selection in the driver so this doesn't need
to exist.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
When the firmware is reloaded and reset, the packet error count is not.
This can create a condition where the firmware could report an error like
the following if a channel was closed without any new errors:
wctc4xxp 0000:07:08.0: 18446744073709551597 errored receive packets
wcdte.packet_errors is also renamed to wcdte.reported_packet_errors to not
conflict with the packet_errors member of the descriptor lists.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
In the case where two transcoders are loaded in a system and one transcoder
experiences an errored receive packet condition, the logic would ping pong the
error between the two cards, causing a runaway stream of errors in the kernel
log.
This fix moves the global error count var into the wcdte struct to allow for
per-card logic.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
The IRQF_DISABLED flag was removed in 4.1 in commit
"genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely" [1].
By default all interrupt handlers are now run with interrupts disabled and
therefore should all be considered "fast interrupts". Any driver that was still
using the flag will now lock interrupts directly in the handler in case running
on an older kernel that is not disabling interrupts when running the handler.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
These flags are direct mappings to the IRQF_[SHARED|DISABLED] flags and no
longer need to be kept separate.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
It has now been years since subversion has been used with this project. We can
go ahead and simplify the version script now.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Introduces support for new series b43x cards which make use of the zarlink echo
canceller. Made as few changes to the b410 operation as possible, but the
critical region had some cleanups, so it may be a bit more performant.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
The cards affected include the TE131/3, TE235/435, A4B, and A8B.
Update all PCIe cards' firmware to increase the incoming and outgoing TDM FIFOs
to 16ms. The FIFOs will only be filled to a depth equal to the driver's latency
setting (ie. 3ms default). The total system latency is not effected. The
firmware and driver now also report the maximum DMA transaction time when in
DEBUG mode to aid in determining if the system is experiencing long PCIe
transactions (ie. TLP completion timeouts).
Decreased the maximum latency to from 20 to 12ms
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
New USB firmware that fix mis-reporting of the number of channels (or
rather: licenses) in the Astribank when a 2FXS6FXO module is used in
conjunction with another module.
USB_FW.hex: rev. 11452
USB_FW.201.hex: rev. 11453
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
https://bugs.debian.org/776622 asks to avoid using the build time in the
generated result to help make the build reproducable.
This fix uses the timestamp of README for generating the timestamp in
the footer of README.html.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Commit d5db139ab3764640e0882a1746e7b9fdee33fd87 "module: make
module_refcount() a signed integer." included in 3.19 makes this
condition slightly more complex.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
With commit (af3cd13501 "lib/string.c: remove strnicmp()") [1] dahdi can no
longer call strnicmp directly. strncasecmp was added into lib/string.c in kernel
version 2.6.22 so we'll map calls to strncasecmp to strnicmp for any kernel
before that.
This is necessary to compile against kernels >= 4.0.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af3cd13501
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
With commit (d1f1052c52 "device: Change dev_<level> logging functions to return
void") [1] in kernel version 4.0, DAHDI would fail to compile with the following
error:
.../drivers/dahdi/dahdi-base.c:7150:2: error: void value not ignored as it ought to be
dahdi_dev_dbg(ASSIGN, span_device(span),
^
Now ignore the dev_printk return value.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1f1052c5204524
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>