summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/r8168')
-rw-r--r--net-misc/r8168/Manifest4
-rw-r--r--net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch25
-rw-r--r--net-misc/r8168/files/r8168-8.051.02-6.4.10-fix.patch17
-rw-r--r--net-misc/r8168/r8168-8.048.03-r1.ebuild34
-rw-r--r--net-misc/r8168/r8168-8.049.02.ebuild34
-rw-r--r--net-misc/r8168/r8168-8.051.02-r1.ebuild37
-rw-r--r--net-misc/r8168/r8168-8.051.02.ebuild (renamed from net-misc/r8168/r8168-8.049.02-r1.ebuild)13
-rw-r--r--net-misc/r8168/r8168-8.052.01.ebuild32
8 files changed, 122 insertions, 74 deletions
diff --git a/net-misc/r8168/Manifest b/net-misc/r8168/Manifest
index d780aca28ae1..9ead16377f3e 100644
--- a/net-misc/r8168/Manifest
+++ b/net-misc/r8168/Manifest
@@ -1,2 +1,2 @@
-DIST r8168-8.048.03.tar.bz2 109351 BLAKE2B f31ef24d42af737a97986f0e46bc6c737c43e8ccfe9fac8386eb9957a5d81620faa62602e1bec15840792785444b1d1bf8bafa2e5878c21f1962c7141d9bb32e SHA512 8da615a96cca413ca172e260c52c9f77a782e4feb466e4a4296ae11d895e9cc56bde0ed8634cc3a7a531a292072b68d19dcbe74d20ad9549266d3ee8e082096f
-DIST r8168-8.049.02.tar.bz2 113195 BLAKE2B ee34ac7249d732a867384fdd2c87321a513e7b2770c79d0c13666edca7d4bf752d853d7f91554d7ee716b3f30ec5f3a69aed96221a79a60282f0b6d2f70f05d6 SHA512 8ccb69ab533cde6ff88f0e8af2dd66f7e6ce9467020a727d47748c5109b64d6d14eee6bc151db5ddbe70a476a2def5f2faf3871902b335074f43dd05484d39e0
+DIST r8168-8.051.02.tar.bz2 115969 BLAKE2B 28b809c0330920ee0db7a8f8d41e178882531cd0a6793efeadd9670b1a9b5cbe903061073fd1d461f4234feb41249a244f9ef35cdbb780da498e5a6d6f1a5490 SHA512 2f29a413e7db2b7295ea0a970b3385de1dfd6e41e1820097355687daa5c8d155c1cf6115c72875bff4f366365579bffc81733469a62d76f437065b7e514387ca
+DIST r8168-8.052.01.tar.bz2 126861 BLAKE2B dccee164ea1151859752d525390a3786d31d445e05188a86d2d17c9cbd4435aac788dc5ca1350fcc719bba1c42bd358f39221666f8575d52a9cbf9c78b65c70d SHA512 ae90e108ba3eaaa1c8a639392b21ff98e71abdba514a19b2f286603fbdae69c88592380d9dacda2c10d711348797006a8b518383e4a0519d1bd26dc60266b4b5
diff --git a/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch b/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
new file mode 100644
index 000000000000..9a9e3e539259
--- /dev/null
+++ b/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
@@ -0,0 +1,25 @@
+From 39dd0fd2e5dc45cd63113f33a9890e36c304916d Mon Sep 17 00:00:00 2001
+From: zu1k <i@zu1k.com>
+Date: Sat, 29 Oct 2022 21:57:39 +0800
+Subject: [PATCH] Adapted for Linux 6.1
+
+---
+ src/r8168.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8168.h b/src/r8168.h
+index 662974a..baf48c6 100755
+--- a/src/r8168.h
++++ b/src/r8168.h
+@@ -561,7 +561,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(ndev, &priv->napi, function)
++#else
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight)
++#endif
+ #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;
diff --git a/net-misc/r8168/files/r8168-8.051.02-6.4.10-fix.patch b/net-misc/r8168/files/r8168-8.051.02-6.4.10-fix.patch
new file mode 100644
index 000000000000..f10b86447971
--- /dev/null
+++ b/net-misc/r8168/files/r8168-8.051.02-6.4.10-fix.patch
@@ -0,0 +1,17 @@
+Fixed build with kernels 6.4.10+
+Gentoo Bug: https://bugs.gentoo.org/912242
+See also: https://github.com/mtorromeo/r8168/issues/54
+
+---
+--- a/src/r8168_n.c 2023-08-13 03:33:06.977422132 +0400
++++ b/src/r8168_n.c 2023-08-13 03:38:39.767005101 +0400
+@@ -81,6 +81,10 @@
+ #include <linux/mdio.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,10)
++#include <net/gso.h>
++#endif
++
+ #include <asm/io.h>
+ #include <asm/irq.h>
diff --git a/net-misc/r8168/r8168-8.048.03-r1.ebuild b/net-misc/r8168/r8168-8.048.03-r1.ebuild
deleted file mode 100644
index 49c108910168..000000000000
--- a/net-misc/r8168/r8168-8.048.03-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info linux-mod
-
-DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
-HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
-
-# "GBE Ethernet LINUX driver r8168 for kernel up to 5.6" from above link,
-# we need to mirror it to avoid users from needing to fill a captcha to
-# download
-SRC_URI="https://dev.gentoo.org/~pacho/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-MODULE_NAMES="r8168(net:${S}/src)"
-BUILD_TARGETS="modules"
-
-CONFIG_CHECK="!R8169"
-ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED"
-
-pkg_setup() {
- linux-mod_pkg_setup
- BUILD_PARAMS="KERNELDIR=${KV_DIR}"
-}
-
-src_install() {
- linux-mod_src_install
- einstalldocs
-}
diff --git a/net-misc/r8168/r8168-8.049.02.ebuild b/net-misc/r8168/r8168-8.049.02.ebuild
deleted file mode 100644
index 7a3513fe3b08..000000000000
--- a/net-misc/r8168/r8168-8.049.02.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info linux-mod
-
-DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
-HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
-
-# "GBE Ethernet LINUX driver r8168 for kernel up to 5.6" from above link,
-# we need to mirror it to avoid users from needing to fill a captcha to
-# download
-SRC_URI="https://dev.gentoo.org/~pacho/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-MODULE_NAMES="r8168(net:${S}/src)"
-BUILD_TARGETS="modules"
-
-CONFIG_CHECK="!R8169"
-ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED"
-
-pkg_setup() {
- linux-mod_pkg_setup
- BUILD_PARAMS="KERNELDIR=${KV_DIR}"
-}
-
-src_install() {
- linux-mod_src_install
- einstalldocs
-}
diff --git a/net-misc/r8168/r8168-8.051.02-r1.ebuild b/net-misc/r8168/r8168-8.051.02-r1.ebuild
new file mode 100644
index 000000000000..4a7da024fbfc
--- /dev/null
+++ b/net-misc/r8168/r8168-8.051.02-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1
+
+DESCRIPTION="r8168 driver for Realtek 8111/8168 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"
+
+IUSE="use-firmware"
+
+CONFIG_CHECK="~!R8169"
+WARNING_R8169="CONFIG_R8169 is enabled. ${P} will not be loaded unless kernel driver Realtek 8169 PCI Gigabit Ethernet (CONFIG_R8169) is DISABLED."
+
+PATCHES=(
+ "${FILESDIR}/${P}-6.1-fix.patch"
+ "${FILESDIR}/${P}-6.4.10-fix.patch" # bug 912242
+)
+
+src_compile() {
+ local modlist=( ${PN}=kernel/drivers/net/ethernet/realtek:src )
+ local modargs=(
+ # Build parameters
+ KERNELDIR="${KV_OUT_DIR}"
+ # Configuration settings
+ ENABLE_USE_FIRMWARE_FILE=$(usex use-firmware y n)
+ )
+
+ linux-mod-r1_src_compile
+}
diff --git a/net-misc/r8168/r8168-8.049.02-r1.ebuild b/net-misc/r8168/r8168-8.051.02.ebuild
index 47810f27e05d..8f0c5b529c63 100644
--- a/net-misc/r8168/r8168-8.049.02-r1.ebuild
+++ b/net-misc/r8168/r8168-8.051.02.ebuild
@@ -1,21 +1,21 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit linux-info linux-mod
DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
-# "GBE Ethernet LINUX driver r8168 for kernel up to 5.6" from above link,
+# "GBE Ethernet LINUX driver r8168 for kernel up to 5.19" from above link,
# we need to mirror it to avoid users from needing to fill a captcha to
# download
SRC_URI="https://dev.gentoo.org/~pacho/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
MODULE_NAMES="r8168(net:${S}/src)"
BUILD_TARGETS="modules"
@@ -24,6 +24,11 @@ IUSE="use-firmware"
CONFIG_CHECK="~!R8169"
WARNING_R8169="CONFIG_R8169 is enabled. ${P} will not be loaded unless kernel driver Realtek 8169 PCI Gigabit Ethernet (CONFIG_R8169) is DISABLED."
+PATCHES=(
+ "${FILESDIR}/${PN}-8.051.02-6.1-fix.patch"
+ "${FILESDIR}/${P}-6.4.10-fix.patch" # bug 912242
+)
+
pkg_setup() {
linux-mod_pkg_setup
BUILD_PARAMS="KERNELDIR=${KV_DIR}"
diff --git a/net-misc/r8168/r8168-8.052.01.ebuild b/net-misc/r8168/r8168-8.052.01.ebuild
new file mode 100644
index 000000000000..8d93a0a7f5fe
--- /dev/null
+++ b/net-misc/r8168/r8168-8.052.01.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1
+
+DESCRIPTION="r8168 driver for Realtek 8111/8168 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"
+
+IUSE="use-firmware"
+
+CONFIG_CHECK="~!R8169"
+WARNING_R8169="CONFIG_R8169 is enabled. ${P} will not be loaded unless kernel driver Realtek 8169 PCI Gigabit Ethernet (CONFIG_R8169) is DISABLED."
+
+src_compile() {
+ local modlist=( ${PN}=kernel/drivers/net/ethernet/realtek:src )
+ local modargs=(
+ # Build parameters
+ KERNELDIR="${KV_OUT_DIR}"
+ # Configuration settings
+ ENABLE_USE_FIRMWARE_FILE=$(usex use-firmware y n)
+ )
+
+ linux-mod-r1_src_compile
+}