From: Carolina Jubran The frequency_diff is reported by firmware in parts-per-trillion, which is exactly what the DPLL core now expects from the ffo_get callback. Commit bc443c253fcd ("dpll: expose fractional frequency offset in ppt") switched the callback contract to ppt but assumed frequency_diff was in ppm and scaled it by 1000000 to "convert" it. Since the value was already ppt, this makes both exported attributes wrong. Report frequency_diff as is and let the core divide it down for the legacy ppm attribute. Fixes: f035dca34ede ("net/mlx5: DPLL, Implement fractional frequency offset get pin op") Signed-off-by: Carolina Jubran Reviewed-by: Jiri Pirko Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/dpll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dpll.c b/drivers/net/ethernet/mellanox/mlx5/core/dpll.c index 7c69d9029bfa..54ba7c330d66 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dpll.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dpll.c @@ -138,7 +138,7 @@ mlx5_dpll_pin_ffo_get(struct mlx5_dpll_synce_status *synce_status, { if (!synce_status->oper_freq_measure) return -ENODATA; - *ffo = 1000000LL * synce_status->frequency_diff; + *ffo = synce_status->frequency_diff; return 0; } base-commit: af32da41b0327b9c6a37856ba82b6760d6c8d10e -- 2.44.0