summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2022-08-02 19:35:52 +0200
committerPacho Ramos <pacho@gentoo.org>2022-08-02 19:35:52 +0200
commitb74666ef91c8b5a079782b77e86e3fb01ffb5807 (patch)
tree4d9e8a76edf656e0662287d147cdf6d097df75cc
parentdev-python/mako: Stabilize 1.2.1 ALLARCHES, #863161 (diff)
downloadgentoo-b74666ef91c8b5a079782b77e86e3fb01ffb5807.tar.gz
gentoo-b74666ef91c8b5a079782b77e86e3fb01ffb5807.tar.bz2
gentoo-b74666ef91c8b5a079782b77e86e3fb01ffb5807.zip
net-misc/r8168: Fix kernel 5.19 support
Thanks-to: Peter Levine Closes: https://bugs.gentoo.org/862609 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
-rw-r--r--net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch23
-rw-r--r--net-misc/r8168/r8168-8.050.03.ebuild1
2 files changed, 24 insertions, 0 deletions
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
new file mode 100644
index 000000000000..d0f5d30ada06
--- /dev/null
+++ b/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch
@@ -0,0 +1,23 @@
+From: Andrea Righi <andrea.righi@canonical.com>
+Subject: support linux 5.19
+
+Index: r8168-8.050.03/src/r8168_n.c
+===================================================================
+--- r8168-8.050.03.orig/src/r8168_n.c
++++ r8168-8.050.03/src/r8168_n.c
+@@ -116,6 +116,15 @@
+ #define FIRMWARE_8168FP_3 "rtl_nic/rtl8168fp-3.fw"
+ #define FIRMWARE_8168FP_4 "rtl_nic/rtl8168fp-4.fw"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++static inline void netif_set_gso_max_size(struct net_device *dev,
++ unsigned int size)
++{
++ /* dev->gso_max_size is read locklessly from sk_setup_caps() */
++ WRITE_ONCE(dev->gso_max_size, size);
++}
++#endif
++
+ /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
+ The RTL chips use a 64 element hash table based on the Ethernet CRC. */
+ static const int multicast_filter_limit = 32;
diff --git a/net-misc/r8168/r8168-8.050.03.ebuild b/net-misc/r8168/r8168-8.050.03.ebuild
index 33393afdbf6a..b2ff7ea4f8a6 100644
--- a/net-misc/r8168/r8168-8.050.03.ebuild
+++ b/net-misc/r8168/r8168-8.050.03.ebuild
@@ -26,6 +26,7 @@ WARNING_R8169="CONFIG_R8169 is enabled. ${P} will not be loaded unless kernel dr
PATCHES=(
"${FILESDIR}/r8168-8.050.02-5.18-fix.patch"
+ "${FILESDIR}/r8168-8.050.03-5.19-fix.patch"
)
pkg_setup() {