summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k (Evgeny Grin) <k2k@narod.ru>2023-04-03 18:31:54 +0300
committerJoonas Niilola <juippis@gentoo.org>2023-04-15 15:41:15 +0300
commitb82711c3408a300773ef144af00193128b64d836 (patch)
tree533e3eae3fbb249df205aad17f92c7d09338cbb5 /net-misc/r8125
parentdev-qt/qtwebengine: fix GCC 13 patch (diff)
downloadgentoo-b82711c3408a300773ef144af00193128b64d836.tar.gz
gentoo-b82711c3408a300773ef144af00193128b64d836.tar.bz2
gentoo-b82711c3408a300773ef144af00193128b64d836.zip
net-misc/r8125: New upstream version 9.011.00
Closes: https://bugs.gentoo.org/890716 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-misc/r8125')
-rw-r--r--net-misc/r8125/Manifest1
-rw-r--r--net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch28
-rw-r--r--net-misc/r8125/r8125-9.011.00.ebuild41
3 files changed, 70 insertions, 0 deletions
diff --git a/net-misc/r8125/Manifest b/net-misc/r8125/Manifest
index 4d4d53475a11..56ef9e521565 100644
--- a/net-misc/r8125/Manifest
+++ b/net-misc/r8125/Manifest
@@ -1,3 +1,4 @@
DIST r8125-9.008.00.tar.bz2 89622 BLAKE2B d1106086d1bca53484f8536072cddd506087b5d49983cbb91e921e86674c074b38c8a01cb51d2ea5793d8ffbff6e97ab05e48720ff00a805c4096a1d62a0cc30 SHA512 ff740a49fcc94b3de826f6299c489ed3f92ba9123ca2b2fe3c9035eecd16d518b6a4e6c2fa2531bb670c52097a52a0fb2fdf71b721efb20c83bb59d94d99c6c6
DIST r8125-9.009.01.tar.bz2 89897 BLAKE2B 65f64f504cedc7244bdae10fd1638e031eb103f562cd71d32b5f36b15541704086df8cea16829b289e8be61bacf3de559616884d1672a4d6b8e47211816de8d3 SHA512 8b717447e2048df0d88d8350da2edb58f704e893498fbebea4aa2a3ac45ea050d70e73e78d41ab94562228b9c01e6fe59810c501c5bb880db446c05b9b6aee0d
DIST r8125-9.009.02.tar.bz2 89916 BLAKE2B 2dd8ad226f8ad9dd4e6646cdce66f0c12a6a657aa39c6e91892f410780ed245046fc94f247939958db7b950aa045e011716ecd7f6ebb6099ca3d9ffc54cfd0de SHA512 29bfe60410727f09b004f172e5046292eff511dfca5af8a21c24719e4068925103ba12af0ce808316ef206b329ce886693e7330c1c68d8e77fc50ab40bd7dcfe
+DIST r8125-9.011.00.tar.bz2 98082 BLAKE2B 306a4fc36149986a24d73cfc3f78e2494a71977640cf7676ae17c2d4f5cff1bf3f5a7ca209fa83bb43a8770acbdc45290b29bbbacc418518271ac316bef9cdd1 SHA512 c2efce2d01025d5dbbd3552390e157b0859ee7ea4e9200d44af61efd7531362bd9f754b5728c89aa2c287915f99492c84c52ee11eec1a4d759bf4228ca75a6c4
diff --git a/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch b/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch
new file mode 100644
index 000000000000..343ab8ccf125
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch
@@ -0,0 +1,28 @@
+From cc2a99963b0039573464816f0cf86803381d5f11 Mon Sep 17 00:00:00 2001
+From: Evgeny Grin <k2k@narod.ru>
+Date: Mon, 3 Apr 2023 16:46:39 +0300
+Subject: [PATCH] Fixed compatibility with Linux kernel versions >= 6.1
+
+---
+ src/r8125.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8125.h b/src/r8125.h
+index 9eac0eb..4a29116 100644
+--- a/src/r8125.h
++++ b/src/r8125.h
+@@ -676,7 +676,11 @@ typedef int *napi_budget;
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(ndev, &priv->napi, function, weight)
++#else // LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight)
++#endif // LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr, priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr) struct net_device *dev = priv_ptr->dev;
+--
+2.40.0
+
diff --git a/net-misc/r8125/r8125-9.011.00.ebuild b/net-misc/r8125/r8125-9.011.00.ebuild
new file mode 100644
index 000000000000..0714e4b6d50a
--- /dev/null
+++ b/net-misc/r8125/r8125-9.011.00.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info linux-mod
+
+DESCRIPTION="r8125 vendor driver for Realtek RTL8125 PCI-E NICs"
+HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
+
+SRC_URI="http://rtitwww.realtek.com/rtdrivers/cn/nic1/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+MODULE_NAMES="r8125(net:${S}/src)"
+BUILD_TARGETS="modules"
+IUSE="+multi-tx-q ptp +rss use-firmware"
+
+PATCHES=(
+ "${FILESDIR}/${P}-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."
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERNELDIR=${KV_DIR}"
+ BUILD_PARAMS+=" ENABLE_PTP_SUPPORT=$(usex ptp y n)"
+ BUILD_PARAMS+=" ENABLE_RSS_SUPPORT=$(usex rss y n)"
+ BUILD_PARAMS+=" ENABLE_MULTIPLE_TX_QUEUE=$(usex multi-tx-q y n)"
+ BUILD_PARAMS+=" ENABLE_USE_FIRMWARE_FILE=$(usex use-firmware y n)"
+ BUILD_PARAMS+=" ENABLE_PAGE_REUSE=y ENABLE_RX_PACKET_FRAGMENT=y"
+}
+
+src_install() {
+ linux-mod_src_install
+ einstalldocs
+}