summaryrefslogtreecommitdiff
path: root/net-misc/r8125/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-21 01:09:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-21 01:09:27 +0100
commitd1849ceeb9c09150c11cc0d112883cfba503af27 (patch)
treeac029edd2ec6b691d3ef95fbc731a1b1325d9b82 /net-misc/r8125/files
parent6b89cba67f554b60d139fd07623aef5cc724ec91 (diff)
gentoo auto-resync : 21:07:2023 - 01:09:27
Diffstat (limited to 'net-misc/r8125/files')
-rw-r--r--net-misc/r8125/files/r8125-9.011.01-linux-6.2.patch42
1 files changed, 42 insertions, 0 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
+