[gentoo-commits] repo/gentoo:master commit in: net-misc/r8125/, net-misc/r8125/files/

2023-07-20 Thread Ionen Wolkens
commit: 3ac79141575343cbbde2a1e97ad29b6c20c4956e
Author: Karlson2k (Evgeny Grin)  narod  ru>
AuthorDate: Tue Jun 27 14:31:09 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Thu Jul 20 18:57:38 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ac79141

net-misc/r8125: fix build with PTP for Linux >=6.2

Bug: https://bugs.gentoo.org/908645
Signed-off-by: Karlson2k (Evgeny Grin)  narod.ru>
Signed-off-by: Ionen Wolkens  gentoo.org>

 .../r8125/files/r8125-9.011.01-linux-6.2.patch | 42 ++
 net-misc/r8125/r8125-9.008.00.ebuild   |  1 +
 net-misc/r8125/r8125-9.009.01.ebuild   |  1 +
 net-misc/r8125/r8125-9.009.02.ebuild   |  1 +
 net-misc/r8125/r8125-9.011.01.ebuild   |  7 +++-
 5 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/net-misc/r8125/files/r8125-9.011.01-linux-6.2.patch 
b/net-misc/r8125/files/r8125-9.011.01-linux-6.2.patch
new file mode 100644
index ..26bb8620fbfd
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.011.01-linux-6.2.patch
@@ -0,0 +1,42 @@
+From 2ef10e8ccbd16a67a1585ebb627af0f1ae172e0f Mon Sep 17 00:00:00 2001
+From: Evgeny Grin 
+Date: Tue, 27 Jun 2023 11:16:26 +0300
+Subject: [PATCH] Patched PTP functionality for Linux 6.2+
+
+---
+ src/r8125_ptp.c | 11 +++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/r8125_ptp.c b/src/r8125_ptp.c
+index 6010a18..b92fb18 100644
+--- a/src/r8125_ptp.c
 b/src/r8125_ptp.c
+@@ -195,6 +195,13 @@ static int rtl8125_phc_adjfreq(struct ptp_clock_info 
*ptp, s32 delta)
+ return 0;
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)
++static int rtl8125_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
++{
++return rtl8125_phc_adjfreq(ptp, scaled_ppm_to_ppb(scaled_ppm));
++}
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) */
++
+ static int rtl8125_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 
*ts64)
+ {
+ struct rtl8125_private *tp = container_of(ptp, struct 
rtl8125_private, ptp_clock_info);
+@@ -296,7 +303,11 @@ static const struct ptp_clock_info rtl_ptp_clock_info = {
+ .n_per_out  = 0,
+ .n_pins = 0,
+ .pps= 1,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,2,0)
+ .adjfreq= rtl8125_phc_adjfreq,
++#else  /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) */
++.adjfine= rtl8125_phc_adjfine,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) */
+ .adjtime= rtl8125_phc_adjtime,
+ .gettime64  = rtl8125_phc_gettime,
+ .settime64  = rtl8125_phc_settime,
+-- 
+2.41.0.windows.1
+

diff --git a/net-misc/r8125/r8125-9.008.00.ebuild 
b/net-misc/r8125/r8125-9.008.00.ebuild
index ba9eb264d3da..378ced667e5b 100644
--- a/net-misc/r8125/r8125-9.008.00.ebuild
+++ b/net-misc/r8125/r8125-9.008.00.ebuild
@@ -25,6 +25,7 @@ PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
"${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
"${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
+   "${FILESDIR}/${PN}-9.011.01-linux-6.2.patch" # bug 908645
 )
 
 CONFIG_CHECK="~!R8169"

diff --git a/net-misc/r8125/r8125-9.009.01.ebuild 
b/net-misc/r8125/r8125-9.009.01.ebuild
index a88080038413..d85f17950eeb 100644
--- a/net-misc/r8125/r8125-9.009.01.ebuild
+++ b/net-misc/r8125/r8125-9.009.01.ebuild
@@ -22,6 +22,7 @@ PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
"${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
"${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
+   "${FILESDIR}/${PN}-9.011.01-linux-6.2.patch" # bug 908645
 )
 
 CONFIG_CHECK="~!R8169"

