提交 80c5b1ad 编写于 作者: R Rahul Rameshbabu 提交者: sanglipeng

net/mlx5: Fix ptp max frequency adjustment range

stable inclusion
from stable-v5.10.164
commit b3d47227f06f0f3b9e6eafdc32d5d8a3036820f8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7T7G4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b3d47227f06f0f3b9e6eafdc32d5d8a3036820f8

--------------------------------

[ Upstream commit fe91d572 ]

.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: 3d8c38af ("net/mlx5e: Add PTP Hardware Clock (PHC) support")
Signed-off-by: NRahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: NGal Pressman <gal@nvidia.com>
Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 ec007970
...@@ -440,7 +440,7 @@ static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin, ...@@ -440,7 +440,7 @@ static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
static const struct ptp_clock_info mlx5_ptp_clock_info = { static const struct ptp_clock_info mlx5_ptp_clock_info = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "mlx5_ptp", .name = "mlx5_ptp",
.max_adj = 100000000, .max_adj = 50000000,
.n_alarm = 0, .n_alarm = 0,
.n_ext_ts = 0, .n_ext_ts = 0,
.n_per_out = 0, .n_per_out = 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册