From nobody Mon Feb 9 23:42:28 2026 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 ABBAC34FF4B for ; Thu, 22 Jan 2026 13:27:54 +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=1769088476; cv=none; b=Lxc3WvkhrotnB7U2f8Ocd+SOcwqjgytxel7tnwUhERz6Y7aw9qhjy06UgZcB3pzRJt3+KZ8YrI1NT8IYa+stSh2+e9+5TkteTHG6+8AG8pIIkFyoAhDI+GPNlBNiVeEI6Xqiiy3qmAldZ5qW7Afm7ciWzp41UzR/4jbcHMzF4Wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769088476; c=relaxed/simple; bh=F3x7ujt23LH7Hzb/IBaAvxfIn3ywNtT91s3EJRLMZe8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qQGI3D6MJK9miXqZFYCh1VAi8dmi92P6s5uYBjM/ZGXFIE+1MOIK2tZjcHcUIM+EOmHT5q3wViIUBtAHjbTNY7VR/edHuTXb4F2gJbzyT3YhyUYLN8xjKtHPeK3ksSoz79d7fWd1UeoICgIoIGuklwzcdMC7e+07hYz8O5K3qKA= 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=JoMeccS+; 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="JoMeccS+" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 3DFF91A2A78; Thu, 22 Jan 2026 13:27:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0DE1C606B6; Thu, 22 Jan 2026 13:27:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D1CE8119B81DA; Thu, 22 Jan 2026 14:27:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769088472; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=5JUfVn7/HeLWZy5Qd02a6wIWBDQq2NcAA2klS+MsO1s=; b=JoMeccS+wNTmcvCyt+EKXz4lNlcJp3UEc5GP7nNaLmRhM3Wj5wSq/JfPBi6Hf7BdULyjYC ptcUfBc+Ei8D/J40E37JneDB+oR369ICTofQTlIqT+eiJUNBl6XlWC4evqmN2gW8xxQ9j1 9YgXbEXudr3vZSDsNK0Vg6rCVbpY8a9qJ1CEW1j/9ORHlRo9vH7mjXb+V2/9Kfcp4emtdp xtpEfNVw1ijsnSDe0UeKcyOvKOLkvsQdiVdMZqSu2GUaOtbIjMir0U6xhtN6W4t8BQTV+z /6kyuO2TVn4CbWQ4coh8nzGbsRohM+1pRqoi3E1KV0ygmloKSZRD9FmuhzYTzQ== From: "Bastien Curutchet (Schneider Electric)" Date: Thu, 22 Jan 2026 14:27:41 +0100 Subject: [PATCH net-next v2 7/8] net: dsa: microchip: Adapt port offset for KSZ8463's PTP register Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260122-ksz8463-ptp-v2-7-b6683f5ce50b@bootlin.com> References: <20260122-ksz8463-ptp-v2-0-b6683f5ce50b@bootlin.com> In-Reply-To: <20260122-ksz8463-ptp-v2-0-b6683f5ce50b@bootlin.com> To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Simon Horman Cc: Pascal Eberhard , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (Schneider Electric)" X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 In KSZ8463 register's layout, the offset between port 1 and port 2 registers isn't the same in the generic control register area than in the PTP register area. The get_port_addr() always uses the same offset so it doesn't work when it's used to access PTP registers. Adapt the port offset in get_port_addr() when the accessed register is in the PTP area. Signed-off-by: Bastien Curutchet (Schneider Electric) --- drivers/net/dsa/microchip/ksz8.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/k= sz8.c index c354abdafc1b542a32c276ef939a90db30c67f55..a05527899b8bab6d53509ba38c5= 8101b79e98ee5 100644 --- a/drivers/net/dsa/microchip/ksz8.c +++ b/drivers/net/dsa/microchip/ksz8.c @@ -2020,6 +2020,9 @@ u32 ksz8_get_port_addr(int port, int offset) =20 u32 ksz8463_get_port_addr(int port, int offset) { + if (offset >=3D KSZ8463_PTP_CLK_CTRL) + return offset + 0x20 * port; + return offset + 0x18 * port; } =20 --=20 2.52.0