Skip to content

Commit

Permalink
libs/dahdi-linux: bump to latest git head
Browse files Browse the repository at this point in the history
Fixes compiling against linux >= 6.6

Signed-off-by: Adam Duskett <[email protected]>
  • Loading branch information
Adam Duskett committed Apr 12, 2024
1 parent 22dd505 commit 338aae9
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 253 deletions.
6 changes: 3 additions & 3 deletions libs/dahdi-linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ PKG_RELEASE:=2

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
Expand Down
2 changes: 1 addition & 1 deletion libs/dahdi-linux/patches/003-fix-oslec-build.patch
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
10 changes: 6 additions & 4 deletions libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
--- 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_WCTC4XXP) += wctc4xxp/
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/

ifndef HOTPLUG_FIRMWARE
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"
Expand All @@ -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 @@
Expand Down
14 changes: 7 additions & 7 deletions libs/dahdi-linux/patches/130-DAHLIN-371-pld-linux-math64.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -35,7 +35,7 @@
#include "xbus-pcm.h"
#include "xbus-core.h"
#include "xpp_dahdi.h"
@@ -129,7 +130,7 @@ static int xpp_ticker_step(struct xpp_ti
@@ -129,7 +130,7 @@ static int xpp_ticker_step(struct xpp_ticker *ticker, const ktime_t t)
usec = ktime_us_delta(ticker->last_sample,
ticker->first_sample);
ticker->first_sample = ticker->last_sample;
Expand All @@ -44,7 +44,7 @@
cycled = 1;
}
ticker->count++;
@@ -497,7 +498,7 @@ static void send_drift(xbus_t *xbus, int
@@ -497,7 +498,7 @@ static void send_drift(xbus_t *xbus, int drift)
XBUS_DBG(SYNC, xbus,
"%sDRIFT adjust %s (%d) (last update %lld seconds ago)\n",
(disable_pll_sync) ? "Fake " : "", msg, drift,
Expand All @@ -63,7 +63,7 @@
#include <linux/proc_fs.h>
#ifdef PROTOCOL_DEBUG
#include <linux/ctype.h>
@@ -249,11 +250,9 @@ static DEVICE_ATTR_READER(driftinfo_show
@@ -249,11 +250,9 @@ static DEVICE_ATTR_READER(driftinfo_show, dev, buf)
/*
* Calculate lost ticks time
*/
Expand All @@ -85,7 +85,7 @@
#include "xframe_queue.h"
#include "xbus-core.h"
#include "dahdi_debug.h"
@@ -40,10 +41,11 @@ static void __xframe_dump_queue(struct x
@@ -40,10 +41,11 @@ static void __xframe_dump_queue(struct xframe_queue *q)
THIS_MODULE->name, q->name);
list_for_each_entry_reverse(xframe, &q->head, frame_list) {
xpacket_t *pack = (xpacket_t *)&xframe->packets[0];
Expand All @@ -100,7 +100,7 @@
dump_packet(prefix, pack, 1);
}
}
@@ -60,11 +62,13 @@ static bool __xframe_enqueue(struct xfra
@@ -60,11 +62,13 @@ static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
if (q->count >= q->max_count) {
q->overflows++;
if ((overflow_cnt++ % 1000) < 5) {
Expand All @@ -127,7 +127,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <asm/uaccess.h>
#else
@@ -891,7 +892,7 @@ static void xpp_send_callback(struct urb
@@ -891,7 +892,7 @@ static void xpp_send_callback(struct urb *urb)
usec = 0; /* System clock jumped */
if (usec > xusb->max_tx_delay)
xusb->max_tx_delay = usec;
Expand Down
114 changes: 3 additions & 111 deletions libs/dahdi-linux/patches/200-dahdi-use-fallthrough-where-needed.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,12 @@ Use fallthrough instead of comment to fix compilation warning.

Signed-off-by: Christian Marangi <[email protected]>
---
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 *chan, int cursig)
break;
case DAHDI_SIG_FXSKS: /* FXS Kewlstart */
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
Expand All @@ -69,63 +21,3 @@ Signed-off-by: Christian Marangi <[email protected]>
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 */

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <[email protected]>

--- 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,
Expand Down

0 comments on commit 338aae9

Please sign in to comment.