Commit Graph

11 Commits

Author SHA1 Message Date
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
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
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
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
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