From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21F7B1519AC for ; Thu, 12 Feb 2026 18:04:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770919495; cv=none; b=IV6Z04KL79+/vDuXBDD4EW1XjdsAmyDGHIZNU0ERxswsimqjXjQgJti61G5KuQs1AXQXFuxhV/cfh9wz3+y+e+4smERrAfMzXfCUJq+mI/+eMHJHAQXgJ+FFMZ89B7Onv912f6lha55bOniFJ7JaCp5OtJ5+6Zmo/KY1HKDWDE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770919495; c=relaxed/simple; bh=iIxaF8rWQGCPfS6LdRFFahqHDSeZVRfZJ/fq2OyTuW0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uRUkBxHHgZ/nGHVaGjUx0whEDloV+1phe1Vw8PasTMn7qT6ApMoXKIPAOlw+5Q/zOzf+MHcF63lUeBRbqPXjlmukZSLxZJ0dcPi/R87UTQVQTR2H75kPTLyxxivDnVc/GMaFreG9fa7yYTbyysOD0nwJZ3UJawnFksLBAZGaTLk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=OItYGEKe; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="OItYGEKe" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 729D51A0E4D; Thu, 12 Feb 2026 18:04:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 35E75606B8; Thu, 12 Feb 2026 18:04:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5EA37103688A1; Thu, 12 Feb 2026 19:04:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770919490; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=+8kTUrc2o8wPYaMgFv2zk2qMqXHnJHp/twrSvkqJ9AQ=; b=OItYGEKeYLv6ENHxiFbDlStUJY+eiUIKrhRIS5s+oy9EWcwC4xSa+/ZCPbMxjYFOh11Qzu 9b09NIO+0jumzK1YKqiygXfTR4T6SXEXIaJHLDf2tB2+XEVux6c5aqT9KGG+l3ZVcjZAU5 2dlXo/7YhSPhuHum5WinVv79hCcg9Itzlilzp4rHFffcH9SP2UzU71do+LD1lveZ6c80ci waB/vcvME4XbrUrM6MmJStRzBRVxLwypl9nFIcZpRDHNSlxRKacGSbkLlzRFDaHXqEcRmV d0G5clrJ26QwXtQ+Ux8eqZwQP8X+Ak/6r4U1hstaxxncFeQXJJFo45TbY9mTDw== Message-ID: <42049f4d-8258-4d9a-840c-a2d2eafc6bf6@bootlin.com> Date: Thu, 12 Feb 2026 19:04:44 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net: sparx5/lan969x: fix PTP clock max_adj value To: Daniel Machon , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steen Hegelund , UNGLinuxDriver@microchip.com, Richard Cochran , Horatiu Vultur Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260212-sparx5-ptp-max-adj-v2-v1-1-06b200e50ce3@microchip.com> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <20260212-sparx5-ptp-max-adj-v2-v1-1-06b200e50ce3@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 Hi Daniel, On 12/02/2026 12:02, Daniel Machon wrote: > The max_adj field in ptp_clock_info tells userspace how much the PHC > clock frequency can be adjusted. ptp4l reads this and will never request > a correction larger than max_adj. > > On both sparx5 and lan969x the clock offset may never converge because > the servo needs a frequency correction larger than the current max_adj > of 200000 (200 ppm) allows. The servo rails at the max and the offset > stays in the tens of microseconds. > > The hardware has no inherent max adjustment limit; frequency correction > is done by writing a 64-bit clock period increment to CLK_PER_CFG, and > the register has plenty of range. The 200000 value was just an overly > conservative software limit. The max_adj is shared between sparx5 and > lan969x, and the increased value is safe for both. > > Fix this by increasing max_adj to 10000000 (10000 ppm), giving the > servo sufficient headroom. That's arbitrary, but looks like there's plenty of other drivers that do similar things :) > Fixes: 0933bd04047c ("net: sparx5: Add support for ptp clocks") > Signed-off-by: Daniel Machon Reviewed-by: Maxime Chevallier Maxime