[Pkg-voip-commits] r5220 - in /zaptel/trunk: debian/changelog debian/docs debian/patches/separate_kbuild debian/patches/series debian/rules oslec/oslec_wrap.c
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Sun Feb 17 22:52:33 UTC 2008
Author: tzafrir-guest
Date: Sun Feb 17 22:52:32 2008
New Revision: 5220
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5220
Log:
* Converting patches to quilt (because bristuff uses them).
* Include the separate xpp changelog file.
* separate_kbuild: Fix building kernel 2.6.24 (Closes: #464900).
* Fix a possible crash with oslec when a fax tone is detected:
http://sourceforge.net/mailarchive/message.php?msg_name=20080217212421.GT15415%40xorcom.com
(Closes: #447245).
Added:
zaptel/trunk/debian/patches/separate_kbuild
Modified:
zaptel/trunk/debian/changelog
zaptel/trunk/debian/docs
zaptel/trunk/debian/patches/series
zaptel/trunk/debian/rules
zaptel/trunk/oslec/oslec_wrap.c
Modified: zaptel/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/changelog?rev=5220&op=diff
==============================================================================
--- zaptel/trunk/debian/changelog (original)
+++ zaptel/trunk/debian/changelog Sun Feb 17 22:52:32 2008
@@ -1,8 +1,13 @@
zaptel (1:1.4.8~dfsg-2) UNRELEASED; urgency=low
- * Converting patches to quilt (because bristuff uses them).
-
- -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Sun, 10 Feb 2008 09:17:33 +0200
+ * Converting patches to quilt (because bristuff uses them).
+ * Include the separate xpp changelog file.
+ * separate_kbuild: Fix building kernel 2.6.24 (Closes: #464900).
+ * Fix a possible crash with oslec when a fax tone is detected:
+ http://sourceforge.net/mailarchive/message.php?msg_name=20080217212421.GT15415%40xorcom.com
+ (Closes: #447245).
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Mon, 18 Feb 2008 00:42:29 +0200
zaptel (1:1.4.8~dfsg-1) unstable; urgency=low
Modified: zaptel/trunk/debian/docs
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/docs?rev=5220&op=diff
==============================================================================
--- zaptel/trunk/debian/docs (original)
+++ zaptel/trunk/debian/docs Sun Feb 17 22:52:32 2008
@@ -4,4 +4,5 @@
README.fxsusb
xpp/README.Astribank
xpp/README.Astribank.html
+xpp/Changelog_xpp
tonezones.txt
Added: zaptel/trunk/debian/patches/separate_kbuild
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/separate_kbuild?rev=5220&op=file
==============================================================================
--- zaptel/trunk/debian/patches/separate_kbuild (added)
+++ zaptel/trunk/debian/patches/separate_kbuild Sun Feb 17 22:52:32 2008
@@ -1,0 +1,79 @@
+# separa_kbuild by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+#
+# Separate the kernel 2.6 build system out from the main Makefile.
+# This is a minimal and relatively non-intrusive version of those
+# changes. It does not work with kernels below 2.6.10 . A proper fix
+# should be included with zaptel 1.4.9 / zaptel 1.2.23 .
+
+--- zaptel-1.4.8~dfsg.orig/Makefile
++++ zaptel-1.4.8~dfsg/Makefile
+@@ -5,6 +5,13 @@
+ #
+ #
+
++ifneq ($(KBUILD_EXTMOD),)
++# We only get in here if we're from kernel 2.6 <= 2.6.8 and going through
++# Kbuild. Later versions will include Kbuild instead of Makefile.
++include Kbuild
++
++else
++
+ CFLAGS+=-DSTANDALONE_ZAPATA -DBUILDING_TONEZONE
+
+ ifeq ($(MAKELEVEL),0)
+@@ -127,6 +134,7 @@ obj-m+=$(BUILD_SUBDIR_MODULES:%=%/)
+ include $(src)/Makefile.kernel26
+
+ else
++KBUILD_OBJ_M=$(BUILD_TOPDIR_MODULES:%=%.o) $(BUILD_SUBDIR_MODULES:%=%/)
+
+ ifeq ($(BUILDVER),linux24)
+ INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=%.o)
+@@ -178,7 +186,8 @@ MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
+
+ KFLAGS+=-DSTANDALONE_ZAPATA
+ CFLAGS+=-DSTANDALONE_ZAPATA
+-KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
++KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) \
++ HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
+ KMAKE_INST = $(KMAKE) \
+ INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
+
+@@ -688,3 +697,6 @@ menuselect-tree: zaptel.xml firmware/fir
+ .PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
+
+ endif
++
++#end of: ifneq ($(KBUILD_EXTMOD),)
++endif
+--- zaptel-1.4.8~dfsg.orig/wctc4xxp/Kbuild
++++ zaptel-1.4.8~dfsg/wctc4xxp/Kbuild
+@@ -1,6 +1,6 @@
+ obj-m += wctc4xxp.o
+
+-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
++EXTRA_CFLAGS := -I$(src)/.. -Wno-undef -DSTANDALONE_ZAPATA
+
+ wctc4xxp-objs := base.o
+
+--- zaptel-1.4.8~dfsg.orig/Makefile.kernel26
++++ zaptel-1.4.8~dfsg/Makefile.kernel26
+@@ -2,9 +2,13 @@ ifdef ECHO_CAN_NAME
+ ECHO_CAN_CFLAGS := -DECHO_CAN_FROMENV -DECHO_CAN_$(ECHO_CAN_NAME)
+ endif
+
+-EXTRA_CFLAGS := -I$(src)
++obj-m := $(KBUILD_OBJ_M)
++
++EXTRA_CFLAGS := -I$(src) -DSTANDALONE_ZAPATA
+ EXTRA_CFLAGS += $(ECHO_CAN_CFLAGS)
+
++TEST_VAR := $(shell echo >&2; echo "obj-m=$(obj-m)." >&2; echo >&2)
++
+ # fix typo present in CentOS and RHEL 2.6.9 kernels
+ BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2
+ BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp)
+--- /dev/null
++++ zaptel-1.4.8~dfsg/Kbuild
+@@ -0,0 +1 @@
++include $(src)/Makefile.kernel26
Modified: zaptel/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/series?rev=5220&op=diff
==============================================================================
--- zaptel/trunk/debian/patches/series (original)
+++ zaptel/trunk/debian/patches/series Sun Feb 17 22:52:32 2008
@@ -8,3 +8,4 @@
zaphfc-florz
zaptel_perl
kbuild_src
+separate_kbuild
Modified: zaptel/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/rules?rev=5220&op=diff
==============================================================================
--- zaptel/trunk/debian/rules (original)
+++ zaptel/trunk/debian/rules Sun Feb 17 22:52:32 2008
@@ -172,7 +172,7 @@
# driver source code
mkdir -p $(TARDIR)/debian/generated
- cp Makefile Makefile.kernel26 configure install-sh makeopts.in .version *.c *.h *.rbt $(TARDIR)/
+ cp Makefile Makefile.kernel26 Kbuild configure install-sh makeopts.in .version *.c *.h *.rbt $(TARDIR)/
for dir in build_tools firmware include vzaphfc oct612x oslec \
wct4xxp wctc4xxp wctdm24xxp wcte12xp xpp; do \
if [ -d $$dir ]; then cp -r $$dir $(TARDIR); fi; \
Modified: zaptel/trunk/oslec/oslec_wrap.c
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/oslec/oslec_wrap.c?rev=5220&op=diff
==============================================================================
--- zaptel/trunk/oslec/oslec_wrap.c (original)
+++ zaptel/trunk/oslec/oslec_wrap.c Sun Feb 17 22:52:32 2008
@@ -103,9 +103,14 @@
static int len_ec;
/* We need this lock as multiple threads may try to manipulate
- the globals used for diagnostics at the same time */
-
-DECLARE_MUTEX(oslec_lock);
+ the globals used for diagnostics at the same time.
+
+ This lock locks two separate sctivities:
+ 1/ any access to the global mon_ec pointer and related globals num_ec
+ len_ec.
+ 2/ Any use of an echo canceller that does not require a channel lock. */
+
+spinlock_t oslec_lock;
/* Thread safety issues:
@@ -135,8 +140,8 @@
struct echo_can_state *oslec_echo_can_create(int len, int adaption_mode) {
struct echo_can_state *ec;
-
- down(&oslec_lock);
+ unsigned long flags;
+
ec = (struct echo_can_state *)malloc(sizeof(struct echo_can_state));
ec->ec = (void*)echo_can_create(len, ECHO_CAN_USE_ADAPTION
@@ -145,6 +150,8 @@
| ECHO_CAN_USE_TX_HPF
| ECHO_CAN_USE_RX_HPF);
+
+ spin_lock_irqsave(&oslec_lock, flags);
num_ec++;
/* We monitor the first e/c created after mon_ec is set to NULL. If
@@ -159,13 +166,14 @@
len_ec = len;
}
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return ec;
}
void oslec_echo_can_free(struct echo_can_state *ec) {
- down(&oslec_lock);
+ unsigned int flags;
+ spin_lock_irqsave(&oslec_lock, flags);
/* if this is the e/c being monitored, disable monitoring */
@@ -176,7 +184,7 @@
num_ec--;
free(ec);
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
}
/*
@@ -231,14 +239,15 @@
{
int len;
char mode_str[80];
+ unsigned int flags;
*eof = 1;
- down(&oslec_lock);
+ spin_lock_irqsave(&oslec_lock, flags);
if (mon_ec == NULL) {
len = sprintf(buf, "no echo canceller being monitored - make a new call\n");
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return len;
}
@@ -298,7 +307,7 @@
8*cycles_average/1000
);
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return len;
}
@@ -307,20 +316,21 @@
int count, int *eof, void *data)
{
int len;
+ unsigned int flags;
*eof = 1;
- down(&oslec_lock);
+ spin_lock_irqsave(&oslec_lock, flags);
if (mon_ec == NULL) {
len = sprintf(buf, "%d\n", 0);
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return len;
}
len = sprintf(buf, "%d\n", mon_ec->adaption_mode);
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return len;
}
@@ -331,19 +341,20 @@
int new_mode;
char *endbuffer;
-
- down(&oslec_lock);
+ unsigned int flags;
+
+ spin_lock_irqsave(&oslec_lock, flags);
if (mon_ec == NULL) {
printk(KERN_NOTICE "no echo canceller being monitored - make a new call\n");
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return count;
}
new_mode = simple_strtol (buffer, &endbuffer, 10);
mon_ec->adaption_mode = new_mode;
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return count;
}
@@ -351,11 +362,12 @@
static int proc_write_reset(struct file *file, const char *buffer,
unsigned long count, void *data)
{
- down(&oslec_lock);
+ unsigned int flags;
+ spin_lock_irqsave(&oslec_lock, flags);
if (mon_ec == NULL) {
printk(KERN_NOTICE "no echo canceller being monitored - make a new call\n");
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return count;
}
@@ -365,7 +377,7 @@
*/
echo_can_flush(mon_ec);
- up(&oslec_lock);
+ spin_unlock_irqrestore(&oslec_lock, flags);
return count;
}
@@ -386,6 +398,7 @@
proc_mode->write_proc = proc_write_mode;
proc_reset->write_proc = proc_write_reset;
+ spin_lock_init(&oslec_lock);
return 0;
}
More information about the Pkg-voip-commits
mailing list