aboutsummaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux-vserver
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-10-26 15:05:06 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-10-26 15:05:45 +0300
commit7cd9efdbe3159245205d4055ab801b3d0d4e23f8 (patch)
treed0dced343d3d8621c952d5cc032a5eee26655c87 /main/dahdi-linux-vserver
parent153c38dde26bbbac83b42b7b367c2e17c1cab7bc (diff)
downloadaports-7cd9efdbe3159245205d4055ab801b3d0d4e23f8.tar.bz2
aports-7cd9efdbe3159245205d4055ab801b3d0d4e23f8.tar.xz
main/dahdi-linux-vserver: update to 2.4.0
and update zaphfc to compile with new dahdi
Diffstat (limited to 'main/dahdi-linux-vserver')
-rw-r--r--main/dahdi-linux-vserver/APKBUILD12
-rw-r--r--main/dahdi-linux-vserver/dahdi-2.2.0.2-gcc44-hack.patch27
-rw-r--r--main/dahdi-linux-vserver/dahdi-2.2.0.2-includes.patch100
-rw-r--r--main/dahdi-linux-vserver/dahdi-zaphfc2.patch12
-rw-r--r--main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch58
5 files changed, 63 insertions, 146 deletions
diff --git a/main/dahdi-linux-vserver/APKBUILD b/main/dahdi-linux-vserver/APKBUILD
index 2fc54cb202..5bb6d4fa12 100644
--- a/main/dahdi-linux-vserver/APKBUILD
+++ b/main/dahdi-linux-vserver/APKBUILD
@@ -16,8 +16,8 @@ _realname=dahdi-linux
pkgname=${_realname}-${_flavor}
pkgver=$pkgver
# when bumping _dahdiver we *must* bump _mypkgrel
-_dahdiver=2.3.0.1
-_mypkgrel=4
+_dahdiver=2.4.0
+_mypkgrel=0
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver"
url="http://www.asterisk.org"
@@ -32,9 +32,8 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realna
dahdi-depmod.patch
dahdi-bri_dchan.patch
dahdi-zaphfc.patch
- dahdi-zaphfc2.patch
zaphfc-dahdi-flortz.diff
- dahdi-2.2.0.2-gcc44-hack.patch
+ zaphfc-dahdi-2.4.0.patch
"
prepare() {
@@ -74,10 +73,9 @@ dev() {
ln -s /usr/include "$dir"/include
}
-md5sums="ac454f91d7e1267655ecd698832da414 dahdi-linux-2.3.0.1.tar.gz
+md5sums="0114826395f76713486142b90d772f82 dahdi-linux-2.4.0.tar.gz
c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch
4b41a82ff390ac64c08092c5a3eab6a8 dahdi-bri_dchan.patch
3be420539f5e2e2b94a1bf3d711ec630 dahdi-zaphfc.patch
-854008afc44b7a5c920f4ae4a2860e3b dahdi-zaphfc2.patch
291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff
-eeb4b2870d23d7c020cd99b5b1a633e9 dahdi-2.2.0.2-gcc44-hack.patch"
+0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch"
diff --git a/main/dahdi-linux-vserver/dahdi-2.2.0.2-gcc44-hack.patch b/main/dahdi-linux-vserver/dahdi-2.2.0.2-gcc44-hack.patch
deleted file mode 100644
index d647a1f9be..0000000000
--- a/main/dahdi-linux-vserver/dahdi-2.2.0.2-gcc44-hack.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/xpp/xpp_dahdi.c dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xpp_dahdi.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/xpp/xpp_dahdi.c 2009-10-22 18:52:23.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xpp_dahdi.c 2009-10-22 18:52:55.000000000 +0100
-@@ -865,9 +865,11 @@
- #endif
- spin_lock_irqsave(&xbus->lock, flags);
- atomic_inc(&xpd->open_counter);
-+/*
- LINE_DBG(DEVICES, xpd, pos, "%s[%d]: open_counter=%d\n",
- current->comm, current->pid,
- atomic_read(&xpd->open_counter));
-+*/
- spin_unlock_irqrestore(&xbus->lock, flags);
- if(xpd->xops->card_open)
- xpd->xops->card_open(xpd, pos);
-@@ -885,9 +887,11 @@
- spin_unlock_irqrestore(&xbus->lock, flags);
- if(xpd->xops->card_close)
- xpd->xops->card_close(xpd, pos);
-+/*
- LINE_DBG(DEVICES, xpd, pos, "%s[%d]: open_counter=%d\n",
- current->comm, current->pid,
- atomic_read(&xpd->open_counter));
-+*/
- atomic_dec(&xpd->open_counter); /* from xpp_open() */
- put_xpd(__FUNCTION__, xpd); /* from xpp_open() */
- return 0;
diff --git a/main/dahdi-linux-vserver/dahdi-2.2.0.2-includes.patch b/main/dahdi-linux-vserver/dahdi-2.2.0.2-includes.patch
deleted file mode 100644
index 5451bc6915..0000000000
--- a/main/dahdi-linux-vserver/dahdi-2.2.0.2-includes.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/dahdi-base.c dahdi-linux-2.2.0.2/drivers/dahdi/dahdi-base.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/dahdi-base.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/dahdi-base.c 2009-10-22 17:14:49.000000000 +0100
-@@ -46,6 +46,7 @@
- #include <linux/kmod.h>
- #include <linux/moduleparam.h>
- #include <linux/list.h>
-+#include <linux/sched.h>
-
- #include <linux/ppp_defs.h>
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/pciradio.c dahdi-linux-2.2.0.2/drivers/dahdi/pciradio.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/pciradio.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/pciradio.c 2009-10-22 17:14:49.000000000 +0100
-@@ -51,6 +51,7 @@
- #include <linux/pci.h>
- #include <linux/interrupt.h>
- #include <linux/moduleparam.h>
-+#include <linux/sched.h>
- #include <asm/io.h>
- #include <asm/delay.h>
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/voicebus/voicebus.c dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/voicebus/voicebus.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c 2009-10-22 17:16:44.000000000 +0100
-@@ -35,6 +35,7 @@
- #include <linux/interrupt.h>
- #include <linux/timer.h>
- #include <linux/module.h>
-+#include <linux/sched.h>
-
- #include <dahdi/kernel.h>
- #include "voicebus.h"
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wcfxo.c dahdi-linux-2.2.0.2/drivers/dahdi/wcfxo.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wcfxo.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/wcfxo.c 2009-10-22 17:14:49.000000000 +0100
-@@ -30,6 +30,7 @@
- #include <linux/usb.h>
- #include <linux/errno.h>
- #include <linux/pci.h>
-+#include <linux/sched.h>
- #include <asm/io.h>
- #include <linux/moduleparam.h>
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wct1xxp.c dahdi-linux-2.2.0.2/drivers/dahdi/wct1xxp.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wct1xxp.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/wct1xxp.c 2009-10-22 17:14:49.000000000 +0100
-@@ -33,6 +33,7 @@
- #include <linux/pci.h>
- #include <linux/spinlock.h>
- #include <linux/moduleparam.h>
-+#include <linux/sched.h>
-
- #include <dahdi/kernel.h>
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wctdm24xxp/base.c dahdi-linux-2.2.0.2/drivers/dahdi/wctdm24xxp/base.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wctdm24xxp/base.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/wctdm24xxp/base.c 2009-10-22 17:14:49.000000000 +0100
-@@ -45,6 +45,7 @@
- #include <linux/workqueue.h>
- #include <linux/delay.h>
- #include <linux/moduleparam.h>
-+#include <linux/sched.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
- #include <linux/semaphore.h>
- #else
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wctdm.c dahdi-linux-2.2.0.2/drivers/dahdi/wctdm.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wctdm.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/wctdm.c 2009-10-22 17:14:49.000000000 +0100
-@@ -31,6 +31,8 @@
- #include <linux/pci.h>
- #include <linux/interrupt.h>
- #include <linux/moduleparam.h>
-+#include <linux/sched.h>
-+
- #include <asm/io.h>
- #include "proslic.h"
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wcte11xp.c dahdi-linux-2.2.0.2/drivers/dahdi/wcte11xp.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/wcte11xp.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/wcte11xp.c 2009-10-22 17:14:49.000000000 +0100
-@@ -32,6 +32,7 @@
- #include <linux/pci.h>
- #include <linux/spinlock.h>
- #include <linux/moduleparam.h>
-+#include <linux/sched.h>
-
- #include <dahdi/kernel.h>
-
-diff -uNr dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/xpp/xbus-core.c dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xbus-core.c
---- dahdi-linux-2.2.0.2.ORIG/drivers/dahdi/xpp/xbus-core.c 2009-10-22 17:14:40.000000000 +0100
-+++ dahdi-linux-2.2.0.2/drivers/dahdi/xpp/xbus-core.c 2009-10-22 17:16:10.000000000 +0100
-@@ -35,6 +35,7 @@
- #include <linux/workqueue.h>
- #include <linux/device.h>
- #include <linux/delay.h> /* for msleep() to debug */
-+#include <linux/sched.h>
- #include "xpd.h"
- #include "xpp_dahdi.h"
- #include "xbus-core.h"
diff --git a/main/dahdi-linux-vserver/dahdi-zaphfc2.patch b/main/dahdi-linux-vserver/dahdi-zaphfc2.patch
deleted file mode 100644
index 33ebafd990..0000000000
--- a/main/dahdi-linux-vserver/dahdi-zaphfc2.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: dahdi-linux-2.3.0.1/drivers/dahdi/zaphfc.c
- ===================================================================
- --- dahdi-linux-2.3.0.1.orig/drivers/dahdi/zaphfc.c 2010-08-19 14:50:10.000000000 +0300
- +++ dahdi-linux-2.3.0.1/drivers/dahdi/zaphfc.c 2010-08-19 14:50:44.000000000 +0300
- @@ -676,6 +676,7 @@
- sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [TE]", hfc_dev_count + 1);
- }
-
- + zthfc->span.owner = THIS_MODULE;
- zthfc->span.spanconfig = zthfc_spanconfig;
- zthfc->span.chanconfig = zthfc_chanconfig;
- zthfc->span.startup = zthfc_startup;
diff --git a/main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch b/main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch
new file mode 100644
index 0000000000..80500a574a
--- /dev/null
+++ b/main/dahdi-linux-vserver/zaphfc-dahdi-2.4.0.patch
@@ -0,0 +1,58 @@
+Index: dahdi-linux-2.4.0/drivers/dahdi/zaphfc.c
+===================================================================
+--- dahdi-linux-2.4.0.orig/drivers/dahdi/zaphfc.c 2010-10-26 14:41:21.000000000 +0300
++++ dahdi-linux-2.4.0/drivers/dahdi/zaphfc.c 2010-10-26 14:50:14.000000000 +0300
+@@ -617,7 +617,7 @@
+ }
+
+ static int zthfc_startup(struct dahdi_span *span) {
+- struct dahdi_hfc *zthfc = span->pvt;
++ struct dahdi_hfc *zthfc = container_of(span, struct dahdi_hfc, span);
+ struct hfc_card *hfctmp = zthfc->card;
+ int alreadyrunning;
+
+@@ -663,6 +663,19 @@
+ return 0;
+ }
+
++static const struct dahdi_span_ops zaphfc_span_ops = {
++ .owner = THIS_MODULE,
++ .spanconfig = zthfc_spanconfig,
++ .chanconfig = zthfc_chanconfig,
++ .startup = zthfc_startup,
++ .shutdown = zthfc_shutdown,
++ .maint = zthfc_maint,
++ .rbsbits = zthfc_rbsbits,
++ .open = zthfc_open,
++ .close = zthfc_close,
++ .ioctl = zthfc_ioctl,
++};
++
+ static int zthfc_initialize(struct dahdi_hfc *zthfc) {
+ struct hfc_card *hfctmp = zthfc->card;
+ int i;
+@@ -676,15 +689,7 @@
+ sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [TE]", hfc_dev_count + 1);
+ }
+
+- zthfc->span.spanconfig = zthfc_spanconfig;
+- zthfc->span.chanconfig = zthfc_chanconfig;
+- zthfc->span.startup = zthfc_startup;
+- zthfc->span.shutdown = zthfc_shutdown;
+- zthfc->span.maint = zthfc_maint;
+- zthfc->span.rbsbits = zthfc_rbsbits;
+- zthfc->span.open = zthfc_open;
+- zthfc->span.close = zthfc_close;
+- zthfc->span.ioctl = zthfc_ioctl;
++ zthfc->span.ops = &zaphfc_span_ops;
+
+ zthfc->span.channels = 3;
+ zthfc->span.chans = zthfc->_chans;
+@@ -695,7 +700,6 @@
+ zthfc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; // <--- this is really BS
+ zthfc->span.offset = 0;
+ init_waitqueue_head(&zthfc->span.maintq);
+- zthfc->span.pvt = zthfc;
+
+ for (i = 0; i < zthfc->span.channels; i++) {
+ memset(&(zthfc->chans[i]), 0x0, sizeof(struct dahdi_chan));