summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_dynamic_ethmf.c
AgeCommit message (Collapse)Author
2012-03-13Remove support for kernels < 2.6.18Tzafrir Cohen
This patch removes support for kernel versions < 2.6.18, as those are not actively supported in any major Linux distribution (except RHEL4, which is in the "extended" support level of the product life cycle). This removes much of the more #ifdef-rich parts of the code. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10472 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03'dahdi_copy_string()' -> 'strlcpy()'Shaun Ruffell
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-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
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
2010-02-26dahdi_dynamic: Use kernel versions where interface changed for workarounds.Shaun Ruffell
atomic_inc_return was added in 2.6.10, and synchronize_rcu() was added in 2.6.12. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8142 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26dahdi_dynamic: Changes to allow to compile against vanilla 2.6.9 kernel.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8140 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-25dahdi_dynamic: trivial checkpatch.pl formatting changes.Shaun Ruffell
Just removing the errors only. I left the warnings for now. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8104 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-25dahdi_dynamic: Add TDMoE Multi-Frame support.Shaun Ruffell
Add TDMoE Multi-Frame support as described in the article at the following URL: http://www.thrallingpenguin.com/articles/tdmoe-mf.htm TDMoE-MF is known to be implemented in hardware solutions from Redfone Communications. This patch additionally implements RCU within dahdi_dynamic to decrease lock contention, latency, and context switching. Because of the use of RCU locking, all prior known issues with loading and unloading of the modules are resolved, providing the spans are shutdown with "dahdi_cfg -s". It also contains an attempt, which works, at fixing a kernel change with skb_linearize(). The use of kernel version number does not work with SuSE SLES 10, as it appears they have backported the 2.6.18 change in to their 2.6.16 version. This merges in the work Jbenden did at: http://svn.digium.com/svn/dahdi/team/jbenden/tdmoe-mf@8102 (issue #13483) Patch by: JBenden Reported by: JBenden Tested by: JBenden git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8103 a0bf4364-ded3-4de4-8d8a-66a801d63aff