summaryrefslogtreecommitdiff
path: root/net-misc/r8168
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/r8168')
-rw-r--r--net-misc/r8168/Manifest5
-rw-r--r--net-misc/r8168/files/r8168-8.053.00-kernel-6.9.patch119
-rw-r--r--net-misc/r8168/r8168-8.052.01.ebuild32
-rw-r--r--net-misc/r8168/r8168-8.053.00.ebuild2
4 files changed, 123 insertions, 35 deletions
diff --git a/net-misc/r8168/Manifest b/net-misc/r8168/Manifest
index 483059323e8f..fd0ec3608298 100644
--- a/net-misc/r8168/Manifest
+++ b/net-misc/r8168/Manifest
@@ -1,9 +1,8 @@
AUX r8168-8.051.02-6.1-fix.patch 983 BLAKE2B 6c3ec1726f47ab51d702481a8e6817c25917b4e3760d49df74fd888ec04a61468a55015b2444cbed114853079b7844b14370efe095e37e8572abb271bca87ee8 SHA512 b2484ac3169c27324f204d068ffa7e29497039b1e4694ff7aa5ba22ff4da939c371cc2df4ca95b5d96e591d7dc8c558c50bc4b4fe53515ef7776f1564e40dfd7
AUX r8168-8.051.02-6.4.10-fix.patch 436 BLAKE2B 840f5c356ae3e9862b0d346186ee6a6b9e03d4b7b54453f80f3131e2cb5047f9f7ea61fba4a6f99f8a4b413f6dfcf973efdaec7e706b05c08f2a129727ccaf79 SHA512 c4e9400c331b9500ff87a0f44855570d4c4b20f814fc0c82cd3e8e076833df8ff91e4c581640f1db07c9453611d515a28f5118eb1db9d4124be620c2c6149dcf
+AUX r8168-8.053.00-kernel-6.9.patch 4625 BLAKE2B 6043101e08f3068369e42d80d848239e1de5adfcc40be29d1c6d1660758a8f0dda1543f4ab8c322e99af211a0a7d6127951b157b562c98e4f1652a513d4f2650 SHA512 444dd66d28696716cae8ab5be47184033aa1c16b275b0c604e96e85d616fdeeccb10cfb5d1cd44948a3238c3787b9193d5f126190579dd1a930681e5937964eb
DIST r8168-8.051.02.tar.bz2 115969 BLAKE2B 28b809c0330920ee0db7a8f8d41e178882531cd0a6793efeadd9670b1a9b5cbe903061073fd1d461f4234feb41249a244f9ef35cdbb780da498e5a6d6f1a5490 SHA512 2f29a413e7db2b7295ea0a970b3385de1dfd6e41e1820097355687daa5c8d155c1cf6115c72875bff4f366365579bffc81733469a62d76f437065b7e514387ca
-DIST r8168-8.052.01.tar.bz2 126861 BLAKE2B dccee164ea1151859752d525390a3786d31d445e05188a86d2d17c9cbd4435aac788dc5ca1350fcc719bba1c42bd358f39221666f8575d52a9cbf9c78b65c70d SHA512 ae90e108ba3eaaa1c8a639392b21ff98e71abdba514a19b2f286603fbdae69c88592380d9dacda2c10d711348797006a8b518383e4a0519d1bd26dc60266b4b5
DIST r8168-8.053.00.tar.gz 169102 BLAKE2B 4be044fec5edb78d3050c66f92ffce56487347c171da6d0e29593584e23b173536e48a18ffaf47df4e99999867a65b658a0deace333948bb0d77cd0f5c619719 SHA512 c44a63b04eb5cfb2b8ae434b26098c96067f7a2d6193e206801236fa38832b4f20a0b1a05a374f1d7d5b7ce973d38b6f49744f8b029e22930ebbd2763fbc6440
EBUILD r8168-8.051.02-r1.ebuild 1002 BLAKE2B 5d95ea2cd2d1ced3a6a93288e5822ef282db5eb142aab6ab72094c2ecba8c9b30216503297be8d95e03a2b55d30b3ad9806f52ff08fafad459219182ef29eaac SHA512 c6d44bec0bb85eee47187467eaceb55a991e250dc3856f18a48da305e0e954e60c42c5197503100e3588bcbdb31b60a0e2f55eb641b5a808b1f6338e80f6f809
-EBUILD r8168-8.052.01.ebuild 907 BLAKE2B a2dc38d67d93608e8865b2d8d27eadb791a67f27975af14cad4062eb541c9920d32e6870955293e59536aef57d5bcd775c15fcb334a25f499b05691ea7797a19 SHA512 55b9c91f1fe199f15871ce2f7c0749bcecafd769c5e33ea47d6f357c80ea93aa94428e9c05bd0a062277c4dda95c79fe7d8fd121bc75eac24a7e7f3e696ec360
-EBUILD r8168-8.053.00.ebuild 828 BLAKE2B 9477b8a383f7c2b52860df9bf29b197db5e1333472569e370068685258de294a3863a56b6117170eb2054fe8e49a612833dd4533075666f5b37c916ad6bdc30b SHA512 fe8fe1eecd00a8d79fcd0776298a2267a82e4af27b972797f201455821f9ac34e2f7cc7c1f4d76a91fc547a05e5dc79ab05db884ff93f5f69884444bf8b07722
+EBUILD r8168-8.053.00.ebuild 887 BLAKE2B 79c3af6d30f77f5255ac0abd6fae805ab12ec8c01da20ba16c51fec93d753c3a210ebcdf9c5519b247c86066494d57e439c8eab8174a6f207ea5f7803632385d SHA512 3eae3adce3c971729b77c6688b149043593429062277554f3a6236ca23ef4c75035f786d333bb5fee83c79bba6ea0a791613639b41f6e7d0fef0b6a1f3964521
MISC metadata.xml 577 BLAKE2B 0335cbfc902163abd4ffef0ad089b15ae7eaee15e41ed7760834d0329662a8ea0c66d68366a779265205557abe31bf3055b474f6bda7469e803a6240c3e68951 SHA512 f27ae61be558fe46b14fdf43a8d975c71cc900788761e6c5044eea6e8f80ddb6528b0d9d711844b6c8b45e58401a8736d08c40827fa0ceb99be32a3a0abd7086
diff --git a/net-misc/r8168/files/r8168-8.053.00-kernel-6.9.patch b/net-misc/r8168/files/r8168-8.053.00-kernel-6.9.patch
new file mode 100644
index 000000000000..526805cd1166
--- /dev/null
+++ b/net-misc/r8168/files/r8168-8.053.00-kernel-6.9.patch
@@ -0,0 +1,119 @@
+From 94426e16197c244d03aad0434e3490acdaa830fe Mon Sep 17 00:00:00 2001
+From: Masato TOYOSHIMA <phoepsilonix@phoepsilonix.love>
+Date: Tue, 14 May 2024 14:52:58 +0900
+Subject: [PATCH] Linux 6.9 compat: change to ethtool_keee from ethtool_eee
+
+linux/include/linux/ethtool.h
+
+struct ethtool_ops
+ int (*get_eee)(struct net_device *dev, struct ethtool_keee *eee);
+ int (*set_eee)(struct net_device *dev, struct ethtool_keee *eee);
+
+change to ethtool_keee from ethtool_eee
+ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
+ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
+---
+ src/r8168_n.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+diff --git a/src/r8168_n.c b/src/r8168_n.c
+index ad63f42..3d67641 100755
+--- a/src/r8168_n.c
++++ b/src/r8168_n.c
+@@ -7941,7 +7941,11 @@ rtl8168_device_lpi_t_to_ethtool_lpi_t(struct rtl8168_private *tp , u32 lpi_timer
+ }
+
+ static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
++#else
+ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
++#endif
+ {
+ struct rtl8168_private *tp = netdev_priv(net);
+ struct ethtool_eee *eee = &tp->eee;
+@@ -7975,9 +7979,15 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
+
+ edata->eee_enabled = !!val;
+ edata->eee_active = !!(supported & adv & lp);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++ ethtool_convert_legacy_u32_to_link_mode(edata->supported, supported);
++ ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
++ ethtool_convert_legacy_u32_to_link_mode(edata->lp_advertised, lp);
++#else
+ edata->supported = supported;
+ edata->advertised = adv;
+ edata->lp_advertised = lp;
++#endif
+ edata->tx_lpi_enabled = edata->eee_enabled;
+ edata->tx_lpi_timer = tx_lpi_timer;
+
+@@ -7985,11 +7995,19 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
+ }
+
+ static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
++#else
+ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
++#endif
+ {
+ struct rtl8168_private *tp = netdev_priv(net);
+ struct ethtool_eee *eee = &tp->eee;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++ u32 advertising, adv;
++#else
+ u32 advertising;
++#endif
+ int rc = 0;
+
+ if (!rtl8168_support_eee(tp))
+@@ -8013,6 +8031,18 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
+ }
+
+ advertising = tp->advertising;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++ ethtool_convert_link_mode_to_legacy_u32(&adv, edata->advertised);
++ if (linkmode_empty(edata->advertised)) {
++ adv = advertising & eee->supported;
++ ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
++ } else if (!linkmode_empty(edata->advertised) & ~advertising) {
++ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of autoneg advertised speeds %x\n",
++ adv, advertising);
++ rc = -EINVAL;
++ goto out;
++ }
++#else
+ if (!edata->advertised) {
+ edata->advertised = advertising & eee->supported;
+ } else if (edata->advertised & ~advertising) {
+@@ -8021,15 +8051,29 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
+ rc = -EINVAL;
+ goto out;
+ }
++#endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++ if (!linkmode_empty(edata->advertised) & ~eee->supported) {
++ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
++ adv, eee->supported);
++ rc = -EINVAL;
++ goto out;
++ }
++#else
+ if (edata->advertised & ~eee->supported) {
+ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
+ edata->advertised, eee->supported);
+ rc = -EINVAL;
+ goto out;
+ }
++#endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
++ ethtool_convert_link_mode_to_legacy_u32(&eee->advertised, edata->advertised);
++#else
+ eee->advertised = edata->advertised;
++#endif
+ eee->eee_enabled = edata->eee_enabled;
+
+ if (eee->eee_enabled)
diff --git a/net-misc/r8168/r8168-8.052.01.ebuild b/net-misc/r8168/r8168-8.052.01.ebuild
deleted file mode 100644
index 8d93a0a7f5fe..000000000000
--- a/net-misc/r8168/r8168-8.052.01.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
-}
diff --git a/net-misc/r8168/r8168-8.053.00.ebuild b/net-misc/r8168/r8168-8.053.00.ebuild
index c413c7299d97..5cb149094196 100644
--- a/net-misc/r8168/r8168-8.053.00.ebuild
+++ b/net-misc/r8168/r8168-8.053.00.ebuild
@@ -18,6 +18,8 @@ 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.053.00-kernel-6.9.patch )
+
src_compile() {
local modlist=( ${PN}=kernel/drivers/net/ethernet/realtek:src )
local modargs=(