Skip to content

Commit 98bf57e

Browse files
ruppala-nvpmallaiah-coder
authored andcommitted
NVIDIA: SAUCE: r8127: Fix PPS hrtimer init for kernel 6.15+
Switch from hrtimer_init() to hrtimer_setup() for PPS timer to match new kernel API for K6.15 and above Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
1 parent 548d455 commit 98bf57e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/realtek/r8127/r8127_ptp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,13 @@ void rtl8127_ptp_init(struct rtl8127_private *tp)
748748

749749
/* init a hrtimer for pps */
750750
tp->pps_enable = 0;
751+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0)
752+
hrtimer_setup(&tp->pps_timer, rtl8127_hrtimer_for_pps, CLOCK_MONOTONIC,
753+
HRTIMER_MODE_REL);
754+
#else
751755
hrtimer_init(&tp->pps_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
752756
tp->pps_timer.function = rtl8127_hrtimer_for_pps;
757+
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0) */
753758

754759
tp->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
755760
tp->hwtstamp_config.tx_type = HWTSTAMP_TX_OFF;

0 commit comments

Comments
 (0)