From 4bd445ac6b0cd144aa5937a20b4ce53859d8fd0b Mon Sep 17 00:00:00 2001 From: Keming Yang Date: Sat, 24 Oct 2026 04:13:03 +0800 Subject: [PATCH] net: yusur: yk3: restore the nominal addend for zero frequency adjustment After a nonzero PTP frequency correction, requesting zero correction returns success without writing the nominal addend. The PTP core then reports a dialed frequency of zero although the previous correction is still programmed. Remove the early return and let the existing calculation write the default addend when ppb is zero. Positive and negative corrections keep their existing arithmetic and register access. A private OCK VM using the exact callbacks and the real PTP core reproduces six failed resets with a register-recording backend. The fixed callbacks pass all twelve adjustment checks. The full target yk3_ptp.o also builds before and after. Physical YK3 hardware and oscillator behavior were not tested. Upstream status: downstream-only Fixes: b3fe1bfec4e2 ("net: ethernet: yusur: add YK3 Ethernet driver") Signed-off-by: Keming Yang --- drivers/net/ethernet/yusur/yk3/yk3_ptp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/yusur/yk3/yk3_ptp.c b/drivers/net/ethernet/yusur/yk3/yk3_ptp.c index cfd9cc24b446..4554c4f3e26d 100644 --- a/drivers/net/ethernet/yusur/yk3/yk3_ptp.c +++ b/drivers/net/ethernet/yusur/yk3/yk3_ptp.c @@ -98,9 +98,6 @@ static int yk3_ptp_phc_adjfreq(struct ptp_clock_info *clock_info, s32 ppb) struct yk3_ptp *ptp = container_of(clock_info, struct yk3_ptp, ptp_caps); - if (ppb == 0) - return 0; - if (ppb < 0) { neg_adj = 1; ppb = -ppb; -- Gitee