1 |
commit: b74666ef91c8b5a079782b77e86e3fb01ffb5807 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 2 17:35:52 2022 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 17:35:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b74666ef |
7 |
|
8 |
net-misc/r8168: Fix kernel 5.19 support |
9 |
|
10 |
Thanks-to: Peter Levine |
11 |
Closes: https://bugs.gentoo.org/862609 |
12 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
13 |
|
14 |
net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch | 23 ++++++++++++++++++++++ |
15 |
net-misc/r8168/r8168-8.050.03.ebuild | 1 + |
16 |
2 files changed, 24 insertions(+) |
17 |
|
18 |
diff --git a/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch b/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch |
19 |
new file mode 100644 |
20 |
index 000000000000..d0f5d30ada06 |
21 |
--- /dev/null |
22 |
+++ b/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch |
23 |
@@ -0,0 +1,23 @@ |
24 |
+From: Andrea Righi <andrea.righi@×××××××××.com> |
25 |
+Subject: support linux 5.19 |
26 |
+ |
27 |
+Index: r8168-8.050.03/src/r8168_n.c |
28 |
+=================================================================== |
29 |
+--- r8168-8.050.03.orig/src/r8168_n.c |
30 |
++++ r8168-8.050.03/src/r8168_n.c |
31 |
+@@ -116,6 +116,15 @@ |
32 |
+ #define FIRMWARE_8168FP_3 "rtl_nic/rtl8168fp-3.fw" |
33 |
+ #define FIRMWARE_8168FP_4 "rtl_nic/rtl8168fp-4.fw" |
34 |
+ |
35 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) |
36 |
++static inline void netif_set_gso_max_size(struct net_device *dev, |
37 |
++ unsigned int size) |
38 |
++{ |
39 |
++ /* dev->gso_max_size is read locklessly from sk_setup_caps() */ |
40 |
++ WRITE_ONCE(dev->gso_max_size, size); |
41 |
++} |
42 |
++#endif |
43 |
++ |
44 |
+ /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). |
45 |
+ The RTL chips use a 64 element hash table based on the Ethernet CRC. */ |
46 |
+ static const int multicast_filter_limit = 32; |
47 |
|
48 |
diff --git a/net-misc/r8168/r8168-8.050.03.ebuild b/net-misc/r8168/r8168-8.050.03.ebuild |
49 |
index 33393afdbf6a..b2ff7ea4f8a6 100644 |
50 |
--- a/net-misc/r8168/r8168-8.050.03.ebuild |
51 |
+++ b/net-misc/r8168/r8168-8.050.03.ebuild |
52 |
@@ -26,6 +26,7 @@ WARNING_R8169="CONFIG_R8169 is enabled. ${P} will not be loaded unless kernel dr |
53 |
|
54 |
PATCHES=( |
55 |
"${FILESDIR}/r8168-8.050.02-5.18-fix.patch" |
56 |
+ "${FILESDIR}/r8168-8.050.03-5.19-fix.patch" |
57 |
) |
58 |
|
59 |
pkg_setup() { |