Merge pull request #861 from aduskett/dahdi-linux

libs/dahdi-linux: bump to latest git head
This commit is contained in:
micmac1 2024-04-19 18:25:18 +02:00 committed by GitHub
commit d7d51d21e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 26 additions and 248 deletions

View File

@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=dahdi-linux
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/asterisk/dahdi-linux.git
PKG_SOURCE_DATE=2023-09-21
PKG_SOURCE_VERSION:=1bb9088f2baff8c4e3fec536044cc48072cf9905
PKG_MIRROR_HASH:=6a15a0383deeb7f9cc36a55bfa5bec13d225e738b1723faf15b25df74665198b
PKG_SOURCE_DATE=2024-04-12
PKG_SOURCE_VERSION:=83d89b64d9151dbe4eb53b9ebc8640a08fcf4d63
PKG_MIRROR_HASH:=67acfb62213270050d941643cb763c315cc6a2682a94fc517975707918e42ecb
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE

View File

@ -1,6 +1,6 @@
--- a/drivers/dahdi/Kbuild
+++ b/drivers/dahdi/Kbuild
@@ -64,9 +64,8 @@ obj-m += $(DAHDI_MODULES_EXTRA)
@@ -72,9 +72,8 @@ obj-m += $(DAHDI_MODULES_EXTRA)
# If you want to build OSLEC, include the code in the standard location:
# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as
# well:

View File

@ -1,8 +1,8 @@
--- a/drivers/dahdi/Kbuild
+++ b/drivers/dahdi/Kbuild
@@ -12,6 +12,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
@@ -13,6 +13,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP) += wcte12xp/
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_HFCS) += hfcs/
@ -10,9 +10,9 @@
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
--- a/drivers/dahdi/Kconfig
+++ b/drivers/dahdi/Kconfig
@@ -235,4 +235,14 @@ config DAHDI_DYNAMIC_LOC
If unsure, say Y.
@@ -282,6 +282,16 @@ config DAHDI_WCTE11XP
If unsure, say Y.
+config DAHDI_HFCS
+ tristate "Support for various HFC-S PCI BRI adapters"
@ -25,6 +25,8 @@
+ If unsure, say Y.
+
source "drivers/dahdi/xpp/Kconfig"
config DAHDI_OPVXA1200
--- /dev/null
+++ b/drivers/dahdi/hfcs/base.c
@@ -0,0 +1,1742 @@

View File

