Overview

Request 5058 (accepted)

- Add patch 83b957b4.patch to get it build for kernel 5.6

Submit package home:bitstreamout:Essentials / r8168 to package Essentials / r8168

r8168.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Tue Mar 31 06:40:50 UTC 2020 - Werner Fink <werner@suse.de>
4
+
5
+- Add patch 83b957b4.patch to get it build for kernel 5.6 
6
+
7
+-------------------------------------------------------------------
8
 Mon Feb 10 11:38:00 UTC 2020 - Werner Fink <werner@suse.de>
9
 
10
 - Update to new version 8.048.00 
11
r8168.spec Changed
17
 
1
@@ -31,6 +31,7 @@
2
 Source2:        Module.supported
3
 Patch0:         r8168-kernel_version.patch
4
 Patch1:         r8168-configuration.patch
5
+Patch42:        83b957b4.patch
6
 BuildRequires:  kernel-source
7
 BuildRequires:  kernel-syms
8
 BuildRequires:  libelf-devel
9
@@ -59,6 +60,7 @@
10
 %setup -q
11
 %patch0 -b .p0
12
 %patch1 -b .p1
13
+%patch42 -p1 -b .p42
14
 cp %{S:1} .
15
 cp %{S:2} .
16
 
17
83b957b4.patch Added
99
 
1
@@ -0,0 +1,97 @@
2
+From 83b957b43d320da29476c6782be55df1bfb62d94 Mon Sep 17 00:00:00 2001
3
+From: petehg <pherworth@gmail.com>
4
+Date: Sun, 1 Mar 2020 09:38:25 +0000
5
+Subject: [PATCH] added patch for kernel-5.6
6
+
7
+---
8
+ src/r8168_n.c | 33 +++++++++++++++++++++++++++------
9
+ 1 file changed, 27 insertions(+), 6 deletions(-)
10
+
11
+diff --git a/src/r8168_n.c b/src/r8168_n.c
12
+index 0df6041..557823e 100755
13
+--- a/src/r8168_n.c
14
++++ b/src/r8168_n.c
15
+@@ -456,7 +456,11 @@ static void rtl8168_hw_config(struct net_device *dev);
16
+ static void rtl8168_hw_start(struct net_device *dev);
17
+ static int rtl8168_close(struct net_device *dev);
18
+ static void rtl8168_set_rx_mode(struct net_device *dev);
19
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) 
20
++static void rtl8168_tx_timeout(struct net_device *dev, unsigned int new_mtu);
21
++#else
22
+ static void rtl8168_tx_timeout(struct net_device *dev);
23
++#endif
24
+ static struct net_device_stats *rtl8168_get_stats(struct net_device *dev);
25
+ static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, napi_budget);
26
+ static int rtl8168_change_mtu(struct net_device *dev, int new_mtu);
27
+@@ -1615,7 +1619,14 @@ static int rtl8168_proc_open(struct inode *inode, struct file *file)
28
+ 
29
+         return single_open(file, show, dev);
30
+ }
31
+-
32
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
33
++static const struct proc_ops rtl8168_proc_ops = {
34
++        .proc_open           = rtl8168_proc_open,
35
++        .proc_read           = seq_read,
36
++        .proc_lseek          = seq_lseek,
37
++        .proc_release        = single_release,
38
++};
39
++#else
40
+ static const struct file_operations rtl8168_proc_fops = {
41
+         .open           = rtl8168_proc_open,
42
+         .read           = seq_read,
43
+@@ -1623,6 +1634,7 @@ static const struct file_operations rtl8168_proc_fops = {
44
+         .release        = single_release,
45
+ };
46
+ #endif
47
++#endif
48
+ 
49
+ /*
50
+  * Table of proc files we need to create.
51
+@@ -1665,9 +1677,15 @@ static void rtl8168_proc_init(struct net_device *dev)
52
+                 tp->proc_dir = dir;
53
+                 proc_init_num++;
54
+ 
55
+-                for (f = rtl8168_proc_files; f->name[0]; f++) {
56
+-                        if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
57
+-                                              &rtl8168_proc_fops, f->show)) {
58
++     for (f = rtl8168_proc_files; f->name[0]; f++) {
59
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
60
++         if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
61
++                                              &rtl8168_proc_ops, f->show)) 
62
++#else        
63
++         if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
64
++                                              &rtl8168_proc_fops, f->show))
65
++#endif
66
++         {
67
+                                 printk("Unable to initialize "
68
+                                        "/proc/net/%s/%s/%s\n",
69
+                                        MODULENAME, dev->name, f->name);
70
+@@ -25881,7 +25899,6 @@ rtl8168_init_one(struct pci_dev *pdev,
71
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,22)
72
+         SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops);
73
+ #endif
74
+-
75
+         dev->watchdog_timeo = RTL8168_TX_TIMEOUT;
76
+         dev->irq = pdev->irq;
77
+         dev->base_addr = (unsigned long) ioaddr;
78
+@@ -27817,7 +27834,7 @@ static void rtl8168_reset_task(struct work_struct *work)
79
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
80
+         rtl8168_rx_interrupt(dev, tp, &budget);
81
+ #else
82
+-        rtl8168_rx_interrupt(dev, tp, budget);
83
++        rtl8168_rx_interrupt(dev, tp, budget);      
84
+ #endif  //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
85
+ 
86
+         spin_lock_irqsave(&tp->lock, flags);
87
+@@ -27844,7 +27861,11 @@ static void rtl8168_reset_task(struct work_struct *work)
88
+ }
89
+ 
90
+ static void
91
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
92
++rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue)
93
++#else
94
+ rtl8168_tx_timeout(struct net_device *dev)
95
++#endif
96
+ {
97
+         struct rtl8168_private *tp = netdev_priv(dev);
98
+         unsigned long flags;
99
Refresh


Request History
bitstreamout's avatar

bitstreamout created request almost 5 years ago

- Add patch 83b957b4.patch to get it build for kernel 5.6


Olaf Hering's avatar

olh accepted request almost 5 years ago