keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about A400/800/1200 Analog Interface Card

opvxa1200.c patch

13 years 8 months ago #6173 by kdekorte
With the following patch opvxa1200.c will compile and work with dahdi 2.4.0 and Fedora 12 kernel 2.6.32.21-166.fc12.x86_64

--- opvxa1200.c?revision=126.1 2010-09-14 14:16:52.000000000 -0600
+++ opvxa1200.c 2010-09-14 14:25:34.000000000 -0600
@@ -102,6 +102,7 @@
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
+#include <linux/sched.h>
#include <asm/io.h>
#include "proslic.h"

@@ -2270,10 +2271,15 @@
return 0;
}

+static inline struct wctdm *wctdm_from_span(struct dahdi_span *span)
+{
+ return container_of(span, struct wctdm, span);
+}
+
static int wctdm_watchdog(struct dahdi_span *span, int event)
{
printk(KERN_INFO "opvxa1200: Restarting DMA\n");
- wctdm_restart_dma(span->pvt);
+ wctdm_restart_dma(wctdm_from_span(span));
return 0;
}

@@ -2366,6 +2372,15 @@
return 0;
}

+static const struct dahdi_span_ops wctdm_span_ops = {
+ .owner = THIS_MODULE,
+ .hooksig = wctdm_hooksig,
+ .open = wctdm_open,
+ .close = wctdm_close,
+ .ioctl = wctdm_ioctl,
+ .watchdog = wctdm_watchdog,
+};
+
static int wctdm_initialize(struct wctdm *wc)
{
int x;
@@ -2405,17 +2420,11 @@
}
wc->span.chans = wc->chans;
wc->span.channels = wc->max_cards; /*MAX_NUM_CARDS;*/
- wc->span.hooksig = wctdm_hooksig;
- wc->span.hooksig = wctdm_hooksig;
wc->span.irq = wc->dev->irq;
- wc->span.open = wctdm_open;
- wc->span.close = wctdm_close;
wc->span.flags = DAHDI_FLAG_RBS;
- wc->span.ioctl = wctdm_ioctl;
- wc->span.watchdog = wctdm_watchdog;
init_waitqueue_head(&wc->span.maintq);
+ wc->span.ops = &wctdm_span_ops;

- wc->span.pvt = wc;
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with Dahdi\n");
return -1;
13 years 8 months ago #6174 by kdekorte
Odd thing about this patch, is that when I am using dahdi 2.4 one of my FXO ports does not work, but with dahdi 2.3.0.1 it works fine

port 1 -> FXS
port 2 -> FXS
port 3 -> FXO
port 4 -> FXO with 2.4 this port does not see the phone line plugged into it.
port 5 -> FXO
13 years 8 months ago #6175 by lisa.gao
Hi,
First thanks very much for your sharing. We have the patch opvxa1200.c in this link:
http://downloads.openvox.cn/pub/drivers/dahdi-patches/dahdi_2.4_a800_a1200/opvxa1200.c
And the dahdi 2.4 in the link:
http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complete-2.4.0+2.4.0.tar.gz
You can install this dahdi 2.4 to have a try, if problem also exist, please contact us.

13 years 7 months ago #6240 by kdekorte
Using kernel 2.6.32.21-168.fc12.x86_64

I get the following error messages

CC [M] /root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.o
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c: In function ‘wctdm_hardware_init’:
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2558: error: implicit declaration of function ‘touch_softlockup_watchdog’
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c: In function ‘wctdm_start_dma’:
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2626: error: implicit declaration of function ‘set_current_state’
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2626: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2626: error: (Each undeclared identifier is reported only once
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2626: error: for each function it appears in.)
/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.c:2627: error: implicit declaration of function ‘schedule_timeout’
make[2]: *** [/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi/opvxa1200.o] Error 1
make[1]: *** [_module_/root/openvox/dahdi-linux-complete-2.4.0+2.4.0/linux/drivers/dahdi] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32.21-168.fc12.x86_64'
make: *** [modules] Error 2
13 years 7 months ago #6241 by lisa.gao
Hi,
Please add #include <linux/sched.h> in header file.

Time to create page: 0.043 seconds
Powered by Kunena Forum