Commit Graph

176 Commits

Author SHA1 Message Date
Shaun Ruffell
c6ae6d6cec dahdi: Trivial move of sync_tick callback to inline function.
This is a trivial cleanup to primarily to remove the #ifdef test out of
process_masterspan.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9586 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:34 +00:00
Shaun Ruffell
2f3b2a4f62 'dahdi_copy_string()' -> 'strlcpy()'
There is already a safe string copying function in all the kernels DAHDI
currently supports.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9585 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:29 +00:00
Shaun Ruffell
25a8bb1abe "struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"
2.6.25 added the DEFINE_PCI_DEVICE_TABLE macro to make sure that the
pci_device_id tables are put into the correct section in the binary.
Convert all the places where the tables were defined to use them.

This is linux-2.6 commit where the change went in along with the
rationale:  90a1ba0c5e39eeea278f263c28ae02166c5911c8

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9584 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:24 +00:00
Shaun Ruffell
fdaa2d3f49 dahdi: Take a reference count on module when operating on spans directly.
Normally, spans are accessed via channels, which increment the reference
count on the supporting module as part of the open call.  When operating
on spans by number we are susceptible to a module_unload while we are
accessing the span.

Renames find_span to span_find_and_get to indicate that we're both
finding the span by number and increasing the reference count on the
span.  Spans themselves don't currently have reference counts, but we
can increment the reference count on the module that owns the spans.
This will prevent the module that has the span from unloading in the
middle of a span_config call, which in the case of the wcte12xp can take
awhile since the VPM firmware is loading.

Hopefully in the near future the spans themselves will be reference
counted directly.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9583 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:19 +00:00
Shaun Ruffell
c168f838ac dahdi: Add the span onto the list as the very last thing
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9582 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:14 +00:00
Shaun Ruffell
c050ca9065 dahdi: Allow spans to advertise if they can provide any timing.
Some spans, specifically dynamic local spans, should never be the timing
master since they are dependent on some other timing source driving
them.

The bit in 'struct dahdi_span' is named cannot provide timing so that by
default the other drivers will set it to 0.

This is loosely related to issue #13205 but doesn't address any of the
other elements of that issue about how to allow the user to configure
what the master span order of succession is.

