[Pkg-voip-commits] r10311 - in /dahdi-linux/trunk/debian: changelog patches/hotplug_mod_params patches/location patches/series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Wed Oct 2 17:59:59 UTC 2013


Author: tzafrir
Date: Wed Oct  2 17:59:59 2013
New Revision: 10311

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10311
Log:
Experiment with hotplug support

- patch location: another attribute we probably need to expose through
  sysfs.
- patch hotplug_mod_params: change default of module parameters.

Added:
    dahdi-linux/trunk/debian/patches/hotplug_mod_params
    dahdi-linux/trunk/debian/patches/location
Modified:
    dahdi-linux/trunk/debian/changelog
    dahdi-linux/trunk/debian/patches/series

Modified: dahdi-linux/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/changelog?rev=10311&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/changelog	(original)
+++ dahdi-linux/trunk/debian/changelog	Wed Oct  2 17:59:59 2013
@@ -1,3 +1,12 @@
+dahdi-linux (1:2.7.0.1~dfsg-2) UNRELEASED; urgency=low
+
+  * Experiment with hotplug support:
+    - patch location: another attribute we probably need to expose through
+      sysfs.
+    - patch hotplug_mod_params: change default of module parameters.
+
+ -- Tzafrir Cohen <tzafrir at debian.org>  Wed, 02 Oct 2013 20:57:50 +0300
+
 dahdi-linux (1:2.7.0.1~dfsg-1) unstable; urgency=low
 
   * New upstream release

Added: dahdi-linux/trunk/debian/patches/hotplug_mod_params
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/hotplug_mod_params?rev=10311&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/hotplug_mod_params	(added)
+++ dahdi-linux/trunk/debian/patches/hotplug_mod_params	Wed Oct  2 17:59:59 2013
@@ -0,0 +1,32 @@
+Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Description: use hotplug mode by default
+
+Make XPP XPDs appear automatically in DAHDI but make DAHDI spans not
+register automatically in DAHDI and wait for userspace to decide of
+their order ("pinned-spans").
+
+This should allow configuration of each device independently in a udev
+hook rather than all of them together in the init script.
+
+--- a/drivers/dahdi/dahdi-base.c
++++ b/drivers/dahdi/dahdi-base.c
+@@ -7327,7 +7327,7 @@ int dahdi_assign_device_spans(struct dah
+ 	return 0;
+ }
+ 
+-static int auto_assign_spans = 1;
++static int auto_assign_spans = 0;
+ static const char *UNKNOWN = "";
+ 
+ /**
+--- a/drivers/dahdi/xpp/xbus-core.c
++++ b/drivers/dahdi/xpp/xbus-core.c
+@@ -59,7 +59,7 @@ static DEF_PARM(uint, command_queue_leng
+ 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, 0, 0644,
++static DEF_PARM_BOOL(dahdi_autoreg, 1, 0644,
+ 		     "Register devices automatically (1) or not (0)");
+ 
+ #ifdef	CONFIG_PROC_FS

Added: dahdi-linux/trunk/debian/patches/location
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/location?rev=10311&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/location	(added)
+++ dahdi-linux/trunk/debian/patches/location	Wed Oct  2 17:59:59 2013
@@ -0,0 +1,52 @@
+From d4c8eb47ac369c41343bba399a028842580529b1 Mon Sep 17 00:00:00 2001
+From: Oron Peled <oron.peled at xorcom.com>
+Date: Sun, 29 Sep 2013 10:04:32 +0200
+Subject: [PATCH] add a 'location' attribute to sysfs (dahdi_device):
+
+* Our user-space previously used the implicit location from the sysfs
+  device path of the "dahdi_device".
+* However:
+  - Sysfs paths are very limited in length.
+  - Low-level driver need more control on the location field.
+  - For example, it need to be persistant for span_assignments.
+* We now export explicitly the 'location' field which is managed by
+  low-level drivers.
+* We will use this field as the location in span_assignments.
+
+Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+---
+ drivers/dahdi/dahdi-sysfs.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/dahdi/dahdi-sysfs.c b/drivers/dahdi/dahdi-sysfs.c
+index 1715f8f..2b50c3f 100644
+--- a/drivers/dahdi/dahdi-sysfs.c
++++ b/drivers/dahdi/dahdi-sysfs.c
+@@ -403,6 +403,16 @@ dahdi_device_hardware_id_show(struct device *dev,
+ }
+ 
+ static ssize_t
++dahdi_device_location_show(struct device *dev,
++			     struct device_attribute *attr, char *buf)
++{
++	struct dahdi_device *ddev = to_ddev(dev);
++
++	return sprintf(buf, "%s\n",
++		(ddev->location) ? ddev->location : "");
++}
++
++static ssize_t
+ dahdi_device_auto_assign(struct device *dev, struct device_attribute *attr,
+ 			 const char *buf, size_t count)
+ {
+@@ -549,6 +559,7 @@ static struct device_attribute dahdi_device_attrs[] = {
+ 	__ATTR(type, S_IRUGO, dahdi_device_type_show, NULL),
+ 	__ATTR(span_count, S_IRUGO, dahdi_device_span_count_show, NULL),
+ 	__ATTR(hardware_id, S_IRUGO, dahdi_device_hardware_id_show, NULL),
++	__ATTR(location, S_IRUGO, dahdi_device_location_show, NULL),
+ 	__ATTR(auto_assign, S_IWUSR, NULL, dahdi_device_auto_assign),
+ 	__ATTR(assign_span, S_IWUSR, NULL, dahdi_device_assign_span),
+ 	__ATTR(unassign_span, S_IWUSR, NULL, dahdi_device_unassign_span),
+-- 
+1.7.10.4
+

Modified: dahdi-linux/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/series?rev=10311&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/patches/series	(original)
+++ dahdi-linux/trunk/debian/patches/series	Wed Oct  2 17:59:59 2013
@@ -5,3 +5,5 @@
 notest
 tor2-request_firmware
 pciradio-request_firmware
+location
+hotplug_mod_params




More information about the Pkg-voip-commits mailing list