[Pkg-voip-commits] r10469 - in /dahdi-linux/trunk/debian: ./ patches/ patches/upstream/

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Mon May 5 09:03:39 UTC 2014


Author: tzafrir
Date: Mon May  5 09:03:39 2014
New Revision: 10469

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10469
Log:
Some extra backported patches under debian/patches/upstream/

Added:
    dahdi-linux/trunk/debian/patches/upstream/
    dahdi-linux/trunk/debian/patches/upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch
    dahdi-linux/trunk/debian/patches/upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch
    dahdi-linux/trunk/debian/patches/upstream/0003-xpp-prevent-double-dahdi-un-registration.patch
    dahdi-linux/trunk/debian/patches/upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch
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=10469&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/changelog	(original)
+++ dahdi-linux/trunk/debian/changelog	Mon May  5 09:03:39 2014
@@ -7,6 +7,7 @@
     - patch hotplug_mod_params: change default of module parameters.
   * Multiarch support. 
   * udev rules moved to package dahdi (in source package dahdi-tools).
+  * Some extra backported patches under debian/patches/upstream/
 
   [ Mark Purcell ]
   * Update debian/watch for ~dfsg

Modified: dahdi-linux/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/series?rev=10469&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/patches/series	(original)
+++ dahdi-linux/trunk/debian/patches/series	Mon May  5 09:03:39 2014
@@ -6,3 +6,9 @@
 tor2-request_firmware
 pciradio-request_firmware
 hotplug_mod_params
+
+# Included in upstream after 2.9.1.1 . Remove in next version:
+upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch
+upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch
+upstream/0003-xpp-prevent-double-dahdi-un-registration.patch
+upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch

