🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24877

[PATCH net v2 2/3] ice: remove redundant cross-timestamp PTP command

#24877
From: Tony Nguyen
Date: Tue, 01 Dec 2026 00:52
63 lines
12011 bytes
From: Grzegorz Nitka <grzegorz.nitka@intel.com>

The cross-timestamp capture path programs GLTSYN_CMD with READ_TIME before
starting the ART/device capture and clears it with NOP afterwards.

Since GLTSYN_CMD is shared with other PTP operations, concurrent executions
will race and cause desync across PHY timers causing PHY timestamps to be
incorrect and resulting in faulty PTP behavior. Remove the redundant source
command programming instead of adding another guard around it.

This was found on an early pre-production stepping of a device, and it was
assumed that it would be required for all E823 devices. We discovered that
this isn't actually required on E823 production devices as originally
believed. The only device SKUs that actually require this are
pre-production and have device IDs which aren't supported by the driver.
We tested this across a wide array of E823 silicon steppings.

Testing hints:
Verify crosstimestamp path, for example with phc2sys tool, on
E822/E823/E825/E830 devices. Please note that the phc2sys tool performs
cross-timestamping by default when supported by the hardware. This can
be observed when the reported delay is 0, indicating that the system
time and PHC time were latched simultaneously.

Fixes: 88c360e49f51 ("ice: Support cross-timestamping for E823 devices")
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Reviewed-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Reviewed-by: Milena Olech <milena.olech@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Ayush Singh <ayush1x.singh@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 8908b4f3db35..db1d0e42ae52 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2183,9 +2183,6 @@ static int ice_capture_crosststamp(ktime_t *device,
 	/* Snapshot system time for historic interpolation */
 	ktime_get_snapshot_id(ctx->snapshot_clock_id, &ctx->snapshot);
 
-	/* Program cmd to master timer */
-	ice_ptp_src_cmd(hw, ICE_PTP_READ_TIME);
-
 	/* Start the ART and device clock sync sequence */
 	ctl = rd32(hw, cfg->ctl_reg);
 	ctl |= cfg->ctl_active;
@@ -2212,9 +2209,6 @@ static int ice_capture_crosststamp(ktime_t *device,
 	*device = ns_to_ktime(ts);
 
 err_timeout:
-	/* Clear the master timer */
-	ice_ptp_src_cmd(hw, ICE_PTP_NOP);
-
 	/* Release HW lock */
 	lock = rd32(hw, cfg->lock_reg);
 	lock &= ~cfg->lock_busy;
-- 
2.47.1
Technical Details
Message-ID: <20261201005258.1323948-3-anthony.l.nguyen@intel.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374568-linux-kernel-netdev=dewy.ru
References: <20261201005258.1323948-1-anthony.l.nguyen@intel.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374568-linux-kernel-netdev=dewy.ru
From: anthony.l.nguyen@intel.com (Tony Nguyen)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 2/3] ice: remove redundant cross-timestamp PTP command
Date: Mon, 30 Nov 2026 16:52:55 -0800
Organization: Usenet Network
Message-ID: <20261201005258.1323948-3-anthony.l.nguyen@intel.com>
References: <20261201005258.1323948-1-anthony.l.nguyen@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1578366"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:h/Uh3EwCrq2IEA0nU1IrA7pTXto= sha256:F1ixcnbAF0T0uaM3/nL7PLFA7GkdsqAgUj7JmKpbruc=
	sha1:lIKL0QzA/TVs6NI/b1k0BMoOYzs= sha256:cEzWpPpHwckP/YIPQEsyZCoW79QqjapdBcCfzsLeYSw=
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 71E5D126017; Tue,  1 Dec 2026 03:53:31 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=intel.com
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 ZUFOwW0BzJKf;
	Tue,  1 Dec 2026 03:53:28 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374568-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=intel.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id EB573126019; Tue,  1 Dec 2026 03:53:17 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7846227215; Tue,  1 Dec 2026 00:53:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796086391;
	b=tH3oFPczdwiFtg6LPhU4JYfwfPBLg+c/YoZvwIdeBmf6RNflKuZhBVucnPK18aiF4LQW
	 fOvcHWpSfjmq50A89ZwxMUt4OVvRWl9CC6QyHqLQEy8wBSpTzXYplKxr5F8JXvNT1fr0u
	 wylnizBb2c8WoFnCX0E8+DH8iSFuMJ7yTtRhEu8rQTo4jeWieHQTRc+M18lf7IA9Zwz4d
	 y6L+KHHUmRbidsHqpiyD6JVG/7f2Fj9sNejFm+KOrNcusIRln6ZjlU657l2m5vY2V4kiH
	 s93o9FVzZ5ti5+P48SIs5xgXJR8OAU32sUHnta7bXj+opZKZ0LlrmacW/57K+pN0k/w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796086391;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-IronPort-AV:X-IronPort-AV:
	 Received:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=x0S1JcT1KcDNf2PC18UTM//HqHg+6qmaz4+gHiivtkI=;
	b=etgnMEDLMoBj5rD20C3TfL7sQPU1Fb8rk/YQK/YFHYPjf905LNq+n/l9iAB98VUkcedT
	 7r2iC2ZvwcsKwXX6lDqGzDBhfVXK7GTxQPwlYr/2M3suyhSWtW8m3XQo6ln77JE7ZthCU
	 cBfmOTZ4lgLHLcqbwWeSkMGWa/zBGLAt0SKipwrsCI22h8ZHjEo5bgfMnrnUEf8Hb/lUP
	 G9E3wdz2GjjzSDK36LwwyWfeBnb8MhzCbSegFwv3sjRVHc0Dlkw6xDNvaOcSdiPBdJP92
	 6LnR0q2JKYKzsGx4xnNBQOk3mf0fi/6qAvteeBiwWxDBhNHGgX7JSyzcEEPLIqysKiA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FE4c3xlt;
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 174B3606A681;
	Tue,  1 Dec 2026 00:53:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FE4c3xlt
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.17
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796086390;
	b=qy2bxPQd/KW4VFWVWQ7wz3QYgE3xhXwazrK/8taYkO5yCtfLdVYjOwxrZmhHPevFMswe
	 n+eyb9gjq2LQXJA0YYEk4EvVq5DYajgyyfALW87AIkSINkXhGF9VWkED9XtPZBhtk4AT5
	 5dujUpggiP0T32HZtE1CV18FtPO8SXEX1CS+2796TijvGBBed3ZhmvunUSN0vTCQIt6oC
	 Au3I8DvJ8DCeZn6Aadlp2Zo58YOvWJFrosmjnNZTqPYHT5/pROQApDuTTkmbAa6zZEftU
	 3JbC08SQx+6UIyGQIAd0iHS1RBHvCtpOYQW8BAqhAac5opN3QM3mBtd1Xvb1z+yYfqQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796086390;
	h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID:
	 X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID:
	 X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=x0S1JcT1KcDNf2PC18UTM//HqHg+6qmaz4+gHiivtkI=;
	b=UBNXiu7dh/T6Ox+GwjWroyd6VpcBCmhy85MjtXCsVV9w52ZuZobOceO+J/XzuR5BhZTu
	 c2YcfFtsc4umrGBTdOh5X4tEvkfFRR5w6LNEbn0fQRiKthvEoapJC+JrRoZugDsiG3Elq
	 xTyxouz3Q73UJpl6v34LZbwBLB/nTpXjhrwM+j8DqZ7xG3IWqD6UPJhzWPwrR3V+NSzsp
	 UKm1aSiu/d5cRMixIx87/8yubMqXP7JI1Wc5hB99xUfGWp9b5JjedbrM0pD1LU1y/4QyV
	 Ofi5PCeBOvSdy+IRrQ+UIKFBO2hsSX/3+8nnF2El9QogNqNa8BzXMLUC/70sljl8+GQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FE4c3xlt;
	arc=none smtp.remote-ip=198.175.65.17
X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7D91606A327
	for <netdev@vger.kernel.org>; Tue,  1 Dec 2026 00:53:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7D91606A327
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1796086390; x=1827622390;
  h=from:to:cc:subject:date:message-id:in-reply-to:
   references:mime-version:content-transfer-encoding;
  bh=x0S1JcT1KcDNf2PC18UTM//HqHg+6qmaz4+gHiivtkI=;
  b=FE4c3xlt6tlu1onEzYe6f9brezxbqemnDCnf8PtIhKV/SQnbgaIKXm1n
   9YyB7gXzs/l5D7vfOtd2Qc/4KAWwxugVGjENdVYr7Lq0Ixw808y0SFi90
   3by7IORGsGb6IyZhHgpeZYEiBQAdxzH64oVFXW+rivx4+tKSXlgMNgdxO
   grxqcklGh5bkGEZ4St/zqHBe4YyUvTUWIyqIorUvp4MnrmIaJREMS87NA
   gO+vbDnNUJQ57JdRdqrPlAHHufO7cZ2CyHkzCqh+V2lK+iUerp0WqJ3io
   OVVzytBrOxm5BCTKAgGrPyUkzhTS17vzsD4jGX79F1OIJHOta0PysUtqG
   Q==;
X-CSE-ConnectionGUID: c6ShvJ5fT0aVFn5XLSHM0g==
X-CSE-MsgGUID: o0ve7JTQQ2eyG+/4L4Bj6w==
X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4941446"
X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; 
   d="scan'208";a="4941446"
X-Received: from fmviesa011.fm.intel.com ([10.60.135.151])
  by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:53:09 -0800
X-CSE-ConnectionGUID: 3Hv33y9QR4eRR/nDT5DGng==
X-CSE-MsgGUID: aMl6yAtHTGKUc6kpqjSkWA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; 
   d="scan'208";a="14837747"
X-Received: from anguy11-upstream.jf.intel.com ([10.166.9.133])
  by fmviesa011.fm.intel.com with ESMTP; 30 Nov 2026 16:53:08 -0800
X-Cc: Grzegorz Nitka <grzegorz.nitka@intel.com>,
	anthony.l.nguyen@intel.com,
	przemyslaw.kitszel@intel.com,
	maciej.machnikowski@intel.com,
	jacob.e.keller@intel.com,
	richardcochran@gmail.com,
	Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
	Milena Olech <milena.olech@intel.com>,
	Simon Horman <horms@kernel.org>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Ayush Singh <ayush1x.singh@intel.com>
X-Mailer: git-send-email 2.47.1
X-In-Reply-To: <20261201005258.1323948-1-anthony.l.nguyen@intel.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list