commit:     b84d9a2da4c6947705030dbc70c847a6d599cc3b
Author:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 23 03:16:21 2025 +0000
Commit:     Jay Faulkner <jayf <AT> gentoo <DOT> org>
CommitDate: Sat Aug 23 03:21:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b84d9a2d

net-misc/r8152: drop 2.19.2

Signed-off-by: Jay Faulkner <jayf <AT> gentoo.org>

 net-misc/r8152/Manifest                            |   1 -
 .../files/r8152-2.17.1-kernel-6.8-strscpy.patch    |  32 -----
 .../r8152/files/r8152-2.17.1-kernel-6.9-fix.patch  | 117 ------------------
 .../r8152/files/r8152-2.18.1-kernel-6.9-fix.patch  | 134 ---------------------
 net-misc/r8152/r8152-2.19.2.ebuild                 |  54 ---------
 5 files changed, 338 deletions(-)

diff --git a/net-misc/r8152/Manifest b/net-misc/r8152/Manifest
index 438afb4a8cbc..4aa7c56d9f64 100644
--- a/net-misc/r8152/Manifest
+++ b/net-misc/r8152/Manifest
@@ -1,2 +1 @@
-DIST r8152-2.19.2.tar.gz 114855 BLAKE2B 
dfff65c8cf26d31be86d3a3a1cd761f248d40e67a64d42f355e0daf38f21213e0fdac8bb426ff86d761e3f47771662307426dcadee5b13863cac8ee082ba36a1
 SHA512 
d17ea523ad2cc8ad2dafd2b012cc134c492d79d878553681cf34c479ef063f6ff3a87ebeb02f29693f0a19e980b5bdb764d3bb79e8040bef6c18ae52ec9f15e7
 DIST r8152-2.20.1.tar.gz 122073 BLAKE2B 
81869bf543df2c12e24b78baffa38ba7a514807e108fef415f834b10670766bb05fc6e15fa0f0360958292ae6c832dd6d9ce430de7ef37a342aa95452d10f508
 SHA512 
dc22813e71414e74506dbc543b277f88bac3e983cf3dc7bb9b491a3150fc1ae47cb9ce8a0b544267d6e6059941330f19a8b08f09826411769909b08a75779275

diff --git a/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch 
b/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch
deleted file mode 100644
index 2449d2883346..000000000000
--- a/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Bug: https://bugs.gentoo.org/926829
-Patch from Christian Bricart to remove strlcpy and replace with strscpy
-so this builds with linux kernels =>6.8.
-
-Signed-Off-By: Jay Faulkner <[email protected]>
-
-diff -Naur r8152-2.17.1/compatibility.h r8152-2.17.1.patched/compatibility.h
---- r8152-2.17.1/compatibility.h       2024-03-12 09:43:05.150688533 +0100
-+++ r8152-2.17.1.patched/compatibility.h       2024-03-12 09:46:20.913759268 
+0100
-@@ -18,6 +18,10 @@
- #include <net/gso.h>
- #endif
- 
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
-+#define strscpy strlcpy
-+#endif
-+
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
-       #include <linux/mdio.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
-diff -Naur r8152-2.17.1/r8152.c r8152-2.17.1.patched/r8152.c
---- r8152-2.17.1/r8152.c       2024-03-12 09:43:05.130688336 +0100
-+++ r8152-2.17.1.patched/r8152.c       2024-03-12 09:45:13.264694513 +0100
-@@ -19691,7 +19691,7 @@
-               uinfo->idVendor = __le16_to_cpu(udev->descriptor.idVendor);
-               uinfo->idProduct = __le16_to_cpu(udev->descriptor.idProduct);
-               uinfo->bcdDevice = __le16_to_cpu(udev->descriptor.bcdDevice);
--              strlcpy(uinfo->devpath, udev->devpath, sizeof(udev->devpath));
-+              strscpy(uinfo->devpath, udev->devpath, sizeof(udev->devpath));
-               pla_ocp_read(tp, PLA_IDR, sizeof(uinfo->dev_addr),
-                            uinfo->dev_addr);
-

