]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision
authorRahul Rameshbabu <rrameshbabu@nvidia.com>
Wed, 8 Mar 2023 16:18:22 +0000 (08:18 -0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 6 Apr 2023 01:57:33 +0000 (18:57 -0700)
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 <rrameshbabu@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Bar Shapira <bshapira@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c

index 4c9a402110595ae81dee2a3ea87fd48f402d59d4..932fbc843c6921dd33e564a42f5601c12886f9ea 100644 (file)
@@ -39,7 +39,7 @@
 #include "clock.h"
 
 enum {
-       MLX5_CYCLES_SHIFT       = 23
+       MLX5_CYCLES_SHIFT       = 31
 };
 
 enum {