diff --git a/net-misc/r8125/r8125-9.009.02.ebuild 
b/net-misc/r8125/r8125-9.009.02.ebuild
index bdeb5b0245c5..922d00c7e9d0 100644
--- a/net-misc/r8125/r8125-9.009.02.ebuild
+++ b/net-misc/r8125/r8125-9.009.02.ebuild
@@ -20,6 +20,7 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
 
 PATCHES=(
"${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
+   "${FILESDIR}/${PN}-9.011.01-linux-6.2.patch" # bug 908645
 )
 
 CONFIG_CHECK="~!R8169"

diff --git a/net-misc/r8125/r8125-9.011.01.ebuild 
b/net-misc/r8125/r8125-9.011.01.ebuild
index d092e674..bc1351818977 100644
--- a/net-misc/r8125/r8125-9.011.01.ebuild
+++ b/net-misc/r8125/r8125-9.011.01.ebuild
@@ -18,6 +18,10 @@ MODULE_NAMES="r8125(net:${S}/src)"
 BUILD_TARGETS="modules"
 IUSE="+multi-tx-q ptp +rss use-firmware"
 
+PATCHES=(
+   "${FILESDIR}/${P}-linux-6.2.patch" # bug 908645
+)
+
 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."
 
@@ -28,7 +32,8 @@ pkg_setup() {
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 

[gentoo-commits] repo/gentoo:master commit in: net-misc/r8125/, net-misc/r8125/files/

2023-04-15 Thread Joonas Niilola
commit: 8212d430a2de8bbe74e842ad54ec744b81463384
Author: Karlson2k (Evgeny Grin)  narod  ru>
AuthorDate: Mon Apr  3 15:52:22 2023 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sat Apr 15 12:41:16 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8212d430

net-misc/r8125: Fixes for kernels 5.19 and 6.1

Closes: https://bugs.gentoo.org/890714
Signed-off-by: Karlson2k (Evgeny Grin)  narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/30461
Signed-off-by: Joonas Niilola  gentoo.org>

 .../r8125/files/r8125-9.009.01-linux-5.19.patch| 35 ++
 net-misc/r8125/r8125-9.008.00.ebuild   |  2 ++
 net-misc/r8125/r8125-9.009.01.ebuild   |  2 ++
 net-misc/r8125/r8125-9.009.02.ebuild   |  4 +++
 4 files changed, 43 insertions(+)

diff --git a/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch 
b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch
new file mode 100644
index ..8dc3f8749a11
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch
@@ -0,0 +1,35 @@
+From c96e5ffc40585d463bea056f2fe02c29d43dcba7 Mon Sep 17 00:00:00 2001
+From: Evgeny Grin 
+Date: Mon, 3 Apr 2023 18:17:24 +0300
+Subject: [PATCH] Backport kernel 5.19 compatibility
+
+---
+ src/r8125_n.c | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/r8125_n.c b/src/r8125_n.c
+index 0bc5eec..e35e557 100644
+--- a/src/r8125_n.c
 b/src/r8125_n.c
+@@ -12715,6 +12715,10 @@ rtl8125_init_one(struct pci_dev *pdev,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ dev->hw_features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
+ dev->features |=  NETIF_F_IPV6_CSUM;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
++netif_set_tso_max_size(dev, LSO_64K);
++netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO2);
++#else //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+ netif_set_gso_max_size(dev, LSO_64K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
+@@ -12722,6 +12726,7 @@ rtl8125_init_one(struct pci_dev *pdev,
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+ 
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
+-- 
+2.40.0
+

diff --git a/net-misc/r8125/r8125-9.008.00.ebuild 
b/net-misc/r8125/r8125-9.008.00.ebuild
index b848421ede7e..d3d593df5844 100644
--- a/net-misc/r8125/r8125-9.008.00.ebuild
+++ b/net-misc/r8125/r8125-9.008.00.ebuild
@@ -23,6 +23,8 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
 PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.17.patch" # bug 839282
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
+   "${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
+   "${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
 )
 
 CONFIG_CHECK="~!R8169"

diff --git a/net-misc/r8125/r8125-9.009.01.ebuild 
b/net-misc/r8125/r8125-9.009.01.ebuild
index 2a1b7c235358..6c64d2ff981b 100644
--- a/net-misc/r8125/r8125-9.009.01.ebuild
+++ b/net-misc/r8125/r8125-9.009.01.ebuild
@@ -20,6 +20,8 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
 
 PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
+   "${FILESDIR}/${PN}-9.009.01-linux-5.19.patch"
+   "${FILESDIR}/${PN}-9.011.00-linux-6.1.patch" # bug 890714
 )
 
 CONFIG_CHECK="~!R8169"