diff --git a/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch 
b/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch
deleted file mode 100644
index 433d3deab34e..000000000000
--- a/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From: https://github.com/wget/realtek-r8152-linux/pull/41
-From a5b3b4a882a3a637ccfa447dc7d2e84eac9ef0fc Mon Sep 17 00:00:00 2001
-From: "oleg.hoefling" <[email protected]>
-Date: Wed, 22 May 2024 00:44:37 +0200
-Subject: [PATCH] add compat for 6.9.X kernels
-
-Signed-off-by: oleg.hoefling <[email protected]>
---- a/r8152.c
-+++ b/r8152.c
-@@ -950,7 +950,10 @@ struct r8152 {
-               void (*up)(struct r8152 *tp);
-               void (*down)(struct r8152 *tp);
-               void (*unload)(struct r8152 *tp);
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+              int (*eee_get)(struct r8152 *tp, struct ethtool_keee *eee);
-+              int (*eee_set)(struct r8152 *tp, struct ethtool_keee *eee);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-               int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee);
-               int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee);
- #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
-@@ -19099,7 +19102,11 @@ static void rtl8152_get_strings(struct net_device 
*dev, u32 stringset, u8 *data)
- }
- 
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8152_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
-       u32 lp, adv, supported = 0;
-       u16 val;
-@@ -19115,17 +19122,32 @@ static int r8152_get_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
- 
-       eee->eee_enabled = tp->eee_en;
-       eee->eee_active = !!(supported & adv & lp);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+      ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
-+#else
-       eee->supported = supported;
-       eee->advertised = tp->eee_adv;
-       eee->lp_advertised = lp;
-+#endif
- 
-       return 0;
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8152_set_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+      u32 advertised = 0;
-+      ethtool_convert_link_mode_to_legacy_u32(&advertised, eee->advertised);
-+      u16 val = ethtool_adv_to_mmd_eee_adv_t(advertised);
-+#else
-       u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised);
--
-+#endif
-       tp->eee_en = eee->eee_enabled;
-       tp->eee_adv = val;
- 
-@@ -19134,7 +19156,11 @@ static int r8152_set_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
-       return 0;
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8153_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
-       u32 lp, adv, supported = 0;
-       u16 val;
-@@ -19150,15 +19176,25 @@ static int r8153_get_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
- 
-       eee->eee_enabled = tp->eee_en;
-       eee->eee_active = !!(supported & adv & lp);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+      ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
-+#else
-       eee->supported = supported;
-       eee->advertised = tp->eee_adv;
-       eee->lp_advertised = lp;
-+#endif
- 
-       return 0;
- }
- 
- 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 r8152 *tp = netdev_priv(net);
-       int ret;
-@@ -19185,7 +19221,11 @@ 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 r8152 *tp = netdev_priv(net);
-       int ret;