(issue #13205)
Reported by: biohumanoid

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9581 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:08 +00:00
Shaun Ruffell
28f559e2ac dahdi_dynamic: Do not depend on BKL for serialization of dspan creation.
Also makes it safe to unregister a dynamic driver when there aren't any
open channels on the dynamic spans.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9580 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:04 +00:00
Shaun Ruffell
e0d94d5ca4 dahdi_dynamic: Pass the dahdi_dynamic to create/destroy functions.
This allows the pvt member to be set under lock without holding the lock
through the call to create destroy.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9578 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:56 +00:00
Shaun Ruffell
b68be9abb5 dahdi_dynamic: Do not enable tasklets by default for dynamic_spans.
Running in tasklets does not work well when dahdi doesn't have a span that is
acting as the master.  In this case, process_masterspan is being called in
system timer that may not be running at 1ms intervals.  The end result is that
the dynamic_run function isn't called for every chunk processed, and there is
data loss.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9577 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:51 +00:00
Shaun Ruffell
e3bf2fe45d dahdi_dynamic: Use dahdi_span_ops.sync_tick for driving dynamic spans.
Dynamic spans that are unable to provide their own timing, like dahdi
local spans, typically derived their timing source from
dahdi_dynamic_ioctl(0,0) call in process_masterspan.

This change uses the sync_tick member of dahdi_span_ops instead so that
dynamic operations do not happen on a span until it is fully registered.
Also removes the check for dahdi_dynamic_ioctl in process masterspan for
those users that never load a dynamic span.

This was originally suggested in a comment on:
(issue #13205)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9576 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:45 +00:00
Shaun Ruffell
8c709f9aa0 dahdi_dynamic: Remove tests for KERNEL_VERSION < 2.6.9
2.6.9 is the earliest kernel version currently supported by DAHDI.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9575 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:41 +00:00
Shaun Ruffell
cee7f745e5 dahdi_dynamic: constify the address parameter to create.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9574 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:36 +00:00
Shaun Ruffell
8212485969 dahdi_dynamic: dynamic drivers should not reference count themselves.
Move the try_module_get/module_put calls from the various dynamic
drivers into the "core" dahdi_dynamic.c file itself.  This way, a
reference count can always be held while calling through the function
pointers.  This is enabled by adding an .owner field to 'struct
dahdi_dynamic_driver'.

Dynamic spans are also unique in dahdi in that they require a "dahdi_cfg
-s" to stop them and release the references on the modules.  This is
counterintuitive. This change makes sure they are reference counted just
like other spans and on driver unload, if there aren't any open handles
from userspace, they will take care of unwinding themselves.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9573 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:32 +00:00
Shaun Ruffell
1aacc92326 dahdi_dynamic: "dahdi_dynamic_[un]register()" -> "dahdi_dynamic_[un]register_driver()"
Clarify that we're registering / unregistering the driver.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9572 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:27 +00:00
Shaun Ruffell
53fef32a61 dahdi_dynamic: Replace usecount and dead members with 'struct kref'
dahdi_dynamic can be converted to use kernel idiomatic reference
counting since DAHDI only supports 2.6.9+ kernels now.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9571 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:23 +00:00
Shaun Ruffell
7251a7e35a dahdi_dynamic_[loc|eth|ethmf]: Remove unused return value from transmit callback.
The return value from the transmit callback function was not used
anywhere, and is now removed.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9570 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:18 +00:00
Shaun Ruffell
c7ae773800 dahdi_dynamic: Use const pointers for dahdi_dynamic_driver strings.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9569 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:13 +00:00
Shaun Ruffell
47ec64f9b0 dahdi_dynamic: kmalloc/memset -> kzalloc
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9568 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:09 +00:00
Shaun Ruffell
5583487c45 dahdi_dynamic: Trivial removal of 'zaptel' references.
Replaces all the 'z' references to 'd' as appropriate and cleans up any
formatting problems that popped up as a result.  The intent here is to
reduce confusion in the future as someone may wonder what the 'Z's refer
to.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9567 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:05 +00:00
Shaun Ruffell
56a6e402ae dahdi_dynamic_loc: Do not call dahdi_dynamic_receive on peers before reg.
It's possible for dahdi_dynamic_loc spans to be "peered" before the
dahdi_span is fully register.  Do not call dahdi_dynamic_receive on any
peers before they are fully registered.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9566 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:25:00 +00:00
Shaun Ruffell
08eb1a560d dahdi_dynamic_loc: Reduce indentation level in 'dahdi_dynamic_local_create()'
This is a trivial formatting change in order to not introduce any warnings.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:24:56 +00:00
Shaun Ruffell
42b9a95b34 dahdi_dynamic_loc: Use a standard kernel linked list.
The memory saved by using a singly linked list does not, in my opinion,
outweigh the benefit of using the standard kernel macros.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9564 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:24:52 +00:00
Shaun Ruffell
3163002ad0 dahdi_dynamic_loc: kmalloc/memset -> kzalloc
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9563 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:24:48 +00:00
Shaun Ruffell
29b0b48096 dahdi_dynamic_loc: Remove references to 'zaptel'
Hopefully will eliminate any questions about what the 'z's are supposed
to represent.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9562 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:24:43 +00:00
Shaun Ruffell
cf2c6ce98b Update copyright on changed files since 2011-01-01.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9560 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 14:55:24 +00:00
Shaun Ruffell
b44ab5ab44 wcte12xp: Remove GpakHpi.h file from drivers/dahdi/wcte12xp
This file is now in drivers/dahdi/voicebus folder.  This file should
have been removed when the Gpak API was moved out of the individual
board drivers.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9559 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 14:55:22 +00:00
Shaun Ruffell
8c790d07a8 wct4xxp: Hold the reglock longer when checking error counters.
This is a very slight performance improvement. Eliminating the need to
save the IRQ flags is probably more of a boost than grabbing and
releasing the reglock.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9558 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 14:55:19 +00:00
Shaun Ruffell
a6c9b88c66 Trivial removal of duplicate #includes
Mostly linux/errno.h was included more than once.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9557 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 14:55:15 +00:00
Shaun Ruffell
a35b0b21da wcb4xxp: HDLC packets do not pass over D-channel.
dahdi/wcb4xxp driver used with Digium Wildcard B410 quad-BRI PCI card
unable to communicate with another ISDN device (ISDN phone, another port
of B410). It appears that B-channels are capable to transport data, but
D-channel is not.

Debug output added into the driver shows that packets are transmitted to
the D-channel, but no packets are received. Further investigation shows
that no interrupts received from Rx FIFO associated with D-channel,
although packets are delivered to the FIFO. I've found that problem is
in improper usage of chan->chanpos while indexing the fifo index
(bspan->fifos): chanpos starts from 1 and fifos starts from 0.
Therefore, garbage read instead of fifo number.

(closes issue #14834)
Reported by: vvv
Patches:
      dahdi-linux-complete-2.2.0-rc1.patch uploaded by vvv (license 741)

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9555 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 13:06:54 +00:00
Shaun Ruffell
8870b8e1fb wcte12xp, wctdm24xxp: Do not call pci_set_drvdata after device initialization.
Instead of using pci_set_drvdata embed the 'struct voicebus_operations'
directly in the context so we can use container_of to find the context.

This resolves a problem where the 'remove_one' callback gets an invalid
pointer to 'struct t1' if the VPMADT032 is in the middle of a reload
when the module is unloading.  DAHDI-783.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9554 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 13:03:49 +00:00
Tzafrir Cohen
5759e5a6a6 constants for ctl, transcode, timer, channel, pseudo
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9552 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 10:49:22 +00:00
Shaun Ruffell
e26a4d25c8 dahdi: Cleanup in the dahdi_chan_poll function.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerreicks <rmeyerreicks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9550 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-21 16:09:31 +00:00
Shaun Ruffell
9496527004 dahdi: Initialize chan->waitq once at registration time.
This is instead of initializing the waitq each time the channel is
opened or closed.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9549 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-21 16:09:27 +00:00
Shaun Ruffell
2765186d03 dahdi: Use a single wait_queue_t for dahdi channels.
Since we've now switched to wait_event_interruptible calls, we have a
condition that we can check when we're awoken.  This allows us to
combine the separate wait queues into a single queue.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9548 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-21 16:09:22 +00:00
Shaun Ruffell
74fff81da4 dahdi: Remove interruptible_sleep_on() calls for WINK/FLASH.
Makes it a little more clear what it is we're really waiting for.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9547 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-21 16:09:17 +00:00
Shaun Ruffell
492315c255 wcb4xxp: Remove unused syncpos member.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9545 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-20 19:49:05 +00:00
Shaun Ruffell
34400ad07c wcte12xp, wctdm24xxp: Use more descriptive symbols for the bus setup.
This is a cleanup patch to make it a little easier to see what the bits
mean.

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@9543 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 18:54:53 +00:00
Shaun Ruffell
4de462c3e0 wctdm24xxp, wcte12xp: Disable PCI read-line multiple command.
There are some platforms where the read-line multiple transaction causes
packets to be dropped in the voicebus pipeline.  The only observable
behavior is that packets just go "missing" in the pipeline.  This also
only appears to affect PCI cards.

A typical 'symptom' of this problem is you may see IRQ misses increasing
without any corresponding "bumps" in latency in the kernel message log.
Normally, IRQ misses are correlated to latency bumps since that is an
indication that the host was not able to service the card interrupt in a
timely fashion. DAHDI-510 DAHDI-774

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9542 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 18:54:49 +00:00
Shaun Ruffell
1d9cbea469 wcb4xxp: Remove redundant dev member from 'struct wcb4xxp'
The 'pdev' member already contained a pointer to what 'dev' was pointing
to.  Also ensure most of the changed lines are under 80 characters.
There are two lines that are were too deeply nested to do anything
sensible.

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@9540 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:35 +00:00
Shaun Ruffell
eba7fe3ca4 wct4xxp: Close a memory leak in the VPM450 error path.
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@9539 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:31 +00:00
Shaun Ruffell
b7cf1d9c02 vpmadt032: Convert ifacelock from rwlock to plain spinlock.
rwlock is slower than normal spinlocks and this lock is rarely contended
for.  Also noticed that the vpmadt032_module_init function is now (was
already) redundant since all the elements initialized in it were already
initialized.

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@9538 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:25 +00:00
Shaun Ruffell
9292e6f0ad wctc4xxp: Make the "mode" module parameter read-only in sysfs.
The mode module parameter is only acted on during module initialization.
We shouldn't allow anyone to change it after the driver is already
loaded.

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@9537 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:21 +00:00
Shaun Ruffell
0c3cbc2c32 wcte12xp: Unregister the span before any additional cleanup.
Span registration is the last step in during initialization and it
should be the first on unregistration.  I also was hit by this when
looking at adding other members to the span and made the assumption that
the span was in a consistent state during unregistration.

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@9536 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:16 +00:00
Shaun Ruffell
5b6fba6e4b wctdm24xxp, wcte12xp: Lock interrupts when recovering from an underrun.
This reduces the chance that another interrupt will interfere with the
recovery process.  Otherwise it is possible that the hardware advances
past the position that we think it is currently at.

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@9535 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:12 +00:00
Shaun Ruffell
cf3e4bd757 wctdm24xxp, wcte12xp: Add more descriptive message on a failed reset.
Reading 0xffffffff from the registers is a different error than just not
coming out of reset.  Add a little extra debugging information.

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@9534 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:07 +00:00
Shaun Ruffell
3203aaf84c dahdi: Do not dereference chan->span for pseudo channels.
Fixes a regression introduced in r9510 which saves a pointer to the ops
member of a channel's span before checking if the channel is a pseudo.
Psuedo channels do not have spans.

(issue #18463)
(issue #18422)
Reported by: alecdavis

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9530 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-13 14:57:12 +00:00
Kinsey Moore
60c4681ec8 dahdi_echocan_hpec: Update the HPEC wrapper to use the new name interface
I apparently forgot all about HPEC when updating the echocans for the change
in the factory and echocan ops structures related to echocan naming.  The HPEC
wrapper should now be up to date with the rest of DAHDI.

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


git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9526 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09 21:52:34 +00:00
Kinsey Moore
7a7d4000a0 dahdi-base, dahdi_echocan_*, wcb4xxp, wct4xxp, wctdm24xxp, wcte12xp, kernel: Allow name of EC factory to vary based on channel
Changed the echocan factory name to a function (get_name) called to get the
name.  This allows a factory to return a different name when being called in
reference to a channel such as in the case of hardware echo cancellers.  To
further accommodate this change for HWEC, a new echocan_name function was
added to the span ops struct and is used in hwec_factory in dahdi-base for
all cards that support hardware echo cancellation.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9524 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09 20:19:26 +00:00
Kinsey Moore
fd01eef199 dahdi-base, kernel, dahdi_echocan_*, wcb4xxp, wct4xxp, wctdm24xxp, wcte12xp: Remove name field from echocan ops
This field was redundant and was only used in places where the factory's name could be used.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9523 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09 20:19:21 +00:00
Kinsey Moore
06eac5b1d2 dahdi-base: Alarms may not be the last item on the line, so don't strip the trailing space
Signed-off-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9522 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09 20:19:18 +00:00