From 06917fd5e8c284bc5cfe163e6ccce483ddc34d5c Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Fri, 12 Apr 2024 16:06:50 -0600 Subject: [PATCH] libs/dahdi-linux: bump to latest git head Add a new patch: 207-opvxa1200-unused-variable.patch which fixes unused variable {pos,x,y} errors in the drivers/dahdi/opvxa1200/base.c file. Fixes compiling against linux >= 6.6 Signed-off-by: Adam Duskett --- libs/dahdi-linux/Makefile | 8 +- .../patches/003-fix-oslec-build.patch | 2 +- .../100-add-support-for-hfc-s-pci.patch | 10 +- .../130-DAHLIN-371-pld-linux-math64.patch | 2 +- ...0-dahdi-use-fallthrough-where-needed.patch | 114 +----------------- ...-fix-always-true-compilation-warning.patch | 60 --------- ...han-fix-bug-if-clause-does-not-guard.patch | 28 ----- ...204-dahdi-skip-checking-on-releasing.patch | 38 ------ .../205-dahdi-xpp-fix-wrong-printf-to-d.patch | 2 +- .../207-opvxa1200-unused-variable.patch | 10 ++ 10 files changed, 26 insertions(+), 248 deletions(-) delete mode 100644 libs/dahdi-linux/patches/201-dahdi-fix-always-true-compilation-warning.patch delete mode 100644 libs/dahdi-linux/patches/202-dahdi-sysfs-chan-fix-bug-if-clause-does-not-guard.patch delete mode 100644 libs/dahdi-linux/patches/204-dahdi-skip-checking-on-releasing.patch create mode 100644 libs/dahdi-linux/patches/207-opvxa1200-unused-variable.patch diff --git a/libs/dahdi-linux/Makefile b/libs/dahdi-linux/Makefile index 168d404..97955d1 100644 --- a/libs/dahdi-linux/Makefile +++ b/libs/dahdi-linux/Makefile @@ -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 diff --git a/libs/dahdi-linux/patches/003-fix-oslec-build.patch b/libs/dahdi-linux/patches/003-fix-oslec-build.patch index 4b2b2a0..8318f35 100644 --- a/libs/dahdi-linux/patches/003-fix-oslec-build.patch +++ b/libs/dahdi-linux/patches/003-fix-oslec-build.patch @@ -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: diff --git a/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch b/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch index 7a8d945..9b7246f 100644 --- a/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch +++ b/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch @@ -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 @@ diff --git a/libs/dahdi-linux/patches/130-DAHLIN-371-pld-linux-math64.patch b/libs/dahdi-linux/patches/130-DAHLIN-371-pld-linux-math64.patch index 87351c5..ffa6d08 100644 --- a/libs/dahdi-linux/patches/130-DAHLIN-371-pld-linux-math64.patch +++ b/libs/dahdi-linux/patches/130-DAHLIN-371-pld-linux-math64.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -1768,11 +1769,13 @@ out: +@@ -1771,11 +1772,13 @@ out: static void xbus_fill_proc_queue(struct seq_file *sfile, struct xframe_queue *q) { diff --git a/libs/dahdi-linux/patches/200-dahdi-use-fallthrough-where-needed.patch b/libs/dahdi-linux/patches/200-dahdi-use-fallthrough-where-needed.patch index 5e613b7..e9a4d4d 100644 --- a/libs/dahdi-linux/patches/200-dahdi-use-fallthrough-where-needed.patch +++ b/libs/dahdi-linux/patches/200-dahdi-use-fallthrough-where-needed.patch @@ -7,60 +7,12 @@ Use fallthrough instead of comment to fix compilation warning. Signed-off-by: Christian Marangi --- - 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 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 */ diff --git a/libs/dahdi-linux/patches/201-dahdi-fix-always-true-compilation-warning.patch b/libs/dahdi-linux/patches/201-dahdi-fix-always-true-compilation-warning.patch deleted file mode 100644 index 353e9c2..0000000 --- a/libs/dahdi-linux/patches/201-dahdi-fix-always-true-compilation-warning.patch +++ /dev/null @@ -1,60 +0,0 @@ -From eea6daaa4cae1ddcd8e32c8b9e4273ba3244838c Mon Sep 17 00:00:00 2001 -From: Christian Marangi -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 ---- - 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); diff --git a/libs/dahdi-linux/patches/202-dahdi-sysfs-chan-fix-bug-if-clause-does-not-guard.patch b/libs/dahdi-linux/patches/202-dahdi-sysfs-chan-fix-bug-if-clause-does-not-guard.patch deleted file mode 100644 index b887094..0000000 --- a/libs/dahdi-linux/patches/202-dahdi-sysfs-chan-fix-bug-if-clause-does-not-guard.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d0699f781e96df6c1fd10551c92fa27695b297da Mon Sep 17 00:00:00 2001 -From: Christian Marangi -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 ---- - 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); -+ } - } - } - diff --git a/libs/dahdi-linux/patches/204-dahdi-skip-checking-on-releasing.patch b/libs/dahdi-linux/patches/204-dahdi-skip-checking-on-releasing.patch deleted file mode 100644 index 24bbf81..0000000 --- a/libs/dahdi-linux/patches/204-dahdi-skip-checking-on-releasing.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 88cfe20bcd0be443fc7613fd287147d1c54b5f7f Mon Sep 17 00:00:00 2001 -From: Christian Marangi -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 ---- - 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"); diff --git a/libs/dahdi-linux/patches/205-dahdi-xpp-fix-wrong-printf-to-d.patch b/libs/dahdi-linux/patches/205-dahdi-xpp-fix-wrong-printf-to-d.patch index 52b9036..3dca2fc 100644 --- a/libs/dahdi-linux/patches/205-dahdi-xpp-fix-wrong-printf-to-d.patch +++ b/libs/dahdi-linux/patches/205-dahdi-xpp-fix-wrong-printf-to-d.patch @@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi --- 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, diff --git a/libs/dahdi-linux/patches/207-opvxa1200-unused-variable.patch b/libs/dahdi-linux/patches/207-opvxa1200-unused-variable.patch new file mode 100644 index 0000000..a17f7ad --- /dev/null +++ b/libs/dahdi-linux/patches/207-opvxa1200-unused-variable.patch @@ -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 + -- 2.30.2