From: Jacob Keller Date: Tue, 24 Jun 2025 00:29:58 +0000 (-0700) Subject: ice: read TSPLL registers again before reporting status X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38f742df9fcfc91a681d650fc5b622276b6c61b5;p=thirdparty%2Fkernel%2Flinux.git ice: read TSPLL registers again before reporting status After programming the TSPLL, re-read the registers before reporting status. This ensures the debug log message will show what was actually programmed, rather than relying on a cached value. Signed-off-by: Jacob Keller Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c index e2f07d60fcdc1..440aba817b9c4 100644 --- a/drivers/net/ethernet/intel/ice/ice_tspll.c +++ b/drivers/net/ethernet/intel/ice/ice_tspll.c @@ -239,8 +239,15 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum ice_tspll_freq clk_freq, return -EBUSY; } - ice_tspll_log_cfg(hw, dw24.ts_pll_enable, clk_src, clk_freq, true, - true); + err = ice_read_cgu_reg(hw, ICE_CGU_R9, &dw9.val); + if (err) + return err; + err = ice_read_cgu_reg(hw, ICE_CGU_R24, &dw24.val); + if (err) + return err; + + ice_tspll_log_cfg(hw, dw24.ts_pll_enable, dw24.time_ref_sel, + dw9.time_ref_freq_sel, true, false); return 0; } @@ -433,8 +440,15 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq, return -EBUSY; } - ice_tspll_log_cfg(hw, dw23.ts_pll_enable, clk_src, clk_freq, true, - true); + err = ice_read_cgu_reg(hw, ICE_CGU_R9, &dw9.val); + if (err) + return err; + err = ice_read_cgu_reg(hw, ICE_CGU_R23, &dw23.val); + if (err) + return err; + + ice_tspll_log_cfg(hw, dw23.ts_pll_enable, dw23.time_ref_sel, + dw9.time_ref_freq_sel, true, true); return 0; }