Commit Graph

293 Commits

Author SHA1 Message Date
Shaun Ruffell
92e2a646eb dahdi: Remove CONFIG_OLD_HDLC_API since that is kernel 2.4 specific.
DAHDI does not support any kernels older than 2.6.9.  No need
to keep the old HDLC interface support around.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9447 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:28 +00:00
Shaun Ruffell
15182a4a18 wctdm24xxp, wcte12xp: Remove unused 'whichframe' parameter.
'cmd_dequeue_vpmadt032' in the wctdm24xxp and wcte12xp drivers no longer
care about which frame they are on.  The command will be packed into the
eframe specified by "writechunk".

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9446 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:26 +00:00
Shaun Ruffell
53d674dc21 dahdi: Drop some 'zt' prefixes on chan.
'zt' is a carry over from the Zaptel days.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9445 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:23 +00:00
Shaun Ruffell
aa5c973611 dahdi: Atomically set/test if channel has associated network device.
Push all tests for the DAHDI_FLAGBIT_NETDEV flag behind a
'dahdi_have_netdev' function so if CONFIG_DAHDI_NET is not defined the
compiler can just remove all the flag tests.  Also, makes sure that the
bit is checked / set atomically.

(closes issue #9379)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9444 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:16 +00:00
Shaun Ruffell
072ccc9b69 dahdi_echocan_oslec: Call olsec_hpf_tx if CONFIG_DAHDI_PROCESS_ECHOCAN_TX is defined.
It can be necessary to have low frequency filter for tx signal of DAHDI.
Otherwise, low-frequency signal from IP can reach a leased line, and
return back with nonlinear distortions. This will break an echo
canceler.

(closes issue #13562)
Reported by: biohumanoid
Patches:
      dahdi_echocan_oslec.c.patch uploaded by biohumanoid (license 459)

I slightly modified the above patch in order to use echocan_process_tx
as the interface.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9443 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:11 +00:00
Shaun Ruffell
2ba1b4c201 dahdi: Add compile time DAHDI_ECHOCAN_PROCESS_TX option.
Add optional interface to allow software echo cans to process the
transmitted samples.  Can be used for things like DC removal.

I used the following patches uploaded by biohumanoid but changed the
name of 'echocan_hpf_tx' to 'echoan_process_tx and put the changes
behind a compile time option.

(issue #13562)
Reported by: biohumanoid
Patches:
      kernel.h.patch uploaded by biohumanoid (license 459)
      dahdi-base.c.#2.patch uploaded by biohumanoid (license 459)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9442 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:06 +00:00
Shaun Ruffell
5b08a20526 wctdm24xxp: Leave FXO (DAA) always in full-wave ring detect mode.
In zaptel commit 4096 [1], all the debouncing of ring signals were moved
into software as opposed to using the ring validation circuit in DAA.
That commit failed to remove the initial check and set of the ring
validation circuit.

[1] http://svn.digium.com/view/zaptel?view=revision&revision=4096

(closes issue #16894)
Reported by: rde42

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9441 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:23:02 +00:00
Shaun Ruffell
141a61d64e wctc4xxp: Space required after ','.
Trivial formatting change.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9440 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:59 +00:00
Shaun Ruffell
9dc983cc0d wctc4xxp: Remove trailing whitespace.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9439 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:57 +00:00
Shaun Ruffell
615c6b6800 wctc4xxp: Cannot print the encoder/decoder channels before we know them.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9438 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:54 +00:00
Shaun Ruffell
8d29ecb783 wctc4xxp: 'WARN_ON(1)' -> 'dev_info(...' on channel creation failure.
If the DSP ever finds it's way into a bad state it can be possible for a
timeslot to get 'wedged'.  All attempts to create a channel in a wedged
timeslot will fail and the WARN_ON macro can quickly fill the logs.

This change adds some more debugging information (which timeslot is wedged)
along with the result code from the DSP and puts it all behind a
printk_ratelimit.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9437 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:52 +00:00
Shaun Ruffell
b4170d8f40 wctc4xxp: Drop 'DTE_PRINTK' macro in favor of standard 'dev_xxx'
Just use the standard way to print messages associated with a particular
device. Also dropped the "Attached to device at" message since that
information is now printed on every print.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9436 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:49 +00:00
Shaun Ruffell
8ac8b90bd4 wctc4xxp: Remove 'service_dte' function and a few inline keywords.
'service_dte' was only called in one place and is only two lines.  I do
not think it is adding much anymore. Also, let compiler should decide if
'service_rx_ring' and 'service_tx_ring' should be inlined.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9435 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:47 +00:00
Shaun Ruffell
8897a79f5b dahdi: '-o' -> '--no-same-owner' in drivers/dahdi/firmware/Makefile
It appears that in Centos 4, the version of tar doesn't like the -o
flag, but will honor the --no-same-owner flag.

(closes issue #16063)
Reported by: tzafrir

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9434 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:42 +00:00
Shaun Ruffell
f5f0958381 dahdi: dahdi_chan_unreg was not cleaning up conferenced channels properly.
'is_monitor_mode()' and DAHDI_CONF_DIGITALMON were mutally exclusive.
Fixes recent regression introduced in revision 9367.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9433 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:39 +00:00
Shaun Ruffell
a8b1e2b662 vpmadt032: Honor the CONFIG_DAHDI_NO_ECHOCAN_DISABLE flag.
Setting this configuration option would not have had any impact when a
hardware echo canceler was in use.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9432 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:35 +00:00
Tzafrir Cohen
53b658db1b xpp: Fixes init error for PRI devices with < 4 ports
Fixes a regression singce r8873: if pri_protocol is not explicitly set
(in /etc/dahdi/xpp.conf) and the device has (licences for) less than 4
"PRI" (E1/T1) ports, the initialization script will attempt to read from
a non-existing SysFS file, and bail out, resulting in a the device
failing to initialize.

For those non-existing ports we can just skip that part of the
initialization. So we just skip it.

Work around: explicitly set pri_protocol to E1 or T1, as needed.

Xorcom Rev: 8047. Ticket: 1334.


git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9430 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-18 14:50:03 +00:00
Shaun Ruffell
c4ae51ffae dahdi: 'if (chan)' -> 'if (!chan)' in dahdi_ioctl_getgains.
Fixes a typo recently introduced that was preventing asterisk from
setting the swgains on a channel.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9423 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-04 17:20:47 +00:00
Kinsey Moore
408787c77b dahdi: Anonymous member in dahdi_echocan_events union.
Make explicit what part of the union is being accessed.

(closes issue #15908)
Reported by: ys
Patches:
      dahdi-dahdi_echocan_events.diff uploaded by ys (license 281)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9421 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-29 22:00:22 +00:00
Kinsey Moore
b0185d1e84 dahdi: Fix 'void *' pointer arithmetic warnings.
(closes issue #15927)
Reported by: Max Khon
Patches:
      dahdi_echocan2.diff uploaded by Max Khon (license 884)
      void2.diff uploaded by Max Khon (license 884)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9420 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-29 21:32:55 +00:00
Shaun Ruffell
3400734174 wcb4xxp: Spelling 'LOOKBACK_SUPPORTED' -> 'LOOPBACK_SUPPORTED'
(closes issue #16658)
Reported by: kurtlidl
Patches:
      base.c.diff uploaded by kurtlidl (license 962)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9416 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-27 15:57:13 +00:00
Shaun Ruffell
1c462653e7 dahdi: Remove bigzaplock by converting chan_lock to spinlock_t.
The bigzaplock was used to prevent changes to all the channels during
masterspan processing while conference parameters were changing.  The
master span processing also took a global lock out on the chan_lock to
prevent new channels from being registered or unregistered during
processing.  Instead of grabbing both those locks, just changing the
semantics of chan_lock to those of bigzaplock seems to fit the bill and
removes another lock from the driver (and saves ~10 ns on a 2.40 GHz
Xeon in prcocess_masterspan)

chan_lock is a candidate for conversion to RCU but usage in conferencing
(bigzaplock type usage) needs to be audited carefully before conversion.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9414 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:45:07 +00:00
Shaun Ruffell
c3ae5634d7 dahdi: process_timers is already called with interrupts disabled.
Very slight performance increase when timertest is running in the
background.  Measured at ~10 ns improvement over 10K samples.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9413 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:45:03 +00:00
Shaun Ruffell
87336d22fc dahdi: Rename 'zaptimer' -> 'dahdi_timer'
DAHDI is not Zaptel anymore.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9412 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:59 +00:00
Shaun Ruffell
283235686d Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h
The check for DEFINE_SPINLOCK was spread throughout the source tree. If
not defined we can just define it in inlucde/dahdi/kernel.h.  Now
include/dahdi/kernel.h is the only place that references
SPIN_LOCK_UNLOCKED (which breaks lockdep checking if DEFINE_SPINLOCK is
otherwise defined in the kernel).

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9411 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:53 +00:00
Shaun Ruffell
41825e7c32 dahdi: Remove remaining #if 0 locations from dahdi-base.
Dead code elimination.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9410 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:49 +00:00
Shaun Ruffell
731b5868d4 dahdi: Allow core DAHDI software timing to work when DAHDI_CHUNKSIZE > 8.
When no hardware spans are configured DAHDI will use a kernel timer in order
provide timing for conferences. This is what dahdi_dummy historically was used
for. When kernel timers are used to provide timing DAHDI can both potentially
slow the rate at which time timer runs and also needs to account for how many
milliseconds of audio are processed for each 'tick' of process_masterspan.

The result is that if you are only using DAHDI for app_meetme, you can change
DAHDI_CHUNKSIZE to 40 (5ms) or 80 (10ms) bytes to reduce overhead since user
space is dealing with chunks of 20ms by default anyway.

NOTE: If you set this, you may still need to comment out the board drivers in
drivers/dahdi/Kbuild since they all do not support operating with a
DAHDI_CHUNKSIZE != 8 currently.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9407 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:37 +00:00
Shaun Ruffell
d08cdac785 dahdi: Only disable/enable interrupts once when iterating through channels.
dahdi_receive, dahdi_transmit, and dahdi_ec_span are mostly called from
interrupt context anyway, so we can save a few cycles by not saving and
restoring the interrupt flags for every channel.

On one 2.40GHz Xeon test machine, for a span with 24 channels w/o echocan
enabled with ~10000 samples:

Function        Avg Before   Avg After
======================================
dahdi_receive   2.109 us     1.547 us
dahdi_transmit  3.203 us     2.766 us
dahdi_ec_span   0.416 us     0.454 us

NOTE: The time went up slightly on dahdi_ec_span since I did not have
software echocan enabled and this change calls local_irq_save regardless
in dahdi_ec_span.  The slight increase in processing time in this case
is overshadowed by the savings in dahdi_receive and dahdi_transmit. If
echocan was enabled on all the channels there would be a time savings
in that dahdi_ec_span too.

When dahdi_receive/dahdi_transmit are called every millisecond (when
DAHDI_CHUNKSIZE == 8) this saves ~0.1% CPU time for each span.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9406 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:30 +00:00
Shaun Ruffell
6d602c96b9 dahdi_dynamic: Update copyright.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9403 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23 21:38:57 +00:00
Shaun Ruffell
5618e9e812 wcte12xp, wctdm24xxp: Convert vbb cache from kmem_cache to dma_pool.
The voicebus interface constantly uses the same buffers for moving data
to/from the card.  A fixed pool has less overhead in this case than
constantly mapping/unmapping the kmem_cache_alloced buffers.

Saves about ~2.608 us for each run of vb_isr on a 2.40 GHz Xeon test
machine.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9402 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23 21:38:52 +00:00
Shaun Ruffell
9038e0a2cd wcte12xp, wctdm24xxp: Remove comment about converting from IO space.
This change was made in revision 8176.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9401 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23 21:38:48 +00:00
Shaun Ruffell
6d1e5996af wct4xxp: Drop usage of 'volatile' qualifier.
The registers on the device are already accessed with readl/writel and
the readchunk and writechunk are mapped into coherent DMA region.  The
contents of those buffers should not be changing in the middle of any
transmit/receive prep call.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9400 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23 21:38:43 +00:00
Shaun Ruffell
7852d30cb5 wct4xxp: Add debug option to log detected RBS bit changes.
Normally you can see RBS bit states in dahdi_tool, but you might also
want them logged to dmesg for troubleshooting.

(issue #18025)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9399 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23 21:38:37 +00:00
Shaun Ruffell
1cfc5180c8 wcte12xp, wctdm24xxp: Do not rely on polling main memory.
The voicebus library by default configures the PCI interface to poll the
descriptor ring for available buffers.  There are some platforms like
the Intel SG3420P motherboard where this does not appear to be
sufficient.  Writing to the transmit demand poll register resolves this
problem on these troublesome platforms. DAHDI-700 DAHDI-702.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9397 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21 19:26:22 +00:00
Shaun Ruffell
b45e166253 wctdm24xxp: Add optional FXO digital loopback if DEBUG is defined.
This module parameter will allow patgen/pattest to be used only on FXO
ports. *ALL* FXO ports will be placed in digital loopback mode when
set.

The current intent is for this to be removed as an optional module
parameter when there is a channel by channel representation in sysfs.
Otherwise, a new IOCTL would have to be defined and a tool written in
order to support this. DAHDI-696.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9391 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21 15:36:34 +00:00
Shaun Ruffell
67fdba958c dahdi: Channels can have their own file_operations structure.
If we know that an open file is associated with a channel (pseudo or
real) we can just update the file->f_ops pointer so that we can short
circuit some of the checks in read/write/poll. Trades sizeof(file_operations)
bytes for less function call overhead in the "hot" path.

On a 2.4 GHz Xeon, saves around 150 ns on each read / write.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9386 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:44 +00:00
Shaun Ruffell
851203c182 dahdi: Remove redundant 'gainalloc' member from struct dahdi_chan.
I want to add some new members to dahdi_chan, but I don't want to
increase the overall size any more than necessary.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9385 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:40 +00:00
Shaun Ruffell
08cfbeb03e dahdi: Change iteration through pseudo/real chans in process_masterspan.
Since we have the pseudo channels on their own list, we don't need to
step through the chans array when we just want to find the pseudo
channels. Likewise, all the real channels will have be on a span.  Also
removes references to the global chans array in process_masterspan.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9384 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:36 +00:00
Shaun Ruffell
a017f39fc4 dahdi: Keep psuedo channels on pseudo_chan_list.
Since pseudo channels are without spans and we would like to use the
span list to enumerate through all the channels, keeping the psuedo
channels on their own list is required.  I believe this is a more
natural choice than making a dummy spans for pseudos since pseudo
channels should *really* just be an implementation detail that the user
shouldn't care about.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9383 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:32 +00:00
Shaun Ruffell
4bdc2afebf dahdi: Define psuedo channels as being without a span.
Therefore we can use the fact that the span pointer on the channel is
NULL to identify them.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9382 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:27 +00:00
Shaun Ruffell
a03f6a2eb3 dahdi: Reduce 'chans' references in dahdi_ctl_ioctl.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9381 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:23 +00:00
Shaun Ruffell
4ae563309a dahdi: 'user_data' is extraneous in dahdi_ctl_ioctl.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9380 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:19 +00:00
Shaun Ruffell
0be6a86f5c dahdi: Remove unused unit from dahdi_common_ioctl.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9379 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:15 +00:00
Shaun Ruffell
71b3fbaa9d dahdi: Move DAHDI_SPANSTAT ioctl handlers into separate functions.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9378 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:11 +00:00
Shaun Ruffell
6b8751fb8b dahdi: Remove unit parameter from dahdi_chanandpsuedo_ioctl.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9377 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:07 +00:00
Shaun Ruffell
e16c7479e7 dahdi: Remove unit parameter to dahdi_prechan_ioctl
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9376 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:34:03 +00:00
Shaun Ruffell
44ee940137 dahdi: Remove unit parameter from dahdi_chan_poll.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:59 +00:00
Shaun Ruffell
c25fc5633f dahdi: Remove unit parameter from dahdi_ioctl_[get|set]gains.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9374 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:55 +00:00
Shaun Ruffell
5309a1d682 dahdi: Remove unit parameter from dahdi_specchan_release.
This change also involves setting the DAHDI_FLAGBIT_CLOSE bit on the
channel before calling the 'close' callback in span ops.  It appears
that only the dynamic spans may delete the channels on close, but that
code path doesn't check the DAHDI_FLAGBIT_CLOSE bit anyway.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9373 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:51 +00:00
Shaun Ruffell
72a6c95ac1 dahdi: dahdi_specchan_open also does not need the unit parameter.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9372 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:47 +00:00
Shaun Ruffell
c54662d799 dahdi: 'unit' -> 'chan->channo' in a CONFIG_DAHDI_DEBUG block.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9371 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:43 +00:00
Shaun Ruffell
83dcb53e6d dahdi: Remove what appears to be stale debug code in dahdi_chan_read/write.
If someone was still using this...feel free to add it back in with a
comment about why it needs to be in the mainline.  It looked better to
remove it than edit it to make sure it worked.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9370 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:39 +00:00
Shaun Ruffell
5c1857d95e dahdi: Remove the unit parameter from dahdi_chan_ioctl.
This ioctl is called either via the "/dev/dahdi/channel" file or via a
/dev/dahdi/channo file.  In either case, either the minor number of the
device file will match up with a channel, or the "private_data" member
on the channel will be set, so the unit is redundant.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9369 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:35 +00:00
Shaun Ruffell
7e7bd68d9a dahdi: Reduce chans array indexing in dahdi_chan_unreg.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9368 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:31 +00:00
Shaun Ruffell
39ae189624 dahdi: Modify "is_monitor_mode" to be usable by dahdi_chan_unreg.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9367 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:27 +00:00
Shaun Ruffell
eb89c39f84 dahdi: Reduce 'chans' dereferencing in dahdi_check_conf
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9366 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:23 +00:00
Shaun Ruffell
3e6b113991 dahdi: Issue warning if DAHDI_INDIRECT ioctl is used.
DAHDI_INDIRECT is only used when setting up pciradio channels.
dahdi_cfg no longer should need DAHDI_INDIRECT since revision 9352.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9365 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:19 +00:00
Shaun Ruffell
d5e718ec03 dahdi: Use 'chan' convenience pointer in dahdi_receive.
Simplifies the function and may increase performance due to decreased
dereferencing of the span and channel array.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9364 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:15 +00:00
Shaun Ruffell
c885e2ae3b dahdi: Use 'chan' convenience pointer in process_masterspan.
Reduces the amount of indexing into the global channel array.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9363 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:11 +00:00
Shaun Ruffell
f907dc01b3 dahdi: Use 'chan' convenience pointer in dahdi_transmit.
I believe this makes it a little more clear what is happening.  Also could
provide a potential speedup if the span doesn't need to be constantly
dereferenced (although an optimizer might make this moot).  Regardless, this
change doesn't hurt.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9362 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:07 +00:00
Shaun Ruffell
488a849209 dahdi: chans[ms->confna] -> conf_chan.
In  __dahdi_process_getaudio_chunk and __dahdi_process_putaudio_chunk we
can streamline the operation slightly by saving a constant pointer to
the conference channel instead of constantly dereferencing the master
channel and indexing into the chan array.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9361 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:33:03 +00:00
Shaun Ruffell
3e0f903861 dahdi: Remove unused parameter in three ioctl handlers.
The 'int cmd' parameter is unused and unneeded in dahdi_ioctl_getgains,
dahdi_ioctl_setgains, and dahdi_ioctl_chandiag.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9360 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:59 +00:00
Shaun Ruffell
3c774e386b dahdi: Move handlers for DAHDI_[GET|SET]_PARAMS into separate functions.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9359 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:55 +00:00
Shaun Ruffell
b7545e9d0d dahdi: Move the conferencing ioctls into their own functions.
DAHDI_GETCONF, DAHDI_SETCONF, DAHDI_CONFLINK, and DAHDI_CONFDIAG are all
now in their own functions.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9358 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:51 +00:00
Shaun Ruffell
1e068dcf6c dahdi: Move DAHDI_CHANCONFIG ioctl into separate function.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9357 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:47 +00:00
Shaun Ruffell
8a8d98f210 dahdi: Move DAHDI_CHANDIAG ioctl into separate function.
Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9356 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:43 +00:00
Shaun Ruffell
01267db394 dahdi: Refactor some of the access to the 'spans' array.
It is still used at span registration / unregistration to assign the span
number, and when iterating through all spans. Otherwise, moves the code base a
step closer to removal of the 'spans' array.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:39 +00:00
Shaun Ruffell
ee7057f87a dahdi: Embed the proc entries in struct dahdi_span.
Part of preparations for replacing the array of spans with a list of
spans.

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:35 +00:00
Shaun Ruffell
5514b84e06 dahdi: Be more tolerant of surprise removal of channels.
Enable DAHDI to detect if an operation on a file handle refers to a
channel that may have been unregistered. This can occur, for example,
when a board driver is hot-swapped out in a live system.

This patch ensures that file->private_data is always properly set for
any open channel, and it's set back to NULL when a channel is
unregistered.  This way file->private_data can be used to check whether
it's valid to perform an operation on the channel.  (NOTE:  There is
still a race condition here if the driver was unbound on one processor
during the window of time between when file->private_data was checked
and the system call finishes).

Also, since DAHDI should only return -ENODEV on read or write when there
was a surprise device removal on a running system this sleep can prevent
the system from becoming unresponsive if the userspace application does
not check for the -ENODEV error and constantly tries to call read with
elevated privileges.

(issue #17669)
Reported by: tzafrir
Tested by: sruffell

Review: https://reviewboard.asterisk.org/r/905/

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9353 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 20:32:29 +00:00
Shaun Ruffell
078b3b7bbc dahdi: Remove '#if 1' in dahdi_transmit.
Most likely some stale debugging code that slipped in and is now gone.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9350 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 18:54:55 +00:00
Shaun Ruffell
195e87a4c6 wcte12xp: Remove unused 'dtmfactive', 'dtmfmask', and 'dtmfmutemask' members.
These members are no longer used in the driver and are now gone.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9348 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20 18:54:47 +00:00
Shaun Ruffell
dd98bbda37 vpmadt032: Remove potential endless waits when resetting.
It is possible to softlock if the board stops delivering interrupts in
the middle of a reset.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9332 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-16 18:57:39 +00:00
Shaun Ruffell
844714825a wcte12xp: Remove unused 'unchannelized' global.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9329 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 18:35:39 +00:00
Shaun Ruffell
268b7ea24e wcte12xp, wctdm24xxp: '0x0c' -> PCI_CACHE_LINE_SIZE.
Magic number removal.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9327 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 14:02:35 +00:00
Shaun Ruffell
9357a9f953 wcte12xp, wctdm24xxp: Add call to 'pci_set_mwi' on initialization.
I have yet to personally come across a system where this actually
changes the observable behavior, but it certainly seems like the sane
thing to do and I would rather not let this float around as a patch when
I can just merge it in.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 14:02:35 +00:00
Shaun Ruffell
6823665358 wcte12xp, wctdm24xxp: Remove redundant vb_enable_io_access.
These three bits are already set by 'pci_enable_device' and
'pci_set_master' calls.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9325 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 14:02:34 +00:00
Shaun Ruffell
2cc62b7c05 dahdi: 0 -> DAHDI_LAW_DEFAULT
Makes it a little more clear what the '0' parameter represents.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 14:02:33 +00:00
Shaun Ruffell
d37d01c063 wcte12xp: '4' -> 'VPM150M_ACTIVE'.
Replacing magic number.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9323 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 02:42:19 +00:00
Shaun Ruffell
5dc10d2aef dahdi: Remove unused functions __buf_munge and __buf_cpush.
These functions were only defined if BUF_MUNGE was defined, but even if
that symbol is defined there is not anyplace in the driver where these
functions were then called.  This has been in the code since rev 87 so
this is most likely stale debugging code.

Feel free to revert if this is actually used somewhere that is not
apparent.

Here is where the functions were originally added to the drivers:
http://svnview.digium.com/svn/zaptel?view=revision&revision=87

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9322 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 02:20:58 +00:00
Shaun Ruffell
1d5d934052 dahdi: Remove the unused label from __buf_pull and __buf_push calls.
These label parameters were not used in the functions. They are most
likely some debug code that was left over.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9321 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 02:20:54 +00:00
Shaun Ruffell
2826e6a5cb wct4xxp: Put two DMA messages behind debug flag.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9320 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14 02:20:49 +00:00
Shaun Ruffell
ae355cc1db wctdm24xxp, wcte12xp: Fix comment. RELAXED is no longer a mode name.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9319 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-11 19:25:52 +00:00
Shaun Ruffell
75a16b031e wcte12xp: Remove unused functions from t1_span_ops.
'open' and 'close' were already empty.  't1xxp_shutdown' only cleared
DAHDI_FLAGBIT_RUNNING which is already done in dahdi-base.c after calling
shutdown.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9318 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-11 19:25:47 +00:00
Kinsey Moore
048634fc5f dahdi-base: All channels for a span are now unconfigured on shutdown
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9317 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-10 15:54:36 +00:00
Kinsey Moore
973d576ad8 wcte11xp, wcte12xp: Fix a long-standing issue with shutdown
Upon shutdown, both drivers would attempt to power down external
interfaces, but never attempted to bring them back up when the span was
restarted.  Removing that code allows the driver to work properly until
a better solution can be found.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9316 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-10 15:54:35 +00:00
Russ Meyerriecks
c6eb178da3 wct4xxp: Update span-local struct with timing info
dahdi_tool was incorrectly reporting all spans to be in local timing
mode. This is because the driver tracks which span it's timing syncs to,
within the card local struct "wc". We have to manually go through and
copy timing updates to the span local structs because this is what
dahdi_tool actually reads.

dahdi-526

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9312 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-08 21:50:48 +00:00
Shaun Ruffell
c2df83f663 dahdi_dummy: #include <linux/slab.h> for kzalloc and friends.
Fix the same issue as in r8550 for dahdi_dummy.c

(closes issue #17959)
Reported by: glen201

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9307 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-07 13:47:24 +00:00
Russ Meyerriecks
f2fa702132 dahdi-base: Hide "Master changed to" message
Put the "Master changed to xxx/x/x" message behind a debug flag. It's an
implementation specific detail and has caused confusion with customers.
DAHDI-692

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9299 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-03 21:08:05 +00:00
Shaun Ruffell
40ad4a85a3 dahdi: A couple of trivial spelling changes.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9248 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01 15:46:27 +00:00
Shaun Ruffell
e88554710f dahdi: Fix compilation error when CONFIG_DAHDI_NET is defined.
Kernel interface for network devices changed. This is the patch from issue
plus a few trivial checkpatch.pl formatting changes (minus the >80 column
warnings).

(closes issue #17857)
Reported by: msink
Patches:
      dahdi_net-v2.patch uploaded by msink (license 1103)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9247 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01 15:46:26 +00:00
Shaun Ruffell
892fe4b325 dahdi, dahdi_transcode: Remove mmap interface.
There are not any existing users of the interface (and it would always
return -ENOSYS to the caller anyway).

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9246 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01 15:46:25 +00:00
Shaun Ruffell
19f25f79b4 wctdm24xxp: Minor spacing change on module parameter descriptions.
Primarily to add a space between 'use' and 'the' in the alawoverride
description.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9245 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01 15:46:25 +00:00
Shaun Ruffell
bf3fe05dfb wct4xxp: Moving the transmit short detection behind debug module param.
This needs some more testing before it's on by default.  If the card is
otherwise functioning, these messages may be confusing to the user.  If
the card is not functioning, the driver can be reloaded with debug to
check for this condition.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-27 21:59:27 +00:00