Compare commits
12 Commits
v3.1.0-rc1
...
next
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c840cf438 | ||
|
|
d228a12f1c | ||
|
|
6d4c748e04 | ||
|
|
4df746fe3f | ||
|
|
97e744ad96 | ||
|
|
90e8a54e3a | ||
|
|
26fb7c34cb | ||
|
|
34b9c77c9a | ||
|
|
c98f59eead | ||
|
|
ac300cd895 | ||
|
|
6e5197fed4 | ||
|
|
45ac6a30f9 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
|
||||
/.pc
|
||||
|
||||
.cache.mk
|
||||
*.[oa]
|
||||
*.mod
|
||||
*.mod.[oc]
|
||||
@@ -16,6 +17,7 @@ cscope.*
|
||||
*.symvers
|
||||
*.markers
|
||||
.*.o.d
|
||||
*.ur-safe
|
||||
|
||||
README.html
|
||||
modules.order
|
||||
|
||||
2
Makefile
2
Makefile
@@ -53,7 +53,7 @@ INST_HEADERS:=kernel.h user.h fasthdlc.h wctdm_user.h dahdi_config.h
|
||||
|
||||
DAHDI_BUILD_ALL:=m
|
||||
|
||||
KMAKE=+$(MAKE) -C $(KSRC) KBUILD_EXTMOD=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
|
||||
KMAKE=+$(MAKE) -C $(KSRC) M=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
|
||||
|
||||
ROOT_PREFIX:=
|
||||
|
||||
|
||||
57
docker-compose.yml
Normal file
57
docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
version: '3'
|
||||
services:
|
||||
|
||||
test-centos7:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: test/docker/centos7
|
||||
volumes:
|
||||
- ./:/source
|
||||
network_mode: "host"
|
||||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
|
||||
test-centos6:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: test/docker/centos6
|
||||
volumes:
|
||||
- ./:/source
|
||||
network_mode: "host"
|
||||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
|
||||
test-debianstable:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: test/docker/debianstable
|
||||
volumes:
|
||||
- ./:/source
|
||||
network_mode: "host"
|
||||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
|
||||
test-debiantesting:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: test/docker/debiantesting
|
||||
volumes:
|
||||
- ./:/source
|
||||
network_mode: "host"
|
||||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
|
||||
test-fedorarawhide:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: test/docker/fedorarawhide
|
||||
volumes:
|
||||
- ./:/source
|
||||
network_mode: "host"
|
||||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
@@ -127,6 +127,7 @@ dahdi_vpmadt032_loader-objs := vpmadt032_loader/dahdi_vpmadt032_loader.o
|
||||
|
||||
ifneq ($(DAHDI_ARCH),)
|
||||
ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),)
|
||||
$(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd)
|
||||
VPMADT032_LOADER_PRESENT=yes
|
||||
dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o
|
||||
@@ -152,7 +153,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_HPEC) += dahdi_echocan_hpec.o
|
||||
endif
|
||||
|
||||
|
||||
hostprogs-y := makefw
|
||||
hostprogs := makefw
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,10 +53,6 @@
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
|
||||
#include <linux/smp_lock.h>
|
||||
#endif
|
||||
|
||||
#include <linux/ppp_defs.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
@@ -1015,6 +1011,14 @@ static int dahdi_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, dahdi_seq_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops dahdi_proc_ops = {
|
||||
.proc_open = dahdi_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations dahdi_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_proc_open,
|
||||
@@ -1022,6 +1026,7 @@ static const struct file_operations dahdi_proc_ops = {
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4060,14 +4065,6 @@ dahdi_timer_unlocked_ioctl(struct file *file, unsigned int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef HAVE_UNLOCKED_IOCTL
|
||||
static int dahdi_timer_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long data)
|
||||
{
|
||||
return dahdi_timer_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dahdi_ioctl_getgains(struct file *file, unsigned long data)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -7002,25 +6999,6 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef HAVE_UNLOCKED_IOCTL
|
||||
static int dahdi_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long data)
|
||||
{
|
||||
return dahdi_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
static long dahdi_ioctl_compat(struct file *file, unsigned int cmd,
|
||||
unsigned long data)
|
||||
{
|
||||
if (cmd == DAHDI_SFCONFIG)
|
||||
return -ENOTTY; /* Not supported yet */
|
||||
|
||||
return dahdi_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* _get_next_channo - Return the next taken channel number from the span list.
|
||||
* @span: The span with which to start the search.
|
||||
@@ -7943,7 +7921,7 @@ static inline void __dahdi_process_getaudio_chunk(struct dahdi_chan *ss, unsigne
|
||||
memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
|
||||
txb[0] = DAHDI_LIN2X(0, ms);
|
||||
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
|
||||
/* fall through to normal conf mode */
|
||||
/* fallthrough */
|
||||
case DAHDI_CONF_CONF: /* Normal conference mode */
|
||||
if (is_pseudo_chan(ms)) /* if pseudo-channel */
|
||||
{
|
||||
@@ -8506,7 +8484,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* fall through intentionally */
|
||||
/* fallthrough */
|
||||
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
|
||||
if (rxsig == DAHDI_RXSIG_ONHOOK) {
|
||||
chan->ringdebtimer = RING_DEBOUNCE_TIME;
|
||||
@@ -8525,7 +8503,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
|
||||
chan->gotgs = 1;
|
||||
}
|
||||
}
|
||||
/* fall through intentionally */
|
||||
/* fallthrough */
|
||||
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
|
||||
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
|
||||
switch(rxsig) {
|
||||
@@ -10274,14 +10252,7 @@ static const struct file_operations dahdi_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
.release = dahdi_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
.compat_ioctl = dahdi_ioctl_compat,
|
||||
#endif
|
||||
#else
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
@@ -10290,14 +10261,7 @@ static const struct file_operations dahdi_fops = {
|
||||
static const struct file_operations dahdi_timer_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.release = dahdi_timer_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_timer_unlocked_ioctl,
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
.compat_ioctl = dahdi_timer_unlocked_ioctl,
|
||||
#endif
|
||||
#else
|
||||
.ioctl = dahdi_timer_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_timer_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
@@ -10360,35 +10324,9 @@ nodev_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long data)
|
||||
return nodev_common("ioctl");
|
||||
}
|
||||
|
||||
#ifndef HAVE_UNLOCKED_IOCTL
|
||||
static int nodev_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long data)
|
||||
{
|
||||
return nodev_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
static long nodev_ioctl_compat(struct file *file, unsigned int cmd,
|
||||
unsigned long data)
|
||||
{
|
||||
if (cmd == DAHDI_SFCONFIG)
|
||||
return -ENOTTY; /* Not supported yet */
|
||||
|
||||
return nodev_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct file_operations nodev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = nodev_unlocked_ioctl,
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
.compat_ioctl = nodev_ioctl_compat,
|
||||
#endif
|
||||
#else
|
||||
.ioctl = nodev_ioctl,
|
||||
#endif
|
||||
.read = nodev_chan_read,
|
||||
.write = nodev_chan_write,
|
||||
.poll = nodev_chan_poll,
|
||||
@@ -10398,14 +10336,7 @@ static const struct file_operations dahdi_chan_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
.release = dahdi_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_unlocked_ioctl,
|
||||
#ifdef HAVE_COMPAT_IOCTL
|
||||
.compat_ioctl = dahdi_ioctl_compat,
|
||||
#endif
|
||||
#else
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
.read = dahdi_chan_read,
|
||||
.write = dahdi_chan_write,
|
||||
.poll = dahdi_chan_poll,
|
||||
|
||||
@@ -733,12 +733,22 @@ static int ztdethmf_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ztdethmf_proc_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ztdethmf_proc_fops = {
|
||||
.open = ztdethmf_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops ztdethmf_proc_fops = {
|
||||
.proc_open = ztdethmf_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = seq_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations ztdethmf_proc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ztdethmf_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
#endif
|
||||
|
||||
static int __init ztdethmf_init(void)
|
||||
|
||||
@@ -397,13 +397,6 @@ static long dahdi_tc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
|
||||
};
|
||||
}
|
||||
|
||||
#ifndef HAVE_UNLOCKED_IOCTL
|
||||
static int dahdi_tc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data)
|
||||
{
|
||||
return (int)dahdi_tc_unlocked_ioctl(file, cmd, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static unsigned int dahdi_tc_poll(struct file *file, struct poll_table_struct *wait_table)
|
||||
{
|
||||
int ret;
|
||||
@@ -427,11 +420,7 @@ static struct file_operations __dahdi_transcode_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_tc_open,
|
||||
.release = dahdi_tc_release,
|
||||
#ifdef HAVE_UNLOCKED_IOCTL
|
||||
.unlocked_ioctl = dahdi_tc_unlocked_ioctl,
|
||||
#else
|
||||
.ioctl = dahdi_tc_ioctl,
|
||||
#endif
|
||||
.read = dahdi_tc_read,
|
||||
.write = dahdi_tc_write,
|
||||
.poll = dahdi_tc_poll,
|
||||
|
||||
@@ -8,7 +8,7 @@ PWD=$(shell pwd)
|
||||
|
||||
MODULESO:=$(MODULES:%=%.o)
|
||||
MODULESKO:=$(MODULES:%=%.ko)
|
||||
KMAKE = $(MAKE) -C $(KSRC) KBUILD_EXTMOD=$(PWD)
|
||||
KMAKE = $(MAKE) -C $(KSRC) M=$(PWD)
|
||||
KMAKE_INST = $(KMAKE) \
|
||||
INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
|
||||
|
||||
|
||||
@@ -64,7 +64,11 @@
|
||||
* platform does not support it.
|
||||
*
|
||||
*/
|
||||
#undef CONFIG_VOICEBUS_DISABLE_ASPM
|
||||
#ifdef CONFIG_VOICEBUS_DISABLE_ASPM
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
#include <linux/pci-aspm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define this to use a FIFO for the software echocan reference.
|
||||
* (experimental) */
|
||||
|
||||
@@ -67,6 +67,12 @@
|
||||
#include "wcxb_spi.h"
|
||||
#include "wcxb_flash.h"
|
||||
|
||||
#ifdef CONFIG_VOICEBUS_DISABLE_ASPM
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
#include <linux/pci-aspm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \brief Default ringer debounce (in ms)
|
||||
*/
|
||||
@@ -1446,11 +1452,13 @@ wcaxx_check_battery_lost(struct wcaxx *wc, struct wcaxx_module *const mod)
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||
/* fallthrough */
|
||||
case BATTERY_PRESENT:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
break;
|
||||
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
||||
/* fallthrough */
|
||||
case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
|
||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||
if (debug) {
|
||||
@@ -1501,7 +1509,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
|
||||
|
||||
switch (fxo->battery_state) {
|
||||
case BATTERY_DEBOUNCING_PRESENT_FROM_LOST_ALARM:
|
||||
case BATTERY_DEBOUNCING_PRESENT: /* intentional drop through */
|
||||
/* fallthrough */
|
||||
case BATTERY_DEBOUNCING_PRESENT:
|
||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||
if (debug) {
|
||||
dev_info(&wc->xb.pdev->dev,
|
||||
@@ -1554,7 +1563,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||
case BATTERY_LOST: /* intentional drop through */
|
||||
/* fallthrough */
|
||||
case BATTERY_LOST:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
break;
|
||||
|
||||
@@ -87,6 +87,12 @@
|
||||
*/
|
||||
/* #define CONFIG_WCT4XXP_DISABLE_ASPM */
|
||||
|
||||
#ifdef CONFIG_WCT4XXP_DISABLE_ASPM
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
#include <linux/pci-aspm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FORCE_EXTENDED_RESET) && defined(CONFIG_NOEXTENDED_RESET)
|
||||
#error "You cannot define both CONFIG_FORCE_EXTENDED_RESET and " \
|
||||
"CONFIG_NOEXTENDED_RESET."
|
||||
|
||||
@@ -1955,12 +1955,14 @@ wctdm_check_battery_lost(struct wctdm *wc, struct wctdm_module *const mod)
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||
/* fallthrough */
|
||||
case BATTERY_PRESENT:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
break;
|
||||
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
||||
case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
|
||||
/* fallthrough */
|
||||
case BATTERY_DEBOUNCING_LOST:
|
||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||
if (debug) {
|
||||
dev_info(&wc->vb.pdev->dev,
|
||||
@@ -2063,7 +2065,8 @@ wctdm_check_battery_present(struct wctdm *wc, struct wctdm_module *const mod)
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||
case BATTERY_LOST: /* intentional drop through */
|
||||
/* fallthrough */
|
||||
case BATTERY_LOST:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
break;
|
||||
|
||||
@@ -2558,9 +2558,10 @@ static int b400m_probe(struct wctdm *wc, int modpos)
|
||||
struct b400m *b4;
|
||||
unsigned long flags;
|
||||
int chiprev;
|
||||
u8 lastreg = 0;
|
||||
|
||||
wctdm_setreg(wc, &wc->mods[modpos], 0x10, 0x10);
|
||||
id = xhfc_getreg(wc, &wc->mods[modpos], R_CHIP_ID, &x);
|
||||
id = xhfc_getreg(wc, &wc->mods[modpos], R_CHIP_ID, &lastreg);
|
||||
|
||||
/* chip ID high 7 bits must be 0x62, see datasheet */
|
||||
if ((id & 0xfe) != 0x62)
|
||||
@@ -2575,6 +2576,7 @@ static int b400m_probe(struct wctdm *wc, int modpos)
|
||||
|
||||
/* card found, enabled and main struct allocated. Fill it out. */
|
||||
b4->wc = wc;
|
||||
b4->lastreg = lastreg;
|
||||
b4->position = modpos;
|
||||
|
||||
/* which B400M in the system is this one? count all of them found so
|
||||
|
||||
@@ -1872,9 +1872,10 @@ static int t13x_set_linemode(struct dahdi_span *span, enum spantypes linemode)
|
||||
break;
|
||||
case SPANTYPE_DIGITAL_J1:
|
||||
dev_info(&wc->xb.pdev->dev,
|
||||
"Changing from %s to E1 line mode.\n",
|
||||
"Changing from %s to J1 line mode.\n",
|
||||
dahdi_spantype2str(wc->span.spantype));
|
||||
res = t13x_software_init(wc, J1);
|
||||
break;
|
||||
default:
|
||||
dev_err(&wc->xb.pdev->dev,
|
||||
"Got invalid linemode '%s' from dahdi\n",
|
||||
|
||||
@@ -57,8 +57,8 @@ xpp_verified = $(foreach file, $(xpp_verifications), $(file).verified)
|
||||
FXO_MODES = $(src)/../fxo_modes.h
|
||||
FXO_VERIFY = $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) -v $(obj)/init_fxo_modes
|
||||
|
||||
hostprogs-y := print_fxo_modes
|
||||
always := $(xpp_verified)
|
||||
hostprogs := print_fxo_modes
|
||||
always-y := $(xpp_verified)
|
||||
print_fxo_modes-objs := print_fxo_modes.o
|
||||
HOSTCFLAGS_print_fxo_modes.o += -include $(FXO_MODES)
|
||||
|
||||
|
||||
@@ -153,8 +153,12 @@ static int write_state_register(xpd_t *xpd, __u8 value);
|
||||
static bool bri_packet_is_valid(xpacket_t *pack);
|
||||
static void bri_packet_dump(const char *msg, xpacket_t *pack);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_bri_info_ops;
|
||||
#else
|
||||
static const struct file_operations proc_bri_info_ops;
|
||||
#endif
|
||||
#endif
|
||||
static int bri_spanconfig(struct file *file, struct dahdi_span *span,
|
||||
struct dahdi_lineconfig *lc);
|
||||
static int bri_chanconfig(struct file *file, struct dahdi_chan *chan,
|
||||
@@ -1740,13 +1744,22 @@ static int proc_bri_info_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, proc_bri_info_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations proc_bri_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_bri_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_bri_info_ops = {
|
||||
.proc_open = proc_bri_info_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations proc_bri_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_bri_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
#endif
|
||||
|
||||
static int bri_xpd_probe(struct device *dev)
|
||||
|
||||
@@ -107,9 +107,13 @@ enum fxo_leds {
|
||||
static bool fxo_packet_is_valid(xpacket_t *pack);
|
||||
static void fxo_packet_dump(const char *msg, xpacket_t *pack);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_fxo_info_ops;
|
||||
#else
|
||||
static const struct file_operations proc_fxo_info_ops;
|
||||
#endif
|
||||
#ifdef WITH_METERING
|
||||
static const struct file_operations proc_xpd_metering_ops;
|
||||
static const struct proc_ops proc_xpd_metering_ops;
|
||||
#endif
|
||||
#endif
|
||||
static void dahdi_report_battery(xpd_t *xpd, lineno_t chan);
|
||||
@@ -1484,13 +1488,22 @@ static int proc_fxo_info_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, proc_fxo_info_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations proc_fxo_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_fxo_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_fxo_info_ops = {
|
||||
.proc_open = proc_fxo_info_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations proc_fxo_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_fxo_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WITH_METERING
|
||||
static int proc_xpd_metering_show(struct seq_file *sfile, void *not_used)
|
||||
|
||||
@@ -160,11 +160,19 @@ enum neon_state {
|
||||
static bool fxs_packet_is_valid(xpacket_t *pack);
|
||||
static void fxs_packet_dump(const char *msg, xpacket_t *pack);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_fxs_info_ops;
|
||||
#else
|
||||
static const struct file_operations proc_fxs_info_ops;
|
||||
#endif
|
||||
#ifdef WITH_METERING
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_xpd_metering_ops;
|
||||
#else
|
||||
static const struct file_operations proc_xpd_metering_ops;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
static void start_stop_vm_led(xbus_t *xbus, xpd_t *xpd, lineno_t pos);
|
||||
|
||||
#define PROC_FXS_INFO_FNAME "fxs_info"
|
||||
@@ -2115,13 +2123,22 @@ static int proc_fxs_info_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, proc_fxs_info_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations proc_fxs_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_fxs_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_fxs_info_ops = {
|
||||
.proc_open = proc_fxs_info_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations proc_fxs_info_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_fxs_info_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WITH_METERING
|
||||
static ssize_t proc_xpd_metering_write(struct file *file,
|
||||
@@ -2165,12 +2182,20 @@ static int proc_xpd_metering_open(struct inode *inode, struct file *file)
|
||||
file->private_data = PDE_DATA(inode);
|
||||
}
|
||||
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_xpd_metering_ops = {
|
||||
.proc_open = proc_xpd_metering_open,
|
||||
.proc_write = proc_xpd_metering_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations proc_xpd_metering_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_xpd_metering_open,
|
||||
.write = proc_xpd_metering_write,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -50,8 +50,15 @@ static const char rcsid[] = "$Id$";
|
||||
#ifdef PROTOCOL_DEBUG
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#define PROC_XBUS_COMMAND "command"
|
||||
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_xbus_command_ops;
|
||||
#else
|
||||
static const struct file_operations proc_xbus_command_ops;
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Command line parameters */
|
||||
@@ -65,8 +72,15 @@ static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
|
||||
"Register devices automatically (1) or not (0). UNUSED.");
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xbus_read_proc_ops;
|
||||
#else
|
||||
static const struct file_operations xbus_read_proc_ops;
|
||||
#endif
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
static void transport_init(xbus_t *xbus, struct xbus_ops *ops,
|
||||
ushort max_send_size,
|
||||
struct device *transport_device, void *priv);
|
||||
@@ -1828,13 +1842,22 @@ static int xbus_read_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, xbus_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations xbus_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xbus_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xbus_read_proc_ops = {
|
||||
.proc_open = xbus_read_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations xbus_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xbus_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#ifdef PROTOCOL_DEBUG
|
||||
static ssize_t proc_xbus_command_write(struct file *file,
|
||||
@@ -1927,11 +1950,19 @@ static int proc_xbus_command_open(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops proc_xbus_command_ops = {
|
||||
.proc_open = proc_xbus_command_open,
|
||||
.proc_write = proc_xbus_command_write,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations proc_xbus_command_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = proc_xbus_command_open,
|
||||
.write = proc_xbus_command_write,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#endif
|
||||
|
||||
static int xpp_proc_read_show(struct seq_file *sfile, void *data)
|
||||
@@ -1961,13 +1992,22 @@ static int xpp_proc_read_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, xpp_proc_read_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations xpp_proc_read_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xpp_proc_read_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xpp_proc_read_ops = {
|
||||
.proc_open = xpp_proc_read_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations xpp_proc_read_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xpp_proc_read_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif /* DAHDI_HAVE_PROC_OPS */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -103,8 +103,12 @@ int total_registered_spans(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xpd_read_proc_ops;
|
||||
#else
|
||||
static const struct file_operations xpd_read_proc_ops;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*------------------------- XPD Management -------------------------*/
|
||||
|
||||
@@ -392,13 +396,22 @@ static int xpd_read_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, xpd_read_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations xpd_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xpd_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xpd_read_proc_ops = {
|
||||
.proc_open = xpd_read_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations xpd_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xpd_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -227,9 +227,14 @@ static void xpp_receive_callback(struct urb *urb);
|
||||
static int xusb_probe(struct usb_interface *interface,
|
||||
const struct usb_device_id *id);
|
||||
static void xusb_disconnect(struct usb_interface *interface);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xusb_read_proc_ops;
|
||||
#else
|
||||
static const struct file_operations xusb_read_proc_ops;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
@@ -1108,13 +1113,22 @@ static int xusb_read_proc_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, xusb_read_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations xusb_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xusb_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef DAHDI_HAVE_PROC_OPS
|
||||
static const struct proc_ops xusb_read_proc_ops = {
|
||||
.proc_open = xusb_read_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations xusb_read_proc_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xusb_read_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,14 +58,12 @@
|
||||
|
||||
#include <linux/poll.h>
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
#include <linux/pci-aspm.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
|
||||
#define HAVE_NET_DEVICE_OPS
|
||||
#endif
|
||||
|
||||
#define DAHDI_HAVE_PROC_OPS
|
||||
|
||||
/* __dev* were removed in 3.8. They still have effect in 2.6.18. */
|
||||
#ifndef __devinit
|
||||
# define __devinit
|
||||
@@ -1373,6 +1371,10 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss)
|
||||
/*! Maximum audio mask */
|
||||
#define DAHDI_FORMAT_AUDIO_MASK ((1 << 16) - 1)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
|
||||
|
||||
#undef DAHDI_HAVE_PROC_OPS
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
||||
#ifndef TIMER_DATA_TYPE
|
||||
@@ -1483,14 +1485,13 @@ static inline void *PDE_DATA(const struct inode *inode)
|
||||
#endif /* 4.10.0 */
|
||||
#endif /* 4.11.0 */
|
||||
#endif /* 4.13.0 */
|
||||
#else /* >= 4.15.0 */
|
||||
#endif /* 4.15.0 */
|
||||
#endif /* 5.6 */
|
||||
|
||||
#ifndef TIMER_DATA_TYPE
|
||||
#define TIMER_DATA_TYPE struct timer_list *
|
||||
#endif
|
||||
|
||||
#endif /* 4.15.0 */
|
||||
|
||||
#ifndef dahdi_ktime_equal
|
||||
static inline int dahdi_ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
|
||||
10
test/docker/centos6
Normal file
10
test/docker/centos6
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM centos:6
|
||||
|
||||
RUN yum update -y
|
||||
RUN yum install -y \
|
||||
gcc \
|
||||
git \
|
||||
make \
|
||||
wget
|
||||
RUN yum install -y kernel-devel
|
||||
CMD ["/source/test/test-build.sh"]
|
||||
10
test/docker/centos7
Normal file
10
test/docker/centos7
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum update -y
|
||||
RUN yum install -y \
|
||||
gcc \
|
||||
git \
|
||||
make \
|
||||
wget
|
||||
RUN yum install -y kernel-devel.x86_64 0:3.10.0-1062.12.1
|
||||
CMD ["/source/test/test-build.sh"]
|
||||
12
test/docker/debianstable
Normal file
12
test/docker/debianstable
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM debian:stable
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
git \
|
||||
linux-headers-amd64 \
|
||||
make \
|
||||
wget
|
||||
|
||||
CMD ["/source/test/test-build.sh"]
|
||||
12
test/docker/debiantesting
Normal file
12
test/docker/debiantesting
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM debian:testing
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
git \
|
||||
linux-headers-amd64 \
|
||||
make \
|
||||
wget
|
||||
|
||||
CMD ["/source/test/test-build.sh"]
|
||||
11
test/docker/fedorarawhide
Normal file
11
test/docker/fedorarawhide
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM fedora:rawhide
|
||||
|
||||
RUN dnf update -y && dnf install -y \
|
||||
diffutils \
|
||||
gcc \
|
||||
git \
|
||||
kmod \
|
||||
make \
|
||||
wget
|
||||
RUN dnf update -y && dnf install -y kernel-devel
|
||||
CMD ["/source/test/test-build.sh"]
|
||||
41
test/test-build.sh
Executable file
41
test/test-build.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
JOBS=$1
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
if [ ! -e /root/last-update ]; then
|
||||
date > /root/last-update
|
||||
fi
|
||||
if [ -z "$(find /root/last-update -mmin -60)" ]; then
|
||||
apt-get update && apt-get install -y linux-headers-amd64
|
||||
date > /root/last-update
|
||||
fi
|
||||
KERNELS=$(find /usr/src -maxdepth 1 -type d -name 'linux-headers-*' -not -name '*common*')
|
||||
else
|
||||
if command -v dnf > /dev/null ; then
|
||||
dnf update -y dnf kernel-devel
|
||||
else
|
||||
yum update -y kernel-devel
|
||||
fi
|
||||
KERNELS=$(find /usr/src/kernels -maxdepth 1 -type d -regextype sed -regex '.*[.]\(el\|fc\).*')
|
||||
fi
|
||||
|
||||
if [ "$KERNELS" = "" ]; then
|
||||
echo >&2 "Failed to find any kernels"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy the source into the container so we can run builds in parallel
|
||||
rm -fr /root/code
|
||||
cp -fr /source /root/code
|
||||
cd /root/code
|
||||
|
||||
for KSRC in $KERNELS ; do
|
||||
echo "Building against $KSRC"
|
||||
export KSRC=$KSRC
|
||||
make -s clean
|
||||
make -s -j $(grep -c "^processor" /proc/cpuinfo)
|
||||
done
|
||||
Reference in New Issue
Block a user