🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #994

[PATCH net v2 3/3] ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl

#994
From: Vincent Jardin via B4 Relay
Date: Fri, 09 Oct 2026 00:00
46 lines
8142 bytes
From: Vincent Jardin <vjardin@free.fr>

Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to
ptp_clock_info") moved the validation of the external timestamp request
flags into the PTP core. A driver that does not set
.supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl,
but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP, since
the core always adds PTP_STRICT_FLAGS to it.

ptp_qoriq_init() programs TMR_CTRL with ETEP1 and ETEP2 cleared, so the
timer timestamps the rising edge of its external trigger inputs. Declare
that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected
instead of being timestamped on the rising edge.

This also makes the legacy PTP_EXTTS_REQUEST ioctl strict: a request for
the falling edge, or for both edges, now fails with -EOPNOTSUPP instead
of being timestamped on the rising edge. That cannot be avoided: the core
adds PTP_STRICT_FLAGS to every PTP_EXTTS_REQUEST2 request, so a driver
has to declare it to accept them, and once declared it applies to both
ioctls. Commit 3200fdd4021d ("broadcom: fix support for
PTP_EXTTS_REQUEST2 ioctl") made the same change for bcm-phy-ptp.

Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info")
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 drivers/ptp/ptp_qoriq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ptp/ptp_qoriq.c b/drivers/ptp/ptp_qoriq.c
index 76272e5ac5b8..bcd29104effe 100644
--- a/drivers/ptp/ptp_qoriq.c
+++ b/drivers/ptp/ptp_qoriq.c
@@ -355,6 +355,7 @@ static const struct ptp_clock_info ptp_qoriq_caps = {
 	.n_per_out	= 0,
 	.n_pins		= 0,
 	.pps		= 1,
+	.supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
 	.adjfine	= ptp_qoriq_adjfine,
 	.adjtime	= ptp_qoriq_adjtime,
 	.gettime64	= ptp_qoriq_gettime,

-- 
2.43.0
Technical Details
Message-ID: <20261009-for-upstream-qoriq-ptp-extts-flags-v2-3-0f4eeff2295d@free.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343366-linux-kernel-netdev=dewy.ru
References: <20261009-for-upstream-qoriq-ptp-extts-flags-v2-0-0f4eeff2295d@free.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343366-linux-kernel-netdev=dewy.ru
From: devnull+vjardin.free.fr@kernel.org (Vincent Jardin via B4 Relay)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 3/3] ptp: qoriq: fix support for PTP_EXTTS_REQUEST2
 ioctl
Date: Fri, 09 Oct 2026 02:00:58 +0200
Organization: Usenet Network
Message-ID: <20261009-for-upstream-qoriq-ptp-extts-flags-v2-3-0f4eeff2295d@free.fr>
References: <20261009-for-upstream-qoriq-ptp-extts-flags-v2-0-0f4eeff2295d@free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="999987"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FCgOBPCfi/3LtKuYBQHMEi8m9VA= sha256:KXArWhHKOAqKK/e71pCxiqGH+W6rV6uEQN+s8BPNyu0=
	sha1:XhwLq4JTbJNCj1MImHsL2ybEfsA= sha256:xhuQqM0GR0nY949ZxUsfxaCluZZulueS4ouUP4P7BTc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 44F0610F561; Fri,  9 Oct 2026 03:01:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.441
X-Spam-Status: No, score=-1.441 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ELBT_8i0UAQR;
	Fri,  9 Oct 2026 03:01:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-343366-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 5D21C10F575; Fri,  9 Oct 2026 03:01:11 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id 390526069AA; Fri,  9 Oct 2026 00:01:10 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F940332907;
	Fri,  9 Oct 2026 00:01:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uUTvKEEQ"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(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 20CD02749DC;
	Fri,  9 Oct 2026 00:01:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791504065; cv=none; b=jwTNTNIl6AkAc+3u9+PFWyGawdpMqcaKhz7+b8uXaPHGUmVv9qM+Qoe5G5kYSMAt0fIFUvwxp03RovdcCEdPq7Ansb4/GFwX8bliUevYxjDLeycNLWXwGIYC09pQNngfxbuWXUGUxysgG/gpPboVS1l22V9eDknABTXG5bzsX6g=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791504065; c=relaxed/simple;
	bh=uVZCRBIBzvxvJdq9U6gMOWtNtaXEdKv7EzUkmcQOFng=;
	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
	 In-Reply-To:To:Cc; b=At7ZHEVTiVm4xoYWiHRRJkz1J2IlXcixad0MCLZeGsKeM77X3H5JO0FhMDUJ6Lko7PPFgjCs7hjzd40f+TZWpzmZam+KXYTVcbuLrDJm2Ywnp7gTLK4c8mlfBpnIxfUv0cWacAlrAiAGJoF1XoPNfYpucE9AT6dvQYzLj689T04=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uUTvKEEQ; arc=none smtp.client-ip=10.30.226.201
X-Received: by smtp.kernel.org (Postfix) with ESMTPS id C82DDC2BCFD;
	Fri,  9 Oct 2026 00:01:04 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1791504064;
	bh=uVZCRBIBzvxvJdq9U6gMOWtNtaXEdKv7EzUkmcQOFng=;
	h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;
	b=uUTvKEEQLHaIduuO/ibwTB7tzr/SyksNafIXXHGRQ5Q17KvEC2G4e41xgf2OGxOKy
	 VM645/Wvut3ibtLMltFj9Iaq5h009JuTozFnHTGN6uuwTvV+5Ciqrnh+6oSDv+XUXN
	 x5ljngXHcBN3/qOvFho+dWMGCv8pbisohwpEQmNFDqj2qY/4IzcX6z+tdu2lh4rWtA
	 pTSG+8bgjhj3nh/EmhHXFVTqiaaKxDMxHiHt0oSsYkrIFqwu+JQkmQBGjCGtIVq5Tz
	 +3H+/9ZUL2Ln4eTrIeikRf2Gjz/l72ltYDSpL4cQjpYQ0bjRl4fy3oKUJ9f4GOGIHf
	 n8vKv1z/NsUUg==
X-Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1])
	by smtp.lore.kernel.org (Postfix) with ESMTP id AF845CA6015;
	Fri,  9 Oct 2026 00:01:04 +0000 (UTC)
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261009-for-upstream-qoriq-ptp-extts-flags-v2-0-0f4eeff2295d@free.fr>
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 
 imx@lists.linux.dev, Ioana Ciornei <ioana.ciornei@nxp.com>, 
 Vincent Jardin <vjardin@free.fr>
X-Mailer: b4 0.13.0
X-Developer-Signature: v=1; a=ed25519-sha256; t=1791504062; l=1943;
 i=vjardin@free.fr; s=20260525; h=from:subject:message-id;
 bh=JAWE65GgAHfz2hlc0tfit/bmnoQ51Nw8aZJscKk9C/0=;
 b=C51hq5Nnlv2F0qfnE1JmLIfhgUQ/bfgqhPbfGhj5KKkVrKGmI/3KhCZjX4tuhM90gBmQpafej
 7KYGe2LzAO5A0XBlrwLEEKjsTkE2bEJUC5N/pzg9o43utXQgltDwSV9
X-Developer-Key: i=vjardin@free.fr; a=ed25519;
 pk=hppgLeFpGpKOi7LNwGEZ4jOYofJCoGd4Jf1ltAabiLw=
X-Endpoint-Received: by B4 Relay for vjardin@free.fr/20260525 with
 auth_id=871
X-Original-From: Vincent Jardin <vjardin@free.fr>
X-Reply-To: vjardin@free.fr