[dahdi-commits] dahdi/linux.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Sun Nov 24 10:09:43 CST 2013
branch "master" has been updated
via 3a0905b1ec0b55edd2f46485759985001a16852d (commit)
via 4a75f58156f7ec15dbba336de3688880ac41677f (commit)
from 2b20289cb7e038f3bf2e095adad026b717ca7a03 (commit)
Summary of changes:
drivers/dahdi/dahdi-base.c | 3 +++
drivers/dahdi/dahdi_dynamic.c | 4 ++++
drivers/dahdi/oct612x/oct612x-user.c | 19 +++++++++++++++++++
include/dahdi/kernel.h | 1 +
4 files changed, 27 insertions(+)
- Log -----------------------------------------------------------------
commit 3a0905b1ec0b55edd2f46485759985001a16852d
Author: Shaun Ruffell <sruffell at digium.com>
Date: Wed Jul 24 17:44:11 2013 -0500
dahdi_dynamic: Create a span type for dynamic spans.
Fixes the following warning when loading the driver:
dahdi: Warning: Span DYN/eth/eth1/00:50:c2:97:92:1d/1 didn't specify a spantype. Please fix driver!
The spantype is intended to be used by the auto configuration tools
(dahdi_genconf, pinned spans, etc..) but dynamic spans, since they are created
directly by dahdi_cfg, never take part in the pre-registration auto
configuration, therefore the span type was never used.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 74d46f3..6d61dad 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -732,6 +732,8 @@ enum spantypes dahdi_str2spantype(const char *name)
return SPANTYPE_DIGITAL_BRI_TE;
else if (strcasecmp("BRI_SOFT", name) == 0)
return SPANTYPE_DIGITAL_BRI_SOFT;
+ else if (strcasecmp("DYNAMIC", name) == 0)
+ return SPANTYPE_DIGITAL_DYNAMIC;
else
return SPANTYPE_INVALID;
}
@@ -749,6 +751,7 @@ const char *dahdi_spantype2str(enum spantypes st)
case SPANTYPE_DIGITAL_BRI_NT: return "BRI_NT";
case SPANTYPE_DIGITAL_BRI_TE: return "BRI_TE";
case SPANTYPE_DIGITAL_BRI_SOFT: return "BRI_SOFT";
+ case SPANTYPE_DIGITAL_DYNAMIC: return "DYNAMIC";
default:
case SPANTYPE_INVALID: return "INVALID";
};
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index 72fbf5e..3ee1ad2 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -630,6 +630,10 @@ static int _create_dynamic(struct dahdi_dynamic_span *dds)
d->span.deflaw = DAHDI_LAW_MULAW;
d->span.flags |= DAHDI_FLAG_RBS;
d->span.chans = d->chans;
+ d->span.spantype = SPANTYPE_DIGITAL_DYNAMIC;
+ d->span.linecompat = DAHDI_CONFIG_D4 | DAHDI_CONFIG_ESF |
+ DAHDI_CONFIG_AMI | DAHDI_CONFIG_B8ZS | DAHDI_CONFIG_CCS |
+ DAHDI_CONFIG_HDB3 | DAHDI_CONFIG_CRC4 | DAHDI_CONFIG_NOTOPEN;
d->span.ops = &dynamic_ops;
for (x = 0; x < d->span.channels; x++) {
sprintf(d->chans[x]->name, "DYN/%s/%s/%d",
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index c71e909..d13e60b 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -811,6 +811,7 @@ enum spantypes {
SPANTYPE_DIGITAL_BRI_NT,
SPANTYPE_DIGITAL_BRI_TE,
SPANTYPE_DIGITAL_BRI_SOFT,
+ SPANTYPE_DIGITAL_DYNAMIC,
};
const char *dahdi_spantype2str(enum spantypes st);
enum spantypes dahdi_str2spantype(const char *name);
commit 4a75f58156f7ec15dbba336de3688880ac41677f
Author: Shaun Ruffell <sruffell at digium.com>
Date: Fri Nov 22 11:28:21 2013 -0600
oct612x: Make dependent on dahdi.ko
This change will ensure that the oct612x module is unloaded automatically when
/etc/init.d/dahdi stop is run.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/drivers/dahdi/oct612x/oct612x-user.c b/drivers/dahdi/oct612x/oct612x-user.c
index adb8376..b5a845a 100644
--- a/drivers/dahdi/oct612x/oct612x-user.c
+++ b/drivers/dahdi/oct612x/oct612x-user.c
@@ -23,6 +23,8 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <dahdi/kernel.h>
+
#include "oct612x.h"
UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
@@ -176,6 +178,23 @@ EXPORT_SYMBOL(Oct6100ChannelOpen);
EXPORT_SYMBOL(Oct6100ChannelOpenDef);
EXPORT_SYMBOL(Oct6100ChannelModifyDef);
+static int __init oct612x_module_init(void)
+{
+ /* This registration with dahdi.ko will fail since the span is not
+ * defined, but it will make sure that this module is a dependency of
+ * dahdi.ko, so that when it is being unloded, this module will be
+ * unloaded as well. */
+ dahdi_register_device(NULL, NULL);
+ return 0;
+}
+module_init(oct612x_module_init);
+
+static void __exit oct612x_module_cleanup(void)
+{
+ /* Nothing to do */;
+}
+module_exit(oct612x_module_cleanup);
+
MODULE_AUTHOR("Digium Incorporated <support at digium.com>");
MODULE_DESCRIPTION("Octasic OCT6100 Hardware Echocan Library");
MODULE_LICENSE("GPL v2");
-----------------------------------------------------------------------
--
dahdi/linux.git
More information about the dahdi-commits
mailing list