Skip to content

Commit c3196fb

Browse files
committed
ice: fall back to TCXO on TSPLL lock fail
jira LE-4694 Rebuild_History Non-Buildable kernel-6.12.0-55.43.1.el10_0 commit-author Karol Kolacinski <karol.kolacinski@intel.com> commit 84b8694 TSPLL can fail when trying to lock to TIME_REF as a clock source, e.g. when the external clock source is not stable or connected to the board. To continue operation after failure, try to lock again to internal TCXO and inform user about this. Reviewed-by: Milena Olech <milena.olech@intel.com> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> (cherry picked from commit 84b8694) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 921747b commit c3196fb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/net/ethernet/intel/ice/ice_tspll.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,5 +605,17 @@ int ice_tspll_init(struct ice_hw *hw)
605605
/* Configure the TSPLL using the parameters from the function
606606
* capabilities.
607607
*/
608-
return ice_tspll_cfg(hw, tspll_freq, clk_src);
608+
err = ice_tspll_cfg(hw, tspll_freq, clk_src);
609+
if (err) {
610+
dev_warn(ice_hw_to_dev(hw), "Failed to lock TSPLL to predefined frequency. Retrying with fallback frequency.\n");
611+
612+
/* Try to lock to internal TCXO as a fallback. */
613+
tspll_freq = ice_tspll_default_freq(hw->mac_type);
614+
clk_src = ICE_CLK_SRC_TCXO;
615+
err = ice_tspll_cfg(hw, tspll_freq, clk_src);
616+
if (err)
617+
dev_warn(ice_hw_to_dev(hw), "Failed to lock TSPLL to fallback frequency.\n");
618+
}
619+
620+
return err;
609621
}

0 commit comments

Comments
 (0)