Overview

Request 5765 (accepted)

- For Leap 15.5 the kernel 5.14.0 behaves like a 5.17.0 at ethtool.h

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

r8168.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Wed May 10 10:55:42 UTC 2023 - https://www.suse.com/
4
+
5
+- For Leap 15.5 the kernel 5.14.0 behaves like a 5.17.0 at ethtool.h 
6
+
7
+-------------------------------------------------------------------
8
 Wed Dec 14 13:42:47 UTC 2022 - Dr. Werner Fink <werner@suse.de>
9
 
10
 - Update to new version r8168-8.051.02
11
r8168.spec Changed
24
 
1
@@ -32,6 +32,7 @@
2
 Patch2:         r8168-support-linux-5.19.patch
3
 Patch3:         r8168-support-linux-6.1.0.patch
4
 Patch4:         r8168-support-dev0x8136.patch
5
+Patch5:         r8168-support-linux-L15.5.patch
6
 BuildRequires:  kernel-source
7
 BuildRequires:  kernel-syms
8
 BuildRequires:  libelf-devel
9
@@ -64,6 +65,14 @@
10
 %patch2 -p1 -b .p2
11
 %patch3 -p1 -b .p3
12
 %patch4 -p1 -b .p4
13
+if test -e /usr/src/linux/include/linux/ethtool.h
14
+then
15
+    argc=$(sed -rn '/\*get_ringparam/,/;$/p' /usr/src/linux/include/linux/ethtool.h | wc -l)
16
+    if test -n "$argc" -a "$argc" -eq 4
17
+    then
18
+%patch5 -b .p5
19
+    fi
20
+fi
21
 cp %{S:1} .
22
 cp %{S:2} .
23
 
24
r8168-support-linux-L15.5.patch Added
58
 
1
@@ -0,0 +1,56 @@
2
+---
3
+ src/r8168_n.c |   12 ++++++------
4
+ 1 file changed, 6 insertions(+), 6 deletions(-)
5
+
6
+--- src/r8168_n.c
7
++++ src/r8168_n.c  2023-05-10 10:40:25.454736974 +0000
8
+@@ -5964,7 +5964,7 @@ rtl8168_wait_for_quiescence(struct net_d
9
+ }
10
+ 
11
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
12
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
13
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
14
+ static void rtl8168_get_ringparam(struct net_device *dev,
15
+                                   struct ethtool_ringparam *ring,
16
+                                   struct kernel_ethtool_ringparam *kernel_ring,
17
+@@ -5972,7 +5972,7 @@ static void rtl8168_get_ringparam(struct
18
+ #else
19
+ static void rtl8168_get_ringparam(struct net_device *dev,
20
+                                   struct ethtool_ringparam *ring)
21
+-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
22
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
23
+ {
24
+         struct rtl8168_private *tp = netdev_priv(dev);
25
+ 
26
+@@ -5982,7 +5982,7 @@ static void rtl8168_get_ringparam(struct
27
+         ring->tx_pending = tp->num_tx_desc;
28
+ }
29
+ 
30
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
31
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
32
+ static int rtl8168_set_ringparam(struct net_device *dev,
33
+                                  struct ethtool_ringparam *ring,
34
+                                  struct kernel_ethtool_ringparam *kernel_ring,
35
+@@ -5990,7 +5990,7 @@ static int rtl8168_set_ringparam(struct
36
+ #else
37
+ static int rtl8168_set_ringparam(struct net_device *dev,
38
+                                  struct ethtool_ringparam *ring)
39
+-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
40
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
41
+ {
42
+         struct rtl8168_private *tp = netdev_priv(dev);
43
+         u32 new_rx_count, new_tx_count;
44
+@@ -25420,11 +25420,11 @@ rtl8168_release_board(struct pci_dev *pd
45
+ static void
46
+ rtl8168_hw_address_set(struct net_device *dev, u8 mac_addrMAC_ADDR_LEN)
47
+ {
48
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
49
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
50
+         eth_hw_addr_set(dev, mac_addr);
51
+ #else
52
+         memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN);
53
+-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
54
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
55
+ }
56
+ 
57
+ static int
58
Refresh


Request History
bitstreamout's avatar

bitstreamout created request almost 2 years ago

- For Leap 15.5 the kernel 5.14.0 behaves like a 5.17.0 at ethtool.h


bitstreamout's avatar

bitstreamout accepted request almost 2 years ago

Thanks