Added: dahdi-linux/trunk/debian/patches/upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch?rev=10469&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch	(added)
+++ dahdi-linux/trunk/debian/patches/upstream/0001-xpp-fix-failed-multi-PRI-E1-T1-transition.patch	Mon May  5 09:03:39 2014
@@ -0,0 +1,38 @@
+From 606dd58a479172c4cb71dcad2def9d9b45be3b49 Mon Sep 17 00:00:00 2001
+From: Oron Peled <oron.peled at xorcom.com>
+Date: Mon, 7 Apr 2014 07:05:50 -0400
+Subject: [PATCH 1/4] xpp: fix failed multi-PRI E1<->T1 transition
+
+In an Astribank with >= 2 PRI ports, switching from E1 to T1 at run-time
+may fail at the DAHDI_CHANCONFIG ioctl on the first channel in a span,
+That is, on first run of dahdi_cfg, it fails on second span, on second:
+it fails on third span, etc.
+
+The code clears the D-channel information on the DAHDI_CHANCONFIG call
+for the first channel in the span.
+
+However The code tested for the global "channo" rather than the per-span
+"chanpos" to check for the first channel in the span. This the test
+failed.
+
+Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+---
+ drivers/dahdi/xpp/card_pri.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c
+index c586115..f4a40bf 100644
+--- a/drivers/dahdi/xpp/card_pri.c
++++ b/drivers/dahdi/xpp/card_pri.c
+@@ -1231,7 +1231,7 @@ static int pri_chanconfig(struct file *file, struct dahdi_chan *chan,
+ 		if (priv->pri_protocol != PRI_PROTO_E1 && priv->is_cas != 0)
+ 			set_mode_cas(xpd, 0);
+ 	} else {
+-		if (chan->channo == 1) {
++		if (chan->chanpos == 1) {
+ 			XPD_DBG(GENERAL, xpd,
+ 				"channel %d (%s) marked a not DChan\n",
+ 				chan->channo, chan->name);
+-- 
+1.7.10.4
+

Added: dahdi-linux/trunk/debian/patches/upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch?rev=10469&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch	(added)
+++ dahdi-linux/trunk/debian/patches/upstream/0002-xpp-new-xbus-attribute-dahdi_registration.patch	Mon May  5 09:03:39 2014
@@ -0,0 +1,77 @@
+From 193c9e59a8c2b5f6a0519fa0c5bbe5766bea5e15 Mon Sep 17 00:00:00 2001
+From: Oron Peled <oron.peled at xorcom.com>
+Date: Mon, 17 Mar 2014 12:35:39 -0400
+Subject: [PATCH 2/4] xpp: new xbus attribute: dahdi_registration
+
+XPP devices have implicit support for device registration and
+unregistration. Even though it is only used for the legacy (non-hotplug)
+configuration case, we still prefer to make it explicit.
+
+This attribute would later allow a simpler implementation of the user
+space (xpp-specific) tool dahdi_registration.
+
+Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+---
+ drivers/dahdi/xpp/xbus-sysfs.c |   39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c
+index 24dcda2..c92ccb7 100644
+--- a/drivers/dahdi/xpp/xbus-sysfs.c
++++ b/drivers/dahdi/xpp/xbus-sysfs.c
+@@ -302,6 +302,42 @@ field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
+ xbus_attr(connector, "%s\n");
+ xbus_attr(label, "%s\n");
+ 
++static DEVICE_ATTR_WRITER(dahdi_registration_store, dev, buf, count)
++{
++	xbus_t *xbus;
++	int dahdi_reg;
++	int ret;
++
++	xbus = dev_to_xbus(dev);
++	if (!xbus)
++		return -ENODEV;
++	ret = sscanf(buf, "%d", &dahdi_reg);
++	if (ret != 1)
++		return -EINVAL;
++	if (dahdi_reg) {
++		ret = xbus_register_dahdi_device(xbus);
++		if (ret < 0) {
++			XBUS_ERR(xbus,
++				"xbus_register_dahdi_device() failed (ret = %d)\n",
++				ret);
++			return ret;
++		}
++	} else {
++		xbus_unregister_dahdi_device(xbus);
++	}
++	return count;
++}
++
++static DEVICE_ATTR_READER(dahdi_registration_show, dev, buf)
++{
++	xbus_t *xbus;
++	int len;
++
++	xbus = dev_to_xbus(dev);
++	len = sprintf(buf, "%d\n", xbus_is_registered(xbus));
++	return len;
++}
++
+ static struct device_attribute xbus_dev_attrs[] = {
+ 	__ATTR_RO(connector),
+ 	__ATTR_RO(label),
+@@ -316,6 +352,9 @@ static struct device_attribute xbus_dev_attrs[] = {
+ #ifdef	SAMPLE_TICKS
+ 	__ATTR(samples, S_IWUSR | S_IRUGO, samples_show, samples_store),
+ #endif
++	__ATTR(dahdi_registration, S_IRUGO | S_IWUSR,
++		dahdi_registration_show,
++		dahdi_registration_store),
+ 	__ATTR_NULL,
+ };
+ 
+-- 
+1.7.10.4
+

Added: dahdi-linux/trunk/debian/patches/upstream/0003-xpp-prevent-double-dahdi-un-registration.patch
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/upstream/0003-xpp-prevent-double-dahdi-un-registration.patch?rev=10469&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/upstream/0003-xpp-prevent-double-dahdi-un-registration.patch	(added)
+++ dahdi-linux/trunk/debian/patches/upstream/0003-xpp-prevent-double-dahdi-un-registration.patch	Mon May  5 09:03:39 2014
@@ -0,0 +1,42 @@
+From 5e24d501c585c53bae71ad28e5128d772b4446e2 Mon Sep 17 00:00:00 2001
+From: Oron Peled <oron.peled at xorcom.com>
+Date: Sun, 6 Apr 2014 14:01:55 -0400
+Subject: [PATCH 3/4] xpp: prevent double dahdi un-registration
+
+* It's currently harmless (just re-run the pre/post XPD registrations)
+* But it's cleaner this way (as with xbus_register_dahdi_device())
+
+Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+---
+ drivers/dahdi/xpp/xbus-core.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
+index a7bb798..d5ad1ec 100644
+--- a/drivers/dahdi/xpp/xbus-core.c
++++ b/drivers/dahdi/xpp/xbus-core.c
+@@ -1040,6 +1040,13 @@ void xbus_unregister_dahdi_device(xbus_t *xbus)
+ 		XBUS_ERR(xbus, "dahdi_registration_mutex already taken\n");
+ 		return;
+ 	}
++	if (!xbus_is_registered(xbus)) {
++		/*
++		 * Ignore duplicate unregistrations
++		 */
++		XBUS_DBG(DEVICES, xbus, "Already unregistered to DAHDI\n");
++		goto err;
++	}
+ 	for (i = 0; i < MAX_XPDS; i++) {
+ 		xpd_t *xpd = xpd_of(xbus, i);
+ 		xpd_dahdi_preunregister(xpd);
+@@ -1054,6 +1061,7 @@ void xbus_unregister_dahdi_device(xbus_t *xbus)
+ 		xpd_t *xpd = xpd_of(xbus, i);
+ 		xpd_dahdi_postunregister(xpd);
+ 	}
++err:
+ 	mutex_unlock(&dahdi_registration_mutex);
+ }
+ 
+-- 
+1.7.10.4
+

Added: dahdi-linux/trunk/debian/patches/upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch?rev=10469&op=file
==============================================================================
--- dahdi-linux/trunk/debian/patches/upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch	(added)
+++ dahdi-linux/trunk/debian/patches/upstream/0004-xpp-pri-Fix-more-than-a-single-CAS-R2-call.patch	Mon May  5 09:03:39 2014
@@ -0,0 +1,39 @@
+From 15ff405dc80b3dcb2904c5ff1334defdb6b6d383 Mon Sep 17 00:00:00 2001
+From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Date: Sun, 27 Apr 2014 15:21:00 +0300
+Subject: [PATCH 4/4] xpp: pri: Fix more than a single CAS/R2 call
+
+Fixes regression from bb63d03bbad48f798177dfce62a1ee392d736c57 (before
+v2.7.0). This failed to set the PCM mask on a CAS span when
+DAHDI_AUDIO_NOTIFY was not set.
+
+As the first channel of each xbus would be enabled (for
+synchronization), a single call may still have passed.
+
+This patch sets the PCM mask on any CAS channel explicitly.
+
+Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+---
+ drivers/dahdi/xpp/card_pri.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c
+index f4a40bf..29b457b 100644
+--- a/drivers/dahdi/xpp/card_pri.c
++++ b/drivers/dahdi/xpp/card_pri.c
+@@ -524,9 +524,12 @@ static void PRI_card_pcm_recompute(xpd_t *xpd, xpp_line_t pcm_mask)
+ 	//XPD_DBG(SIGNAL, xpd, "pcm_mask=0x%X\n", pcm_mask);
+ 	/* Add/remove all the trivial cases */
+ 	pcm_mask |= PHONEDEV(xpd).offhook_state;
++	if (priv->is_cas)
++		pcm_mask |= BITMASK(PHONEDEV(xpd).channels);
+ 	for_each_line(xpd, i)
+ 	    if (IS_SET(pcm_mask, i))
+ 		line_count++;
++	    else
+ 	if (priv->is_cas) {
+ 		if (priv->pri_protocol == PRI_PROTO_E1) {
+ 			/* CAS: Don't send PCM to D-Channel */
+-- 
+1.7.10.4
+




More information about the Pkg-voip-commits mailing list