summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k (Evgeny Grin) <k2k@narod.ru>2023-04-03 18:52:22 +0300
committerJoonas Niilola <juippis@gentoo.org>2023-04-15 15:41:16 +0300
commit8212d430a2de8bbe74e842ad54ec744b81463384 (patch)
tree42805ac9d094a223f2cf68cf57bddd6b01d09536 /net-misc/r8125
parentnet-misc/r8125: New upstream version 9.011.00 (diff)
downloadgentoo-8212d430a2de8bbe74e842ad54ec744b81463384.tar.gz
gentoo-8212d430a2de8bbe74e842ad54ec744b81463384.tar.bz2
gentoo-8212d430a2de8bbe74e842ad54ec744b81463384.zip
net-misc/r8125: Fixes for kernels 5.19 and 6.1
Closes: https://bugs.gentoo.org/890714 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/gentoo/pull/30461 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-misc/r8125')
-rw-r--r--net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch35
-rw-r--r--net-misc/r8125/r8125-9.008.00.ebuild2
-rw-r--r--net-misc/r8125/r8125-9.009.01.ebuild2
-rw-r--r--net-misc/r8125/r8125-9.009.02.ebuild4
4 files changed, 43 insertions, 0 deletions
diff --git a/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch
new file mode 100644
index 000000000000..8dc3f8749a11
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch
@@ -0,0 +1,35 @@
+From c96e5ffc40585d463bea056f2fe02c29d43dcba7 Mon Sep 17 00:00:00 2001
+From: Evgeny Grin <k2k@narod.ru>
+Date: Mon, 3 Apr 2023 18:17:24 +0300
+Subject: [PATCH] Backport kernel 5.19 compatibility
+
+---
+ src/r8125_n.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/r8125_n.c b/src/r8125_n.c
+index 0bc5eec..e35e557 100644
+--- a/src/r8125_n.c
++++ b/src/r8125_n.c
+@@ -12715,6 +12715,10 @@ rtl8125_init_one(struct pci_dev *pdev,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ dev->hw_features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
+ dev->features |= NETIF_F_IPV6_CSUM;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
++ netif_set_tso_max_size(dev, LSO_64K);
++ netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO2);
++#else //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+ netif_set_gso_max_size(dev, LSO_64K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
+@@ -12722,6 +12726,7 @@ rtl8125_init_one(struct pci_dev *pdev,
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
+--
+2.40.0
+
diff --git a/net-misc/r8125/r8125-9.008.00.ebuild b/net-misc/r8125/r8125-9.008.00.ebuild
index b848421ede7e..d3d593df5844 100644
--- a/net-misc/r8125/r8125-9.008.00.ebuild
+++ b/net-misc/r8125/r8125-9.008.00.ebuild
@@ -23,6 +23,8 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.17.patch" # bug 839282
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
+ "${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
+ "${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
)
CONFIG_CHECK="~!R8169"
diff --git a/net-misc/r8125/r8125-9.009.01.ebuild b/net-misc/r8125/r8125-9.009.01.ebuild
index 2a1b7c235358..6c64d2ff981b 100644
--- a/net-misc/r8125/r8125-9.009.01.ebuild
+++ b/net-misc/r8125/r8125-9.009.01.ebuild
@@ -20,6 +20,8 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
+ "${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
+ "${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
)
CONFIG_CHECK="~!R8169"
diff --git a/net-misc/r8125/r8125-9.009.02.ebuild b/net-misc/r8125/r8125-9.009.02.ebuild
index 9178eeaa64df..60221798a097 100644
--- a/net-misc/r8125/r8125-9.009.02.ebuild
+++ b/net-misc/r8125/r8125-9.009.02.ebuild
@@ -18,6 +18,10 @@ MODULE_NAMES="r8125(net:${S}/src)"
BUILD_TARGETS="modules"
IUSE="+multi-tx-q ptp +rss use-firmware"
+PATCHES=(
+ "${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
+)
+
CONFIG_CHECK="~!R8169"
WARNING_R8169="CONFIG_R8169 is enabled. ${PN} will not be loaded unless kernel driver Realtek 8169 PCI Gigabit Ethernet (CONFIG_R8169) is DISABLED."