[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Jan 28 11:36:16 CST 2014


branch "master" has been updated
       via  2c4373972b7ff90ac4e69f26261a4bff69e56837 (commit)
       via  2ecf700dd8d4972f0516cc817bc3b56016c9a591 (commit)
       via  74e949c33aeb6cf2cf2c33364e12b227c4579ca7 (commit)
      from  3efa9d8cd1f65f1cf524a041cf68a87df44c1080 (commit)

Summary of changes:
 README                        |   11 ++++++-----
 drivers/dahdi/dahdi-base.c    |    3 ++-
 drivers/dahdi/xpp/xbus-core.c |   10 +++++++---
 include/dahdi/kernel.h        |    1 +
 4 files changed, 16 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit 2c4373972b7ff90ac4e69f26261a4bff69e56837
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Tue Jan 28 16:37:04 2014 +0200

    README: xpp.dahdi_autoreg is deprecated
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/README b/README
index 6985f2b..224711b 100644
--- a/README
+++ b/README
@@ -528,11 +528,12 @@ XPP (Astribank) module parameters
 ==== dahdi_autoreg
 (xpp)
 
-Register spans automatically (1) or not (0). Default: 0.
-Setting it simplifies operations with a single Astribank and no other
-DAHDI hardware. However if you have such systems, automatic
-registration can cause the order of spans to be unpredictable.
-The standard startup scripts use 'dahdi_registration on' instead of this.
+Deprecated. See dahdi.<<_auto_assign_spans,auto_assign_spans>> above.
+
+Originally had a somewhat similar (but xpp-specific and more limited)
+role to auto_assign_spans. For backward compatibility this variable is
+still kept, but its value is unused. Astribanks will auto-register
+with dahdi if auto_assign_spans is not set.
 
 ==== tools_rootdir
 (xpp)

commit 2ecf700dd8d4972f0516cc817bc3b56016c9a591
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Sun Jan 26 16:11:01 2014 +0200

    xpp: continue xpp.dahdi_autoreg deprecation
    
    * Set it to 0 by default (as we use dahdi.auto_assign_spans now)
    * Make it readonly (no runtime changes)
    * Warn during startup if it was forced to 1
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index c00f20a..316d2be 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -60,7 +60,7 @@ static DEF_PARM(uint, command_queue_length, 1500, 0444,
 static DEF_PARM(uint, poll_timeout, 1000, 0644,
 		"Timeout (in jiffies) waiting for units to reply");
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
-static DEF_PARM_BOOL(dahdi_autoreg, 1, 0644,
+static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
 		     "Register devices automatically (1) or not (0). UNUSED.");
 
 #ifdef	CONFIG_PROC_FS
@@ -1977,6 +1977,10 @@ int __init xbus_core_init(void)
 {
 	int ret = 0;
 
+	if (dahdi_autoreg == 1) {
+		NOTICE("WARNING: The dahdi_autoreg parameter is deprecated " \
+			"-- just set dahdi.auto_assign_spans=0\n");
+	}
 	initialize_xbuses_array();
 #ifdef PROTOCOL_DEBUG
 	INFO("FEATURE: with PROTOCOL_DEBUG\n");

commit 74e949c33aeb6cf2cf2c33364e12b227c4579ca7
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Sun Jan 26 16:11:00 2014 +0200

    xpp: deprecate dahdi_autoreg
    
    Instead, use the inverse of dahdi.auto_assign_spans value.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 908001a..8bba465 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -7373,7 +7373,8 @@ int dahdi_assign_device_spans(struct dahdi_device *ddev)
 	return 0;
 }
 
-static int auto_assign_spans = 1;
+int auto_assign_spans = 1;
+EXPORT_SYMBOL(auto_assign_spans);
 static const char *UNKNOWN = "";
 
 /**
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index 7f4bf71..c00f20a 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -61,7 +61,7 @@ static DEF_PARM(uint, poll_timeout, 1000, 0644,
 		"Timeout (in jiffies) waiting for units to reply");
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
 static DEF_PARM_BOOL(dahdi_autoreg, 1, 0644,
-		     "Register devices automatically (1) or not (0)");
+		     "Register devices automatically (1) or not (0). UNUSED.");
 
 #ifdef	CONFIG_PROC_FS
 static const struct file_operations xbus_read_proc_ops;
@@ -1118,7 +1118,7 @@ void xbus_populate(void *data)
 	 */
 	xbus_request_sync(xbus, SYNC_MODE_PLL);
 	elect_syncer("xbus_populate(end)");	/* FIXME: try to do it later */
-	if (dahdi_autoreg)
+	if (!auto_assign_spans)
 		xbus_register_dahdi_device(xbus);
 out:
 	XBUS_DBG(DEVICES, xbus, "Leaving\n");
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 3f14727..eef65a9 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -1279,6 +1279,7 @@ static inline void dahdi_ec_span(struct dahdi_span *span)
 }
 
 extern struct file_operations *dahdi_transcode_fops;
+extern int auto_assign_spans;
 
 /* Don't use these directly -- they're not guaranteed to
    be there. */

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list