commit:     997db16d225880b5762b5fa2e68a8665a6be8c50
Author:     Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Fri Nov  8 16:16:53 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 07:30:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=997db16d

net-misc/r8125: new upstream version 9.014.01

Closes: https://bugs.gentoo.org/933359
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/39243
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-misc/r8125/Manifest                            |  1 +
 .../r8125/files/r8125-9.014.01-ptp-linux-6.9.patch | 59 ++++++++++++++++++++++
 net-misc/r8125/metadata.xml                        |  3 +-
 net-misc/r8125/r8125-9.014.01.ebuild               | 41 +++++++++++++++
 4 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/net-misc/r8125/Manifest b/net-misc/r8125/Manifest
index dfd10434a30c..786e4afeddcd 100644
--- a/net-misc/r8125/Manifest
+++ b/net-misc/r8125/Manifest
@@ -1 +1,2 @@
 DIST r8125-9.013.02.tar.bz2 105923 BLAKE2B 
0ae1a6a7ad651d30ac2ca29ab98af06c6facc26bfacac8ce5b51e92e8c7955c150a995c424f875a9a1cb315fe41f474ea3429cd7675ceec1ef82d454ad2bd434
 SHA512 
acb16992182c4c6b79357a511cfcedb53bb6513185caec91a5cb76aa41dc922e6c74099546886b32dba584d614f9bcaf36d31e40f3328b9ebc4ccd6b91296065
+DIST r8125-9.014.01.tar.bz2 111465 BLAKE2B 
ae09f27b617422e03484b10dfe7dcee14f58bc05650a80b654f9c02ba678424643575346312dae9ce327c309bf1afc575aec00e740a20fc4347c9c3bd00744ba
 SHA512 
a12902e3e9dc34ae999080c1971a8ec9640d62f12a5648ddca0812d93d6c411c2c270e8c6de481fef23a982e8722e8515e5a3aa5c2d84cbdb4e6fa9da730c1e2

diff --git a/net-misc/r8125/files/r8125-9.014.01-ptp-linux-6.9.patch 
b/net-misc/r8125/files/r8125-9.014.01-ptp-linux-6.9.patch
new file mode 100644
index 000000000000..775e8eef2f85
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.014.01-ptp-linux-6.9.patch
@@ -0,0 +1,59 @@
+From 0da7d93621651788505c3670890ee32c6619ddcd Mon Sep 17 00:00:00 2001
+From: Evgeny Grin <[email protected]>
+Date: Sat, 23 Nov 2024 13:34:45 +0300
+Subject: [PATCH] Fixed missing changes for PTP on kernels >= 6.9
+
+---
+ src/r8125_ptp.h | 9 ++++++++-
+ src/r8125_ptp.c | 2 +-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/r8125_ptp.h b/src/r8125_ptp.h
+index b24136a..50c0e50 100644
+--- a/src/r8125_ptp.h
++++ b/src/r8125_ptp.h
+@@ -35,12 +35,19 @@
+ #ifndef _LINUX_rtl8125_PTP_H
+ #define _LINUX_rtl8125_PTP_H
+ 
++#include <linux/version.h>
+ #include <linux/ktime.h>
+ #include <linux/timecounter.h>
+ #include <linux/net_tstamp.h>
+ #include <linux/ptp_clock_kernel.h>
+ #include <linux/ptp_classify.h>
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0)
++#  define rtl_ethtool_ts_info   ethtool_ts_info
++#else
++#  define rtl_ethtool_ts_info   kernel_ethtool_ts_info
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0) */
++
+ struct rtl8125_ptp_info {
+         s64 time_sec;
+         u32 time_ns;
+@@ -66,7 +73,7 @@ struct rtl8125_private;
+ struct RxDescV3;
+ 
+ int rtl8125_get_ts_info(struct net_device *netdev,
+-                        struct ethtool_ts_info *info);
++                        struct rtl_ethtool_ts_info *info);
+ 
+ void rtl8125_ptp_reset(struct rtl8125_private *tp);
+ void rtl8125_ptp_init(struct rtl8125_private *tp);
+diff --git a/src/r8125_ptp.c b/src/r8125_ptp.c
+index 812fced..02a6e41 100644
+--- a/src/r8125_ptp.c
++++ b/src/r8125_ptp.c
+@@ -304,7 +304,7 @@ static int rtl8125_phc_enable(struct ptp_clock_info *ptp,
+ }
+ 
+ int rtl8125_get_ts_info(struct net_device *netdev,
+-                        struct ethtool_ts_info *info)
++                        struct rtl_ethtool_ts_info *info)
+ {
+         struct rtl8125_private *tp = netdev_priv(netdev);
+ 
+-- 
+2.47.0.windows.2
+

diff --git a/net-misc/r8125/metadata.xml b/net-misc/r8125/metadata.xml
index a0cb8723713f..dfeac4126777 100644
--- a/net-misc/r8125/metadata.xml
+++ b/net-misc/r8125/metadata.xml
@@ -9,8 +9,7 @@
                <email>[email protected]</email>
                <name>Proxy Maintainers</name>
        </maintainer>
-       <longdescription>Official Realtek r8125 vendor linux driver. The 
following cards are currently supported:
-RTL8125 RTL8125A RTL8125B(S)(G)</longdescription>
+       <longdescription>Official Realtek r8125 vendor linux driver. This 
driver supports NICs based on RTL8125 family.</longdescription>
        <use>
                <flag name="multi-tx-q">Enable Multiple Tx Queue (&#34;RSS&#34; 
for sending)</flag>
                <flag name="ptp">Enable Precision Time Protocol support</flag>

diff --git a/net-misc/r8125/r8125-9.014.01.ebuild 
b/net-misc/r8125/r8125-9.014.01.ebuild
new file mode 100644
index 000000000000..85c5c355be29
--- /dev/null
+++ b/net-misc/r8125/r8125-9.014.01.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1
+
+DESCRIPTION="r8125 vendor driver for Realtek RTL8125 PCI-E NICs"
+HOMEPAGE="https://www.realtek.com/Download/List?cate_id=584";
+# Mirrored to avoid captcha
+SRC_URI="https://github.com/Karlson2k/r8125/releases/download/${PV}/${P}.tar.bz2";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+multi-tx-q ptp +rss use-firmware"
+
+PATCHES=(
+       "${FILESDIR}/${P}-ptp-linux-6.9.patch"
+)
+
+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."
+
+src_compile() {
+       local modlist=( ${PN}=kernel/drivers/net/ethernet/realtek:src )
+       local modargs=(
+               # Build parameters
+               KERNELDIR="${KV_OUT_DIR}"
+               # Configuration settings
+               ENABLE_PTP_SUPPORT=$(usex ptp y n)
+               ENABLE_RSS_SUPPORT=$(usex rss y n)
+               ENABLE_MULTIPLE_TX_QUEUE=$(usex multi-tx-q y n)
+               ENABLE_USE_FIRMWARE_FILE=$(usex use-firmware y n)
+               ENABLE_PAGE_REUSE=y
+               ENABLE_RX_PACKET_FRAGMENT=y
+       )
+
+       linux-mod-r1_src_compile
+}

Reply via email to