]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix ptp max frequency adjustment range
authorRahul Rameshbabu <rrameshbabu@nvidia.com>
Mon, 5 Dec 2022 22:26:09 +0000 (14:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:05 +0000 (11:42 +0100)
commit2faa85f3fdec80968d7a84bcf553daeb28392a38
tree63b65296611132eb5ed36040e8c56a6c9d130ce0
parentc931c8e97823b89d2bf177217ed544b79eba8f56
net/mlx5: Fix ptp max frequency adjustment range

[ Upstream commit fe91d57277eef8bb4aca05acfa337b4a51d0bba4 ]

.max_adj of ptp_clock_info acts as an absolute value for the amount in ppb
that can be set for a single call of .adjfine. This means that a single
call to .getfine cannot be greater than .max_adj or less than -(.max_adj).
Provides correct value for max frequency adjustment value supported by
devices.

Fixes: 2a62503c042f ("net/mlx5e: Add PTP Hardware Clock (PHC) support")
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c