From: Rahul Rameshbabu Date: Wed, 8 Mar 2023 16:18:22 +0000 (-0800) Subject: net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6a40109275626267ebf413ceda81c64719b5c431;p=linux.git net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision Multiplier values are equivalent to 2^(shift constant) since all mlx5 devices advertise a 1Ghz frequency for the internal timer. The previous shift constant of 23 led to internal timer adjustments only taking place when the provided adjustment values were greater than or equal to ~120 ppb or ~7864 scaled ppm. Using a shift constant of 31 enables adjustments when an adjustment parameter is greater than or equal to ~0.47 ppb or ~30.8 scaled ppm. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Bar Shapira Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c index 4c9a402110595..932fbc843c692 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c @@ -39,7 +39,7 @@ #include "clock.h" enum { - MLX5_CYCLES_SHIFT = 23 + MLX5_CYCLES_SHIFT = 31 }; enum {