From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 801D6C54EBE for ; Tue, 10 Jan 2023 06:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjAJGMi (ORCPT ); Tue, 10 Jan 2023 01:12:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbjAJGMH (ORCPT ); Tue, 10 Jan 2023 01:12:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4399E43A3B for ; Mon, 9 Jan 2023 22:11:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F4138B81112 for ; Tue, 10 Jan 2023 06:11:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91F81C433F1; Tue, 10 Jan 2023 06:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673331108; bh=vfPKr2xXEt6P4OAa5WSOAgKjprWYgHqAJgZ+f/72tBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iH/15h8LHhR94SQCA/2CK4csyUCzi7/E75+GgJvHl+/jAGmcRWSnU6Qk/HdZlqx8y yeg1b7nQY19rJhhczTLdGLMmkq3u1GgCTevFslyffZye15BvF56eF1P3F+ODoRp7Tp RB9ZIx8ssZETurgohXmsMfVJjsV9n07NwejDc3kuDHCZQhy6b3/8WcG7A5LgByDmNy JQe6I3fswvO8SwbTQmYPKukXw9N7dJLBXvj/OKgloPWd/uqMRWBgy4S0vBtMdAR9KU DSv1vrkrGFeZUC5LC7Ia9PcSwRd17vLISQMzM/FER1pFUY1FEUg7qaii0bZ2HhZsf8 +CxFe9T8zxsFA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Rahul Rameshbabu , Gal Pressman Subject: [net 12/16] net/mlx5: Fix ptp max frequency adjustment range Date: Mon, 9 Jan 2023 22:11:19 -0800 Message-Id: <20230110061123.338427-13-saeed@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110061123.338427-1-saeed@kernel.org> References: <20230110061123.338427-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rahul Rameshbabu .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: 3d8c38af1493 ("net/mlx5e: Add PTP Hardware Clock (PHC) support") Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c index 69cfe60c558a..69318b143268 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c @@ -681,7 +681,7 @@ static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin, static const struct ptp_clock_info mlx5_ptp_clock_info = { .owner = THIS_MODULE, .name = "mlx5_ptp", - .max_adj = 100000000, + .max_adj = 50000000, .n_alarm = 0, .n_ext_ts = 0, .n_per_out = 0, -- 2.39.0