summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_dynamic_loc.c
AgeCommit message (Collapse)Author
2011-01-03dahdi: Allow spans to advertise if they can provide any timing.Shaun Ruffell
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-03dahdi_dynamic: Pass the dahdi_dynamic to create/destroy functions.Shaun Ruffell
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-03dahdi_dynamic: constify the address parameter to create.Shaun Ruffell
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-03dahdi_dynamic: dynamic drivers should not reference count themselves.Shaun Ruffell
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-03dahdi_dynamic: "dahdi_dynamic_[un]register()" -> ↵Shaun Ruffell
"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-03dahdi_dynamic_[loc|eth|ethmf]: Remove unused return value from transmit ↵Shaun Ruffell
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-03dahdi_dynamic_loc: Do not call dahdi_dynamic_receive on peers before reg.Shaun Ruffell
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-03dahdi_dynamic_loc: Reduce indentation level in 'dahdi_dynamic_local_create()'Shaun Ruffell
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-03dahdi_dynamic_loc: Use a standard kernel linked list.Shaun Ruffell
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-03dahdi_dynamic_loc: kmalloc/memset -> kzallocShaun Ruffell
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-03dahdi_dynamic_loc: Remove references to 'zaptel'Shaun Ruffell
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
2010-09-24Move test for DEFINE_SPINLOCK into include/dahdi/kernel.hShaun Ruffell
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
2009-03-18Fix a typoJason Parker
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6201 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-28fix a large number of warnings found by sparse, the kernel code sanity ↵Kevin P. Fleming
checking tool. some of these fixes are non-optimal (casting 'unsigned long' to '__user void *'), but are unavoidable in many cases. started from tzafrir's patch, did most of the work myself. (closes issue #13763) Reported by: tzafrir Patches: sparse_fixes_1.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5162 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-06last round of license header updates hereKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4721 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Change all instances of printk in DAHDI to include a priorityRussell Bryant
(closes issue #11504) Reported by: tzafrir Patches: 20080717__issue11504_dahdi_printk_without_priority.diff uploaded by bbryant (license 36) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4685 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-29make an initial split of dahdi/kernel.h into userspace- and ↵Kevin P. Fleming
kernelspace-specific parts git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4628 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-06-20merge modular_ec branch, which adds modular echocan support and lots of ↵Kevin P. Fleming
minor fixes and improvements... seems to work properly, except the usecount on the echocan modules never increments above zero, so they are unloadable when they should not be git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4436 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22and with another fell swoop... 2.4 kernel support is gone tooKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4327 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22and with one fell swoop... devfs support disappearsKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22fix up all remaining references to zaptel/zapata (except for the ones in ↵Kevin P. Fleming
credits that need to be left alone) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21replace Zaptel with DAHDI, ZAPTEL with DAHDI, ZAPATA with DAHDIKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4322 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21replace ZT_ with DAHDI_, zt_ with dahdi_Kevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4320 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21rename modules from zt prefixes to dahdi prefixesKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4319 a0bf4364-ded3-4de4-8d8a-66a801d63aff