@ -8,7 +8,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
@@ -1768,11 +1769,13 @@ out:
@@ -1771,11 +1772,13 @@ out:
static void xbus_fill_proc_queue(struct seq_file *sfile, struct xframe_queue *q)
{

View File

@ -7,60 +7,12 @@ Use fallthrough instead of comment to fix compilation warning.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/dahdi/dahdi-base.c | 14 +++++++-------
drivers/dahdi/wcaxx-base.c | 2 ++
drivers/dahdi/wctdm24xxp/base.c | 2 ++
drivers/dahdi/xpp/card_global.c | 2 +-
4 files changed, 12 insertions(+), 8 deletions(-)
drivers/dahdi/dahdi-base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -7930,7 +7930,7 @@ static inline void __dahdi_process_getau
memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
txb[0] = DAHDI_LIN2X(0, ms);
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
- /* fallthrough */
+ fallthrough;
case DAHDI_CONF_CONF: /* Normal conference mode */
if (is_pseudo_chan(ms)) /* if pseudo-channel */
{
@@ -7954,7 +7954,7 @@ static inline void __dahdi_process_getau
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
break;
}
- /* fall through */
+ fallthrough;
case DAHDI_CONF_CONFMON: /* Conference monitor mode */
if (ms->confmode & DAHDI_CONF_LISTENER) {
/* Subtract out last sample written to conf */
@@ -8493,7 +8493,7 @@ static void __dahdi_hooksig_pvt(struct d
break;
}
#endif
- /* fallthrough */
+ fallthrough;
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
if (rxsig == DAHDI_RXSIG_ONHOOK) {
chan->ringdebtimer = RING_DEBOUNCE_TIME;
@@ -8512,7 +8512,7 @@ static void __dahdi_hooksig_pvt(struct d
chan->gotgs = 1;
}
}
- /* fallthrough */
+ fallthrough;
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
switch(rxsig) {
@@ -8612,7 +8612,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
__dahdi_hooksig_pvt(chan, DAHDI_RXSIG_START);
break;
}
- /* Fall through */
+ fallthrough;
case DAHDI_SIG_EM_E1:
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
@@ -8630,7 +8630,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
@@ -8645,7 +8645,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
break;
case DAHDI_SIG_FXSKS: /* FXS Kewlstart */
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
@ -69,63 +21,3 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
case DAHDI_SIG_FXSLS:
if (!(cursig & DAHDI_BBIT)) {
/* Check for ringing first */
@@ -9059,7 +9059,7 @@ static inline void __dahdi_process_putau
memcpy(ss->putlin, putlin, DAHDI_CHUNKSIZE * sizeof(short));
break;
}
- /* fall through */
+ fallthrough;
case DAHDI_CONF_CONFANN: /* Conference with announce */
if (ms->confmode & DAHDI_CONF_TALKER) {
/* Store temp value */
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -1456,7 +1456,7 @@ wcaxx_check_battery_lost(struct wcaxx *w
break;
case BATTERY_UNKNOWN:
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
- /* fallthrough */
+ fallthrough;
case BATTERY_PRESENT:
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
fxo->battdebounce_timer = wc->framecount + battdebounce;
@@ -1567,7 +1567,7 @@ wcaxx_check_battery_present(struct wcaxx
break;
case BATTERY_UNKNOWN:
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
- /* fallthrough */
+ fallthrough;
case BATTERY_LOST:
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
fxo->battdebounce_timer = wc->framecount + battdebounce;
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1964,7 +1964,7 @@ wctdm_check_battery_lost(struct wctdm *w
break;
case BATTERY_UNKNOWN:
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
- /* fallthrough */
+ fallthrough;
case BATTERY_PRESENT:
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
fxo->battdebounce_timer = wc->framecount + battdebounce;
@@ -2074,7 +2074,7 @@ wctdm_check_battery_present(struct wctdm
break;
case BATTERY_UNKNOWN:
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
- /* fallthrough */
+ fallthrough;
case BATTERY_LOST:
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
fxo->battdebounce_timer = wc->framecount + battdebounce;
--- a/drivers/dahdi/xpp/card_global.c
+++ b/drivers/dahdi/xpp/card_global.c
@@ -148,7 +148,7 @@ static int execute_chip_command(xpd_t *x
XPD_NOTICE(xpd,
"'I' is deprecated in register commands. "
"Use 'S' instead.\n");
- /* fall through */
+ fallthrough;
case 'S':
do_subreg = 1;
num_args += 2; /* register + subreg */

View File

@ -1,60 +0,0 @@
From eea6daaa4cae1ddcd8e32c8b9e4273ba3244838c Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 12 May 2023 20:19:04 +0200
Subject: [PATCH 2/6] dahdi: fix always true compilation warning
Fix always true compilation warning on statically allocated array. Check
content of the array instead.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/dahdi/dahdi-base.c | 6 +++---
drivers/dahdi/dahdi_dynamic_ethmf.c | 2 +-
drivers/dahdi/xpp/xbus-core.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -928,9 +928,9 @@ static int dahdi_seq_show(struct seq_fil
if (!s)
return -ENODEV;
- if (s->name)
+ if (*(s->name))
seq_printf(sfile, "Span %d: %s ", s->spanno, s->name);
- if (s->desc)
+ if (*(s->desc))
seq_printf(sfile, "\"%s\"", s->desc);
else
seq_printf(sfile, "\"\"");
@@ -969,7 +969,7 @@ static int dahdi_seq_show(struct seq_fil
for (x = 0; x < s->channels; x++) {
struct dahdi_chan *chan = s->chans[x];
- if (chan->name)
+ if (*(chan->name))
seq_printf(sfile, "\t%4d %s ", chan->channo,
chan->name);
--- a/drivers/dahdi/dahdi_dynamic_ethmf.c
+++ b/drivers/dahdi/dahdi_dynamic_ethmf.c
@@ -535,7 +535,7 @@ static void ztdethmf_destroy(struct dahd
kfree(z->msgbuf);
kfree(z);
} else {
- if (z && z->span && z->span->name) {
+ if (z && z->span && *(z->span->name)) {
printk(KERN_ERR "Cannot find interface for %s\n",
z->span->name);
}
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -120,7 +120,7 @@ int xbus_check_unique(xbus_t *xbus)
{
if (!xbus)
return -ENOENT;
- if (xbus->label && *(xbus->label)) {
+ if (*(xbus->label)) {
xbus_t *xbus_old;
XBUS_DBG(DEVICES, xbus, "Checking LABEL='%s'\n", xbus->label);

View File

@ -1,28 +0,0 @@
From d0699f781e96df6c1fd10551c92fa27695b297da Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 12 May 2023 20:19:45 +0200
Subject: [PATCH 3/6] dahdi-sysfs-chan: fix bug if clause does not guard
Fix bug if clause does not guard by a typo by missing the if clause and
not correctly removing the device.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/dahdi/dahdi-sysfs-chan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/dahdi/dahdi-sysfs-chan.c
+++ b/drivers/dahdi/dahdi-sysfs-chan.c
@@ -381,10 +381,11 @@ static void fixed_devfiles_remove(void)
return;
for (i = 0; i < ARRAY_SIZE(fixed_minors); i++) {
void *d = fixed_minors[i].dev;
- if (d && !IS_ERR(d))
+ if (d && !IS_ERR(d)) {
dahdi_dbg(DEVICES, "Removing fixed device file %s\n",
fixed_minors[i].name);
DEL_DAHDI_DEV(fixed_minors[i].minor);
+ }
}
}

View File

@ -1,38 +0,0 @@
From 88cfe20bcd0be443fc7613fd287147d1c54b5f7f Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 12 May 2023 20:21:39 +0200
Subject: [PATCH 5/6] dahdi: skip checking on releasing
Skip checking on releasing since xb is statically allocated and always
present.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/dahdi/wcte13xp-base.c | 3 +--
drivers/dahdi/wcte43x-base.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -2707,8 +2707,7 @@ static int __devinit te13xp_init_one(str
return 0;
fail_exit:
- if (&wc->xb)
- wcxb_release(&wc->xb);
+ wcxb_release(&wc->xb);
free_wc(wc);
return res;
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -3521,8 +3521,7 @@ static int __devinit t43x_init_one(struc
return 0;
fail_exit:
- if (&wc->xb)
- wcxb_release(&wc->xb);
+ wcxb_release(&wc->xb);
if (debug)
dev_info(&wc->xb.pdev->dev, "***At fail_exit in init_one***\n");

View File

@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -1772,7 +1772,7 @@ static void xbus_fill_proc_queue(struct
@@ -1775,7 +1775,7 @@ static void xbus_fill_proc_queue(struct
s32 rem;
s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
seq_printf(sfile,

View File

@ -0,0 +1,10 @@
--- a/drivers/dahdi/opvxa1200/Kbuild
+++ b/drivers/dahdi/opvxa1200/Kbuild
@@ -1,6 +1,6 @@
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OPVXA1200) += opvxa1200.o
-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef -Wno-error=unused-variable
opvxa1200-objs := base.o