xpp: USB_FW.202.hex: provide as a symlink

Provide USB_FW.202.hex as a (install-time) symlink to USB_FW.201.hex.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: mark an AB as failed if it gives bad desc

If we fail at handling the device descriptor from the Astribank, mark it
as in state "failed".

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: Fail loading if no module on first slot

The driver assumes that the first slot is not empty. If this is not the
case, synchronization will not work.

Fail loading if this assertion does not hold.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
dahdi_config: Remove unused NO_DCDC definition.

There are not any drivers in the tree that make reference to this definition
anymore, so it can be removed.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
dahdi: Clear DAHDI_ALARM_NOTOPEN when spans are re-initialized.

This eliminates the need for board drivers to always re-report their alarm
states when spans are unassigned and then reassigned.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
dahdi: Fix placement of '/' in output of /proc/dahdi/x

Fixes strings that look like:
  Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" CCSHDB3//CRC4 RED

To look like:
  Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" CCS/HDB3/CRC4 RED

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
dahdi: Work around missing KBUILD_MODNAME

Some older versions of Kbuild will not pass KBUILD_MODNAME to a
compilation unit that is linked to multiple drivers. This change works
around this issue by globally modifing dev_dbg in this case.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
dahdi: Backport try_wait_for_completion() and list_first_entry()

This allows drivers to use the newer interface but build against older
kernels.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wct4xxp: Print warning in dmesg if span priority is not set correctly.

dahdi_genconf currently does not take into account the number of spans
configured for a particular board. Therefore if you have two dual span cards
installed in the system, it could be possible to have something like this in
/etc/dahdi/system.conf:

  spans=1,1,...
  spans=2,2,...
  spans=3,3,...
  spans=4,4,...

When what you really want is something like this:

  spans=1,1,...
  spans=2,2,...
  spans=3,1,...
  spans=4,2,...

Otherwise, spans 3 and 4 will be configured to not recover the clock from the
span which is most likely NOT what you want.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wct4xxp: Fix bipolar error insertion test mode.

This change wouldn't affect most people since it's only used by the error
injection code.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wct4xxp: VPM companding switch print is now debug only.

This print happened when the linemode was changed via sysfs, but it didn't
really add much extra information that a user could act on.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wct4xxp: If linemode changed via sysfs, reset the complete part.

This works around some issues with older versions of the firmware not
working properly after the linemode is changed via sysfs. Basically the
intent is to simulate redoing a complete driver reload with a new
linemode.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wct4xxp, wcte13xp: Move the octasic DSP code into separate module.

The octasic library is relatively large and is currently separately linked into
both the wcte13xp and wct4xxp libraries. This change moves it out into a
separate loadable module.

The bigest change from the drivers perspectives is that they must provide a
table of callbacks instead of using statically linked Oct6100UserXxxxx functions
to allow the library to communicate with actual parts on the cards.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcaxx: New driver for A4A/A4B/A8A/A8B analog cards.

This is a driver for the new line of analog cards that shares a common interface
with the TE133/TE134 and the TE435.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcte13xp: Use interrupts for Falc alarms and signaling

From: Wendell Thompson <wthompson@digium.com>

Now uses framer interrupt vector polling (in the FPGA interrupt) for
alarm, loopcode, and signaling events eliminating continuous polling.
Now uses timer function for alarm and loopcode debouce, which only
executes during exception conditions.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcte13xp: Migrate to wcxb library

From: Russ Meyerriecks <rmeyerriecks@digium.com>

Removed all the custom logic and replaced with the common platform wcxb stuff.

There are also changes in here to standardize the function prefix in this
driver to t13x_.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcte13xp: Hold framer in reset to stop xmit on modprobe -r

From: Russ Meyerriecks <rmeyerriecks@digium.com>

The framer appears to continue transmitting a signal after modprobe -r. This
patch will leave the physical framer reset pin asserted to force the chip to
stop transmitting a signal when there is no driver attached.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcte13xp: Improve maintenance functions and error counters

From: Rus Meyerriecks <rmeyerriecks@digium.com>

* Removed work queue for maint interface as it is not needed in this driver
* Error counters are now accessible through the maint interface
* Consolidated and revised the big maint switch case
* Added loopup/loopdown code transmit logic to E1
* Now supports error/defect insersion

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
wcte43x: Add driver for TE435/TE235 digital cards.

From: Wendell Thompson <wthompson@digium.com>

These new cards are based on a common architecture with the TE133/TE134 as well
as the new analog cards, A4A/A4B/A8A/A8B.

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