Add an informative error message when preparing external PHYs for a timer sync fails.
Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com> --- drivers/net/ice/base/ice_ptp_hw.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index 31d6c7cf81..81b57b068c 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -4932,9 +4932,16 @@ int ice_ptp_port_cmd_e810(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd, bool lock_sbq) { u32 val = ice_ptp_tmr_cmd_to_port_reg(hw, cmd); + int err; - return ice_write_phy_reg_e810_lp(hw, E810_ETH_GLTSYN_CMD, val, - lock_sbq); + err = ice_write_phy_reg_e810_lp(hw, E810_ETH_GLTSYN_CMD, val, + lock_sbq); + if (err) { + ice_debug(hw, ICE_DBG_PTP, "Failed to write back GLTSYN_CMD, err %d\n", err); + return err; + } + + return 0; } /* E810T SMA functions -- 2.43.0