[packages/dahdi-linux] - up to 3.2.0
baggins
baggins at pld-linux.org
Sat Dec 17 19:01:35 CET 2022
commit 5f4a848d34a54dff13eaab7e870fbf6eb0eb3244
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Dec 17 19:01:16 2022 +0100
- up to 3.2.0
dahdi-linux.spec | 24 +---
kernel-4.9.256.patch | 11 --
kernel-5.17.patch | 13 --
kernel-5.4.patch | 14 ---
kernel-5.6.patch | 326 ---------------------------------------------------
kernel-5.9.patch | 16 ---
kernel-6.1.patch | 28 +++++
math64.patch | 143 ----------------------
nostdinc.patch | 55 ---------
9 files changed, 33 insertions(+), 597 deletions(-)
---
diff --git a/dahdi-linux.spec b/dahdi-linux.spec
index 4ea6fa6..cb2b05c 100644
--- a/dahdi-linux.spec
+++ b/dahdi-linux.spec
@@ -33,18 +33,18 @@ exit 1
# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
-%define rel 9
+%define rel 1
%define pname dahdi-linux
%define FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases
Summary: DAHDI telephony device support
Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version: 3.1.0
+Version: 3.2.0
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v2
Group: Base/Kernel
Source0: http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-%{version}.tar.gz
-# Source0-md5: 17d7542e613afd6cf860516fe785d56c
+# Source0-md5: f93e28f544e914abdc927a6287ff5091
Source3: %{FIRMWARE_URL}/dahdi-fw-oct6114-064-1.05.01.tar.gz
# Source3-md5: 88db9b7a07d8392736171b1b3e6bcc66
Source4: %{FIRMWARE_URL}/dahdi-fw-oct6114-128-1.05.01.tar.gz
@@ -56,14 +56,8 @@ Source6: %{FIRMWARE_URL}/dahdi-fw-tc400m-MR6.12.tar.gz
Source7: %{FIRMWARE_URL}/dahdi-fw-hx8-2.06.tar.gz
# Source7-md5: a7f3886942bb3e9fed349a41b3390c9f
Patch0: kernel-4.14.patch
-Patch1: kernel-5.4.patch
-Patch2: math64.patch
-Patch3: kernel-5.6.patch
-Patch4: kernel-5.9.patch
-Patch5: kernel-4.9.256.patch
-Patch6: nostdinc.patch
-Patch7: kernel-5.17.patch
-Patch8: kernel-5.18.patch
+Patch1: kernel-5.18.patch
+Patch2: kernel-6.1.patch
URL: http://www.asterisk.org/
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
BuildRequires: perl-base
@@ -163,15 +157,7 @@ cd ../..\
%setup -q -n %{pname}-%{version}
%patch0 -p1
%patch1 -p1
-%ifarch %{ix86}
%patch2 -p1
-%endif
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}; do
ln -s $a drivers/dahdi/firmware
diff --git a/kernel-4.9.256.patch b/kernel-4.9.256.patch
deleted file mode 100644
index 04728f5..0000000
--- a/kernel-4.9.256.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- dahdi-linux-3.1.0/include/dahdi/kernel.h~ 2021-02-06 20:19:28.000000000 +0100
-+++ dahdi-linux-3.1.0/include/dahdi/kernel.h 2021-02-06 20:27:57.430773118 +0100
-@@ -1427,7 +1427,7 @@
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- #define refcount_read atomic_read
-
--#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- #define dahdi_ktime_equal ktime_equal
-
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
diff --git a/kernel-5.17.patch b/kernel-5.17.patch
deleted file mode 100644
index aa359ee..0000000
--- a/kernel-5.17.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- dahdi-linux-3.1.0/include/dahdi/kernel.h~ 2022-04-02 22:49:13.000000000 +0200
-+++ dahdi-linux-3.1.0/include/dahdi/kernel.h 2022-04-02 23:08:10.095243044 +0200
-@@ -1504,6 +1504,10 @@
-
- #endif /* 4.15.0 */
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
-+#define PDE_DATA pde_data
-+#endif
-+
- #ifndef dahdi_ktime_equal
- static inline int dahdi_ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
- {
diff --git a/kernel-5.4.patch b/kernel-5.4.patch
deleted file mode 100644
index 0548571..0000000
--- a/kernel-5.4.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- dahdi-linux-3.1.0/include/dahdi/kernel.h~ 2019-11-30 23:36:28.000000000 +0100
-+++ dahdi-linux-3.1.0/include/dahdi/kernel.h 2019-11-30 23:36:58.436460522 +0100
-@@ -58,9 +58,11 @@
-
- #include <linux/poll.h>
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
- #ifdef CONFIG_PCI
- #include <linux/pci-aspm.h>
- #endif
-+#endif
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
- #define HAVE_NET_DEVICE_OPS
diff --git a/kernel-5.6.patch b/kernel-5.6.patch
deleted file mode 100644
index b031b77..0000000
--- a/kernel-5.6.patch
+++ /dev/null
@@ -1,326 +0,0 @@
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c.orig 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c 2020-04-06 22:34:10.096719691 +0200
-@@ -50,7 +50,11 @@
- #ifdef PROTOCOL_DEBUG
- #ifdef CONFIG_PROC_FS
- #define PROC_XBUS_COMMAND "command"
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_xbus_command_ops;
-+#else
-+static const struct proc_ops proc_xbus_command_ops;
-+#endif
- #endif
- #endif
-
-@@ -65,7 +69,11 @@
- "Register devices automatically (1) or not (0). UNUSED.");
-
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xbus_read_proc_ops;
-+#else
-+static const struct proc_ops xbus_read_proc_ops;
-+#endif
- #endif
- static void transport_init(xbus_t *xbus, struct xbus_ops *ops,
- ushort max_send_size,
-@@ -1828,6 +1836,7 @@
- return single_open(file, xbus_proc_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xbus_read_proc_ops = {
- .owner = THIS_MODULE,
- .open = xbus_read_proc_open,
-@@ -1835,6 +1844,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #ifdef PROTOCOL_DEBUG
- static ssize_t proc_xbus_command_write(struct file *file,
-@@ -1927,11 +1944,18 @@
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_xbus_command_ops = {
- .owner = THIS_MODULE,
- .open = proc_xbus_command_open,
- .write = proc_xbus_command_write,
- };
-+#else
-+static const struct proc_ops proc_xbus_command_ops = {
-+ .proc_open = proc_xbus_command_open,
-+ .proc_write = proc_xbus_command_write,
-+};
-+#endif
- #endif
-
- static int xpp_proc_read_show(struct seq_file *sfile, void *data)
-@@ -1961,6 +1985,7 @@
- return single_open(file, xpp_proc_read_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xpp_proc_read_ops = {
- .owner = THIS_MODULE,
- .open = xpp_proc_read_open,
-@@ -1968,6 +1993,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #endif
-
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c 2020-04-06 22:36:24.210054963 +0200
-@@ -160,7 +160,11 @@
- static bool fxs_packet_is_valid(xpacket_t *pack);
- static void fxs_packet_dump(const char *msg, xpacket_t *pack);
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_fxs_info_ops;
-+#else
-+static const struct proc_ops proc_fxs_info_ops;
-+#endif
- #ifdef WITH_METERING
- static const struct file_operations proc_xpd_metering_ops;
- #endif
-@@ -2115,6 +2119,7 @@
- return single_open(file, proc_fxs_info_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_fxs_info_ops = {
- .owner = THIS_MODULE,
- .open = proc_fxs_info_open,
-@@ -2122,6 +2127,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #ifdef WITH_METERING
- static ssize_t proc_xpd_metering_write(struct file *file,
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c 2020-04-06 22:38:26.426723392 +0200
-@@ -103,7 +103,11 @@
- }
-
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xpd_read_proc_ops;
-+#else
-+static const struct proc_ops xpd_read_proc_ops;
-+#endif
- #endif
-
- /*------------------------- XPD Management -------------------------*/
-@@ -392,6 +396,7 @@
- return single_open(file, xpd_read_proc_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xpd_read_proc_ops = {
- .owner = THIS_MODULE,
- .open = xpd_read_proc_open,
-@@ -399,6 +404,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #endif
-
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c 2020-04-06 22:40:28.523391828 +0200
-@@ -228,7 +228,11 @@
- const struct usb_device_id *id);
- static void xusb_disconnect(struct usb_interface *interface);
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xusb_read_proc_ops;
-+#else
-+static const struct proc_ops xusb_read_proc_ops;
-+#endif
- #endif
-
- /*------------------------------------------------------------------*/
-@@ -1108,6 +1112,7 @@
- return single_open(file, xusb_read_proc_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations xusb_read_proc_ops = {
- .owner = THIS_MODULE,
- .open = xusb_read_proc_open,
-@@ -1115,7 +1120,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
--
-+#else
-+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,
-+};
-+#endif
-
- #endif
-
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c 2020-04-06 22:42:48.636727124 +0200
-@@ -153,7 +153,11 @@
- static bool bri_packet_is_valid(xpacket_t *pack);
- static void bri_packet_dump(const char *msg, xpacket_t *pack);
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_bri_info_ops;
-+#else
-+static const struct proc_ops proc_bri_info_ops;
-+#endif
- #endif
- static int bri_spanconfig(struct file *file, struct dahdi_span *span,
- struct dahdi_lineconfig *lc);
-@@ -1740,6 +1744,7 @@
- return single_open(file, proc_bri_info_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_bri_info_ops = {
- .owner = THIS_MODULE,
- .open = proc_bri_info_open,
-@@ -1747,6 +1752,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
- #endif
-
- static int bri_xpd_probe(struct device *dev)
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c 2020-04-06 22:44:33.106728622 +0200
-@@ -107,7 +107,11 @@
- static bool fxo_packet_is_valid(xpacket_t *pack);
- static void fxo_packet_dump(const char *msg, xpacket_t *pack);
- #ifdef CONFIG_PROC_FS
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_fxo_info_ops;
-+#else
-+static const struct proc_ops proc_fxo_info_ops;
-+#endif
- #ifdef WITH_METERING
- static const struct file_operations proc_xpd_metering_ops;
- #endif
-@@ -1484,6 +1488,7 @@
- return single_open(file, proc_fxo_info_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations proc_fxo_info_ops = {
- .owner = THIS_MODULE,
- .open = proc_fxo_info_open,
-@@ -1491,6 +1496,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #ifdef WITH_METERING
- static int proc_xpd_metering_show(struct seq_file *sfile, void *not_used)
---- dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c 2020-04-06 22:48:13.696731750 +0200
-@@ -733,12 +733,21 @@
- return single_open(file, ztdethmf_proc_show, NULL);
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations ztdethmf_proc_fops = {
- .open = ztdethmf_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
- };
-+#else
-+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,
-+};
-+#endif
- #endif
-
- static int __init ztdethmf_init(void)
---- dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c~ 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c 2020-04-06 22:49:56.900066527 +0200
-@@ -1015,6 +1015,7 @@
- return single_open(file, dahdi_seq_show, PDE_DATA(inode));
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
- static const struct file_operations dahdi_proc_ops = {
- .owner = THIS_MODULE,
- .open = dahdi_proc_open,
-@@ -1022,6 +1023,14 @@
- .llseek = seq_lseek,
- .release = single_release,
- };
-+#else
-+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,
-+};
-+#endif
-
- #endif
-
diff --git a/kernel-5.9.patch b/kernel-5.9.patch
deleted file mode 100644
index e8ac52b..0000000
--- a/kernel-5.9.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- dahdi-linux-3.1.0/include/dahdi/kernel.h~ 2020-10-21 07:44:12.000000000 +0200
-+++ dahdi-linux-3.1.0/include/dahdi/kernel.h 2020-10-21 08:05:07.153002470 +0200
-@@ -58,6 +58,13 @@
-
- #include <linux/poll.h>
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
-+#define HAVE_UNLOCKED_IOCTL 1
-+#ifdef CONFIG_COMPAT
-+#define HAVE_COMPAT_IOCTL 1
-+#endif
-+#endif
-+
- #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
- #ifdef CONFIG_PCI
- #include <linux/pci-aspm.h>
diff --git a/kernel-6.1.patch b/kernel-6.1.patch
new file mode 100644
index 0000000..3fbe021
--- /dev/null
+++ b/kernel-6.1.patch
@@ -0,0 +1,28 @@
+--- dahdi-linux-3.2.0/drivers/dahdi/voicebus/voicebus_net.c~ 2022-09-22 14:23:24.000000000 +0200
++++ dahdi-linux-3.2.0/drivers/dahdi/voicebus/voicebus_net.c 2022-12-17 18:55:22.078293527 +0100
+@@ -202,7 +202,11 @@
+
+ netdev->promiscuity = 0;
+ netdev->flags |= IFF_NOARP;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
+ netif_napi_add(netdev, &vb->napi, vb_net_poll, 64);
++#else
++ netif_napi_add(netdev, &vb->napi, vb_net_poll);
++#endif
+
+ skb_queue_head_init(&vb->captured_packets);
+ res = register_netdev(netdev);
+--- dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c~ 2022-12-17 18:53:16.000000000 +0100
++++ dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c 2022-12-17 18:56:24.751889607 +0100
+@@ -658,7 +658,11 @@
+ netdev->promiscuity = 0;
+ netdev->flags |= IFF_NOARP;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
+ netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
++#else
++ netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll);
++#endif
+
+ res = register_netdev(netdev);
+ if (res) {
diff --git a/math64.patch b/math64.patch
deleted file mode 100644
index 4abfb24..0000000
--- a/math64.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-diff -ur dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-core.c
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-core.c 2019-12-01 15:42:12.261848789 +0100
-@@ -25,6 +25,7 @@
- #include <linux/errno.h>
- #include <linux/sched.h>
- #include <linux/mutex.h>
-+#include <linux/math64.h>
- #include <linux/proc_fs.h>
- #include <linux/seq_file.h>
- #include <linux/slab.h>
-@@ -1754,11 +1755,13 @@
-
- static void xbus_fill_proc_queue(struct seq_file *sfile, struct xframe_queue *q)
- {
-+ s32 rem;
-+ s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
- seq_printf(sfile,
-- "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%lld ms\n",
-+ "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
- q->name, q->steady_state_count, q->count, q->max_count,
-- q->worst_count, q->overflows, q->worst_lag_usec / 1000,
-- q->worst_lag_usec % 1000);
-+ q->worst_count, q->overflows, lag_sec,
-+ rem);
- xframe_queue_clearstats(q);
- }
-
-diff -ur dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-pcm.c dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-pcm.c
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-pcm.c 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-pcm.c 2019-12-01 16:32:23.696492708 +0100
-@@ -22,6 +22,7 @@
- #include <linux/version.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-+#include <linux/math64.h>
- #include "xbus-pcm.h"
- #include "xbus-core.h"
- #include "xpp_dahdi.h"
-@@ -129,7 +130,7 @@
- usec = ktime_us_delta(ticker->last_sample,
- ticker->first_sample);
- ticker->first_sample = ticker->last_sample;
-- ticker->tick_period = usec / ticker->cycle;
-+ ticker->tick_period = div_s64(usec, ticker->cycle);
- cycled = 1;
- }
- ticker->count++;
-@@ -497,7 +498,7 @@
- XBUS_DBG(SYNC, xbus,
- "%sDRIFT adjust %s (%d) (last update %lld seconds ago)\n",
- (disable_pll_sync) ? "Fake " : "", msg, drift,
-- msec_delta / MSEC_PER_SEC);
-+ div_s64(msec_delta, MSEC_PER_SEC));
- if (!disable_pll_sync)
- CALL_PROTO(GLOBAL, SYNC_SOURCE, xbus, NULL, SYNC_MODE_PLL,
- drift);
-diff -ur dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-sysfs.c dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-sysfs.c
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-sysfs.c 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xbus-sysfs.c 2019-12-01 16:29:26.289062748 +0100
-@@ -23,6 +23,7 @@
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/errno.h>
-+#include <linux/math64.h>
- #include <linux/proc_fs.h>
- #ifdef PROTOCOL_DEBUG
- #include <linux/ctype.h>
-@@ -249,11 +250,9 @@
- /*
- * Calculate lost ticks time
- */
-- seconds = ktime_ms_delta(now, di->last_lost_tick) / 1000;
-- minutes = seconds / 60;
-- seconds = seconds % 60;
-- hours = minutes / 60;
-- minutes = minutes % 60;
-+ seconds = div_s64(ktime_ms_delta(now, di->last_lost_tick), 1000);
-+ minutes = div_s64_rem(seconds, 60, &seconds);
-+ hours = div_s64_rem(minutes, 60, &minutes);
- len += snprintf(buf + len, PAGE_SIZE - len,
- "%-15s: %8d (was %d:%02d:%02d ago)\n", "lost_ticks",
- di->lost_ticks, hours, minutes, seconds);
-diff -ur dahdi-linux-3.1.0/drivers/dahdi/xpp/xframe_queue.c dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xframe_queue.c
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xframe_queue.c 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xframe_queue.c 2019-12-01 15:46:21.663845498 +0100
-@@ -1,3 +1,4 @@
-+#include <linux/math64.h>
- #include "xframe_queue.h"
- #include "xbus-core.h"
- #include "dahdi_debug.h"
-@@ -40,10 +41,11 @@
- THIS_MODULE->name, q->name);
- list_for_each_entry_reverse(xframe, &q->head, frame_list) {
- xpacket_t *pack = (xpacket_t *)&xframe->packets[0];
-- s64 usec = ktime_us_delta(now, xframe->kt_queued);
-+ s32 rem;
-+ s64 sec = div_s64_rem(ktime_us_delta(now, xframe->kt_queued), 1000, &rem);
-
-- snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03lld msec",
-- i++, usec / 1000, usec % 1000);
-+ snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03ld msec",
-+ i++, sec, rem);
- dump_packet(prefix, pack, 1);
- }
- }
-@@ -60,11 +62,13 @@
- if (q->count >= q->max_count) {
- q->overflows++;
- if ((overflow_cnt++ % 1000) < 5) {
-- NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%lld ms\n",
-+ s32 rem;
-+ s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
-+ NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
- q->name, q->steady_state_count, q->count,
- q->max_count, q->worst_count, q->overflows,
-- q->worst_lag_usec / 1000,
-- q->worst_lag_usec % 1000);
-+ lag_sec,
-+ rem);
- __xframe_dump_queue(q);
- }
- ret = 0;
-diff -ur dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xpp_usb.c
---- dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c 2019-10-03 16:48:09.000000000 +0200
-+++ dahdi-linux-3.1.0-math64/drivers/dahdi/xpp/xpp_usb.c 2019-12-01 16:34:50.324899402 +0100
-@@ -27,6 +27,7 @@
- #include <linux/interrupt.h>
- #include <linux/delay.h> /* for udelay */
- #include <linux/seq_file.h>
-+#include <linux/math64.h>
- #include <asm/uaccess.h>
- #include <asm/atomic.h>
- #include <asm/timex.h>
-@@ -882,7 +883,7 @@
- usec = 0; /* System clock jumped */
- if (usec > xusb->max_tx_delay)
- xusb->max_tx_delay = usec;
-- i = usec / USEC_BUCKET;
-+ i = div_s64(usec, USEC_BUCKET);
- if (i >= NUM_BUCKETS)
- i = NUM_BUCKETS - 1;
- xusb->usb_tx_delay[i]++;
diff --git a/nostdinc.patch b/nostdinc.patch
deleted file mode 100644
index 32b2a0e..0000000
--- a/nostdinc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- /dev/null 2022-01-08 18:09:02.763467091 +0100
-+++ dahdi-linux-3.1.0/drivers/dahdi/stdbool.h 2022-01-15 11:34:39.985002741 +0100
-@@ -0,0 +1,52 @@
-+/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+Under Section 7 of GPL version 3, you are granted additional
-+permissions described in the GCC Runtime Library Exception, version
-+3.1, as published by the Free Software Foundation.
-+
-+You should have received a copy of the GNU General Public License and
-+a copy of the GCC Runtime Library Exception along with this program;
-+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-+<http://www.gnu.org/licenses/>. */
-+
-+/*
-+ * ISO C Standard: 7.16 Boolean type and values <stdbool.h>
-+ */
-+
-+#ifndef _STDBOOL_H
-+#define _STDBOOL_H
-+
-+#ifndef __cplusplus
-+
-+#define bool _Bool
-+#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
-+#define true ((_Bool)+1u)
-+#define false ((_Bool)+0u)
-+#else
-+#define true 1
-+#define false 0
-+#endif
-+
-+#else /* __cplusplus */
-+
-+/* Supporting _Bool in C++ is a GCC extension. */
-+#define _Bool bool
-+
-+#endif /* __cplusplus */
-+
-+/* Signal that all the definitions are present. */
-+#define __bool_true_false_are_defined 1
-+
-+#endif /* stdbool.h */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dahdi-linux.git/commitdiff/5f4a848d34a54dff13eaab7e870fbf6eb0eb3244
More information about the pld-cvs-commit
mailing list