Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 630132 Details for
Bug 716226
net-misc/dahdi-3.1.0-r1 fails to compile on kernels >= 5.6.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch file to make net-misc/dahdi-3.1.0-r1 compile again on Linux kernels >= 5.6.0
94-fixes-ioremap-and-proc_create_data.patch (text/plain), 13.00 KB, created by
Florian Evers
on 2020-04-04 20:19:30 UTC
(
hide
)
Description:
The patch file to make net-misc/dahdi-3.1.0-r1 compile again on Linux kernels >= 5.6.0
Filename:
MIME Type:
Creator:
Florian Evers
Created:
2020-04-04 20:19:30 UTC
Size:
13.00 KB
patch
obsolete
>diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/ap400/ap400_drv.c dahdi-linux-3.1.0/drivers/dahdi/ap400/ap400_drv.c >--- dahdi-linux-3.1.0-before/drivers/dahdi/ap400/ap400_drv.c 2020-04-04 21:32:46.753897251 +0200 >+++ dahdi-linux-3.1.0/drivers/dahdi/ap400/ap400_drv.c 2020-04-04 21:36:28.671942226 +0200 >@@ -2069,7 +2069,7 @@ > // Remap PCI address > wc->memaddr = pci_resource_start(pdev, 2); > wc->memlen = pci_resource_len(pdev, 2); >- wc->membase = ioremap_nocache(wc->memaddr, wc->memlen); >+ wc->membase = ioremap(wc->memaddr, wc->memlen); > if(wc->membase == NULL) { > printk("AP400: ioremap failed!\n"); > res = -EIO; >@@ -2205,8 +2205,7 @@ > bar_size[2] = wc->memlen; > for (i = 0; i < 2; i++) { > bar_size[i] = (u32) pci_resource_len(pdev, i); >- base_addr[i] = ioremap_nocache(pci_resource_start(pdev, i), >- bar_size[i]); >+ base_addr[i] = ioremap(pci_resource_start(pdev, i), bar_size[i]); > if (base_addr[i] == NULL) { > printk(KERN_ERR "Memory map failed\n"); > res = -ENODEV; >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/dahdi-base.c dahdi-linux-3.1.0/drivers/dahdi/dahdi-base.c >--- dahdi-linux-3.1.0-before/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-04 21:56:45.310689658 +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 -uNr dahdi-linux-3.1.0-before/drivers/dahdi/dahdi_dynamic_ethmf.c dahdi-linux-3.1.0/drivers/dahdi/dahdi_dynamic_ethmf.c >--- dahdi-linux-3.1.0-before/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-04 21:36:51.085641794 +0200 >@@ -733,12 +733,22 @@ > 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) >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/card_bri.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_bri.c >--- dahdi-linux-3.1.0-before/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-04 21:35:22.285832377 +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,15 @@ > .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) >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/card_fxo.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxo.c >--- dahdi-linux-3.1.0-before/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-04 21:35:03.600081736 +0200 >@@ -107,9 +107,17 @@ > 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 >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) > static const struct file_operations proc_xpd_metering_ops; >+#else >+static const struct proc_ops proc_xpd_metering_ops; >+#endif > #endif > #endif > static void dahdi_report_battery(xpd_t *xpd, lineno_t chan); >@@ -1484,6 +1492,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 +1500,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) >@@ -1521,6 +1538,7 @@ > return single_open(file, proc_xpd_metering_show, PDE_DATA(inode)); > } > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) > static const struct file_operations proc_xpd_metering_ops = { > .owner = THIS_MODULE, > .open = proc_xpd_metering_open, >@@ -1528,6 +1546,14 @@ > .llseek = seq_lseek, > .release = single_release, > }; >+#else >+static const struct proc_ops proc_xpd_metering_ops = { >+ .proc_open = proc_xpd_metering_open, >+ .proc_read = seq_read, >+ .proc_lseek = seq_lseek, >+ .proc_release = single_release, >+}; >+#endif > > #endif > #endif >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/card_fxs.c dahdi-linux-3.1.0/drivers/dahdi/xpp/card_fxs.c >--- dahdi-linux-3.1.0-before/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-04 21:35:35.116660295 +0200 >@@ -160,9 +160,17 @@ > 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 >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) > static const struct file_operations proc_xpd_metering_ops; >+#else >+static const struct proc_ops proc_xpd_metering_ops; >+#endif > #endif > #endif > static void start_stop_vm_led(xbus_t *xbus, xpd_t *xpd, lineno_t pos); >@@ -2115,6 +2123,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 +2131,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, >@@ -2165,12 +2182,20 @@ > file->private_data = PDE_DATA(inode); > } > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) > static const struct file_operations proc_xpd_metering_ops = { > .owner = THIS_MODULE, > .open = proc_xpd_metering_open, > .write = proc_xpd_metering_write, > .release = single_release, > }; >+#else >+static const struct proc_ops proc_xpd_metering_ops = { >+ .proc_open = proc_xpd_metering_open, >+ .proc_write = proc_xpd_metering_write, >+ .proc_release = single_release, >+}; >+#endif > #endif > #endif > >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/xbus-core.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c >--- dahdi-linux-3.1.0-before/drivers/dahdi/xpp/xbus-core.c 2019-10-03 16:48:09.000000000 +0200 >+++ dahdi-linux-3.1.0/drivers/dahdi/xpp/xbus-core.c 2020-04-04 21:35:48.340482962 +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,7 +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 > > static void transport_init(xbus_t *xbus, struct xbus_ops *ops, >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/xpp_dahdi.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_dahdi.c >--- dahdi-linux-3.1.0-before/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-04 21:36:03.074285401 +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 > >diff -uNr dahdi-linux-3.1.0-before/drivers/dahdi/xpp/xpp_usb.c dahdi-linux-3.1.0/drivers/dahdi/xpp/xpp_usb.c >--- dahdi-linux-3.1.0-before/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-04 21:36:15.337120991 +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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 716226
: 630132