The number of subunits per XPD (which is not trivial in BRI) has been
accidentally left out in a previous commit.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The packet data length field may have other values in some cases (BRI D
channel). It is also inherently limited to 3 bits.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The xpp drivers were originally developed seperately and thus had their
own version number. For quite some time they no longer have this version
number and report 'Revision: Unknown'.
Get rid of this mechanism.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
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>