Commit 7cd9efdb authored by Timo Teräs's avatar Timo Teräs

main/dahdi-linux-vserver: update to 2.4.0

and update zaphfc to compile with new dahdi
parent 153c38dd
......@@ -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 -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 -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"
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;
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));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment