diff options
author | Karlson2k (Evgeny Grin) <k2k@narod.ru> | 2023-06-27 17:31:09 +0300 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-07-20 14:57:38 -0400 |
commit | 3ac79141575343cbbde2a1e97ad29b6c20c4956e (patch) | |
tree | edfbde840a60cdc82c39d438bbf57d57ef315963 /net-misc/r8125 | |
parent | dev-lang/rust: backport lint-docs ld path revert for USE=doc (diff) | |
download | gentoo-3ac79141575343cbbde2a1e97ad29b6c20c4956e.tar.gz gentoo-3ac79141575343cbbde2a1e97ad29b6c20c4956e.tar.bz2 gentoo-3ac79141575343cbbde2a1e97ad29b6c20c4956e.zip |
net-misc/r8125: fix build with PTP for Linux >=6.2
Bug: https://bugs.gentoo.org/908645
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'net-misc/r8125')
-rw-r--r-- | net-misc/r8125/files/r8125-9.011.01-linux-6.2.patch | 42 | ||||
-rw-r--r-- | net-misc/r8125/r8125-9.008.00.ebuild | 1 | ||||
-rw-r--r-- | net-misc/r8125/r8125-9.009.01.ebuild | 1 | ||||
-rw-r--r-- | net-misc/r8125/r8125-9.009.02.ebuild | 1 | ||||
-rw-r--r-- | net-misc/r8125/r8125-9.011.01.ebuild | 7 |
5 files changed, 51 insertions, 1 deletions
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 000000000000..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 <k2k@narod.ru> +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 d09aaaa2e674..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 n)" - BUILD_PARAMS+=" ENABLE_PAGE_REUSE=y ENABLE_RX_PACKET_FRAGMENT=y" + BUILD_PARAMS+=" ENABLE_PAGE_REUSE=$(usex ptp n y)" # Not compatible with PTP + BUILD_PARAMS+=" ENABLE_RX_PACKET_FRAGMENT=$(usex ptp n y)" # Not compatible with PTP } src_install() { |