diff --git a/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch 
b/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch
deleted file mode 100644
index 155a5aa1100b..000000000000
--- a/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From 32d026ab6b601cfe2882818921ba379cfbc3031e Mon Sep 17 00:00:00 2001
-From: Jay Faulkner <[email protected]>
-Date: Wed, 11 Sep 2024 20:30:33 -0700
-Subject: [PATCH] Forward ported version of kernel 6.9.x fix patch
-
-Original version sourced from below; has been forward-ported from
-From: https://github.com/wget/realtek-r8152-linux/pull/41
-From a5b3b4a882a3a637ccfa447dc7d2e84eac9ef0fc Mon Sep 17 00:00:00 2001
-From: "oleg.hoefling" <[email protected]>
----
- r8152.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
- 1 file changed, 46 insertions(+), 4 deletions(-)
-
-diff --git a/r8152.c b/r8152.c
-index cee3b23..4063525 100644
---- a/r8152.c
-+++ b/r8152.c
-@@ -1006,7 +1006,10 @@ struct r8152 {
-               int (*up)(struct r8152 *tp);
-               int (*down)(struct r8152 *tp);
-               void (*unload)(struct r8152 *tp);
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+        int (*eee_get)(struct r8152 *tp, struct ethtool_keee *eee);
-+        int (*eee_set)(struct r8152 *tp, struct ethtool_keee *eee);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-               int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee);
-               int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee);
- #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
-@@ -23342,8 +23345,13 @@ static void rtl8152_get_strings(struct net_device 
*dev, u32 stringset, u8 *data)
-       }
- }
- 
-+
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8152_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
-       u32 lp, adv, supported = 0;
-       int ret;
-@@ -23369,17 +23377,33 @@ static int r8152_get_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
- 
-       eee->eee_enabled = tp->eee_en;
-       eee->eee_active = !!(supported & adv & lp);
--      eee->supported = supported;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+      ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
-+#else
-+    eee->supported = supported;
-       eee->advertised = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv);
-       eee->lp_advertised = lp;
-+#endif
- 
- out:
-       return (ret < 0) ? ret : 0;
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8152_set_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
--      u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+    u32 advertised = 0;
-+    ethtool_convert_link_mode_to_legacy_u32(&advertised, eee->advertised);
-+    u16 val = ethtool_adv_to_mmd_eee_adv_t(advertised);
-+#else
-+    u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised);
-+#endif
- 
-       tp->eee_en = eee->eee_enabled;
-       tp->eee_adv = val;
-@@ -23387,7 +23411,11 @@ static int r8152_set_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
-       return rtl_eee_enable(tp, tp->eee_en);
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+static int r8153_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
-+#else
- static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
-+#endif
- {
-       u32 lp, adv, supported = 0;
-       u16 val;
-@@ -23410,16 +23438,26 @@ static int r8153_get_eee(struct r8152 *tp, struct 
ethtool_eee *eee)
- 
-       eee->eee_enabled = tp->eee_en;
-       eee->eee_active = !!(supported & adv & lp);
--      eee->supported = supported;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
-+      ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
-+      ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
-+#else
-+    eee->supported = supported;
-       eee->advertised = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv);
-       eee->lp_advertised = lp;
-+#endif
- 
- out:
-       return (ret < 0) ? ret : 0;
- }
- 
- 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 r8152 *tp = netdev_priv(net);
-       int ret;
-@@ -23446,7 +23484,11 @@ out:
- }
- 
- 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 r8152 *tp = netdev_priv(net);
-       int ret;
--- 
-2.46.0
-

diff --git a/net-misc/r8152/r8152-2.19.2.ebuild 
b/net-misc/r8152/r8152-2.19.2.ebuild
deleted file mode 100644
index f830436318e9..000000000000
--- a/net-misc/r8152/r8152-2.19.2.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit linux-mod-r1 udev
-
-DESCRIPTION="r8152 driver for Realtek USB FE / GBE / 2.5G Gaming Ethernet 
Family Controller"
-# Using github readme as homepage as the realtek page has changed location 
twice in six months.
-HOMEPAGE="https://github.com/jayofdoom/realtek-r8152-unchanged";
-SRC_URI="https://github.com/jayofdoom/realtek-r8152-unchanged/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
-S="${WORKDIR}/realtek-r8152-unchanged-${PV}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~x86"
-
-RDEPEND="virtual/udev"
-DEPEND="${RDEPEND}"
-
-IUSE="+center-tap-short"
-
-# Many of the patches are sourced from pull requests to
-# https://github.com/wget/realtek-r8152-linux/ -- we do not use this repo
-# as the official upstream as it does not keep a clear deliniation between
-# shipped realtek code and patches. It is the source used by the AUR package.
-PATCHES=(
-       "${FILESDIR}"/${PN}-2.16.3-kernel-6.4.10-fix.patch
-       "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch
-)
-
-src_compile() {
-       local modlist=( ${PN}=kernel/net/usb:. )
-       local modargs=(
-               KERNELDIR="${KV_OUT_DIR}"
-               CONFIG_CTAP_SHORT="$(usex center-tap-short on off)"
-       )
-
-       linux-mod-r1_src_compile
-}
-
-src_install() {
-       linux-mod-r1_src_install
-       udev_dorules 50-usb-realtek-net.rules
-}
-
-pkg_postinst() {
-       linux-mod-r1_pkg_postinst
-       udev_reload
-}
-
-pkg_postrm() {
-       udev_reload
-}

Reply via email to