diff -Nru dahdi-linux-2.11.1~dfsg/debian/changelog dahdi-linux-2.11.1~dfsg/debian/changelog --- dahdi-linux-2.11.1~dfsg/debian/changelog 2023-06-08 11:14:30.000000000 +0000 +++ dahdi-linux-2.11.1~dfsg/debian/changelog 2023-10-26 14:30:50.000000000 +0000 @@ -1,3 +1,10 @@ +dahdi-linux (1:2.11.1~dfsg-1ubuntu12~22.04.3) jammy; urgency=medium + + * Support Linux 6.5 (LP: #2041215): + - debian/patches/Linux-6.5-abi.patch + + -- Andrea Righi Thu, 26 Oct 2023 14:30:50 +0000 + dahdi-linux (1:2.11.1~dfsg-1ubuntu12~22.04.2) jammy; urgency=medium * Support Linux 6.2 (LP: #2023287): diff -Nru dahdi-linux-2.11.1~dfsg/debian/patches/Linux-6.5-abi.patch dahdi-linux-2.11.1~dfsg/debian/patches/Linux-6.5-abi.patch --- dahdi-linux-2.11.1~dfsg/debian/patches/Linux-6.5-abi.patch 1970-01-01 00:00:00.000000000 +0000 +++ dahdi-linux-2.11.1~dfsg/debian/patches/Linux-6.5-abi.patch 2023-10-26 14:30:50.000000000 +0000 @@ -0,0 +1,131 @@ +From: Andrea Righi +Subject: support new linux 6.5 ABI + +Index: dahdi-linux-2.11.1~dfsg/drivers/dahdi/dahdi-sysfs-chan.c +=================================================================== +--- dahdi-linux-2.11.1~dfsg.orig/drivers/dahdi/dahdi-sysfs-chan.c ++++ dahdi-linux-2.11.1~dfsg/drivers/dahdi/dahdi-sysfs-chan.c +@@ -480,7 +480,11 @@ int __init dahdi_sysfs_chan_init(const s + } + should_cleanup.channel_driver = 1; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) ++ dahdi_class = class_create("dahdi"); ++#else + dahdi_class = class_create(THIS_MODULE, "dahdi"); ++#endif + if (IS_ERR(dahdi_class)) { + res = PTR_ERR(dahdi_class); + dahdi_err("%s: class_create(dahi_chan) failed. Error: %d\n", +Index: dahdi-linux-2.11.1~dfsg/drivers/dahdi/dahdi-sysfs.c +=================================================================== +--- dahdi-linux-2.11.1~dfsg.orig/drivers/dahdi/dahdi-sysfs.c ++++ dahdi-linux-2.11.1~dfsg/drivers/dahdi/dahdi-sysfs.c +@@ -100,7 +100,11 @@ static int span_uevent(struct device *de + return err; \ + } while (0) + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) + static int span_uevent(struct device *dev, struct kobj_uevent_env *kenv) ++#else ++static int span_uevent(const struct device *dev, struct kobj_uevent_env *kenv) ++#endif + { + struct dahdi_span *span; + +@@ -301,15 +305,18 @@ ATTRIBUTE_GROUPS(dahdi); + #endif + + static struct bus_type spans_bus_type = { +- .name = "dahdi_spans", +- .match = span_match, +- .uevent = span_uevent, +-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ .name = "dahdi_spans", ++ .match = span_match, ++ .uevent = span_uevent, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) + .dev_attrs = span_dev_attrs, +- .drv_attrs = dahdi_attrs, + #else + .dev_groups = span_dev_groups, +- .drv_groups = dahdi_groups, ++#endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ .drv_attrs = dahdi_attrs, ++#else ++ .drv_groups = dahdi_groups, + #endif + }; + +@@ -500,7 +507,11 @@ static int device_uevent(struct device * + return err; \ + } while (0) + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) + static int device_uevent(struct device *dev, struct kobj_uevent_env *kenv) ++#else ++static int device_uevent(const struct device *dev, struct kobj_uevent_env *kenv) ++#endif + { + struct dahdi_device *ddev; + +Index: dahdi-linux-2.11.1~dfsg/drivers/dahdi/voicebus/voicebus.c +=================================================================== +--- dahdi-linux-2.11.1~dfsg.orig/drivers/dahdi/voicebus/voicebus.c ++++ dahdi-linux-2.11.1~dfsg/drivers/dahdi/voicebus/voicebus.c +@@ -1155,7 +1155,11 @@ static void vb_stop_txrx_processors(stru + */ + void voicebus_stop(struct voicebus *vb) + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) ++ static DEFINE_SEMAPHORE(stop, 1); ++#else + static DEFINE_SEMAPHORE(stop); ++#endif + + down(&stop); + +Index: dahdi-linux-2.11.1~dfsg/drivers/dahdi/wctdm24xxp/base.c +=================================================================== +--- dahdi-linux-2.11.1~dfsg.orig/drivers/dahdi/wctdm24xxp/base.c ++++ dahdi-linux-2.11.1~dfsg/drivers/dahdi/wctdm24xxp/base.c +@@ -225,7 +225,11 @@ mod_hooksig(struct wctdm *wc, struct wct + } + + struct wctdm *ifaces[WC_MAX_IFACES]; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0) ++DEFINE_SEMAPHORE(ifacelock, 1); ++#else + DEFINE_SEMAPHORE(ifacelock); ++#endif + + static void wctdm_release(struct wctdm *wc); + +Index: dahdi-linux-2.11.1~dfsg/drivers/dahdi/xpp/xbus-sysfs.c +=================================================================== +--- dahdi-linux-2.11.1~dfsg.orig/drivers/dahdi/xpp/xbus-sysfs.c ++++ dahdi-linux-2.11.1~dfsg/drivers/dahdi/xpp/xbus-sysfs.c +@@ -445,7 +445,11 @@ static int astribank_uevent(struct devic + return err; \ + } while (0) + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) + static int astribank_uevent(struct device *dev, struct kobj_uevent_env *kenv) ++#else ++static int astribank_uevent(const struct device *dev, struct kobj_uevent_env *kenv) ++#endif + { + xbus_t *xbus; + extern char *initdir; +Index: dahdi-linux-2.11.1~dfsg/include/dahdi/version.h +=================================================================== +--- /dev/null ++++ dahdi-linux-2.11.1~dfsg/include/dahdi/version.h +@@ -0,0 +1,6 @@ ++/* ++ * version.h ++ * Automatically generated ++ */ ++#define DAHDI_VERSION "2.11.1" ++ diff -Nru dahdi-linux-2.11.1~dfsg/debian/patches/series dahdi-linux-2.11.1~dfsg/debian/patches/series --- dahdi-linux-2.11.1~dfsg/debian/patches/series 2023-06-08 11:14:16.000000000 +0000 +++ dahdi-linux-2.11.1~dfsg/debian/patches/series 2023-10-26 14:30:50.000000000 +0000 @@ -21,3 +21,4 @@ Linux-5.9-ioctl-fix.patch kernel-compat-5.18.patch kernel-6.1-API-change-netif_napi_add-uses-weight-64-.patch +Linux-6.5-abi.patch