diff --git a/net-misc/r8125/r8125-9.009.02.ebuild 
b/net-misc/r8125/r8125-9.009.02.ebuild
index 9178eeaa64df..60221798a097 100644
--- a/net-misc/r8125/r8125-9.009.02.ebuild
+++ b/net-misc/r8125/r8125-9.009.02.ebuild
@@ -18,6 +18,10 @@ MODULE_NAMES="r8125(net:${S}/src)"
 BUILD_TARGETS="modules"
 IUSE="+multi-tx-q ptp +rss use-firmware"
 
+PATCHES=(
+   "${FILESDIR}/${PN}-9.011.00-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."
 



[gentoo-commits] repo/gentoo:master commit in: net-misc/r8125/, net-misc/r8125/files/

2022-06-16 Thread Sam James
commit: b6c29fdb0d3795cffabca4805bf11ac51b633351
Author: Karlson2k (Evgeny Grin)  narod  ru>
AuthorDate: Thu Jun 16 11:14:44 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Jun 16 16:35:03 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6c29fdb

net-misc/r8125: fixed build with kernel 5.18+

Bug: https://bugs.gentoo.org/852311
Signed-off-by: Karlson2k (Evgeny Grin)  narod.ru>
Signed-off-by: Sam James  gentoo.org>

 .../r8125/files/r8125-9.008.00-linux-5.18.patch| 31 ++
 net-misc/r8125/r8125-9.008.00.ebuild   |  1 +
 2 files changed, 32 insertions(+)

diff --git a/net-misc/r8125/files/r8125-9.008.00-linux-5.18.patch 
b/net-misc/r8125/files/r8125-9.008.00-linux-5.18.patch
new file mode 100644
index ..6da1bdae6b6a
--- /dev/null
+++ b/net-misc/r8125/files/r8125-9.008.00-linux-5.18.patch
@@ -0,0 +1,31 @@
+Added compatibility with Linux Kernel 5.18+.
+
+Author: Karlson2k (Evgeny Grin)
+Gentoo bug: https://bugs.gentoo.org/852311
+
+diff --git a/src/r8125_n.c b/src/r8125_n.c
+
+--- a/src/r8125_n.c
 b/src/r8125_n.c
+@@ -11852,11 +11852,20 @@ rtl8125_init_board(struct pci_dev *pdev,
+ 
+ if ((sizeof(dma_addr_t) > 4) &&
+ use_dac &&
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
+ !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+ !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
++#else  // LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0)
++!dma_set_mask(>dev, DMA_BIT_MASK(64)) &&
++!dma_set_coherent_mask(>dev, DMA_BIT_MASK(64))) {
++#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0)
+ dev->features |= NETIF_F_HIGHDMA;
+ } else {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
+ rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
++#else  // LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0)
++rc = dma_set_mask(>dev, DMA_BIT_MASK(32));
++#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0)
+ if (rc < 0) {
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+ if (netif_msg_probe(tp))
+

diff --git a/net-misc/r8125/r8125-9.008.00.ebuild 
b/net-misc/r8125/r8125-9.008.00.ebuild
index 7b0093e09b81..b848421ede7e 100644
--- a/net-misc/r8125/r8125-9.008.00.ebuild
+++ b/net-misc/r8125/r8125-9.008.00.ebuild
@@ -22,6 +22,7 @@ IUSE="+multi-tx-q ptp +rss use-firmware"
 
 PATCHES=(
"${FILESDIR}/${PN}-9.008.00-linux-5.17.patch" # bug 839282
+   "${FILESDIR}/${PN}-9.008.00-linux-5.18.patch" # bug 852311
 )
 
 CONFIG_CHECK="~!R8169"