{"id":2226447,"url":"http://patchwork.ozlabs.org/api/patches/2226447/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260422123144.485930-3-grzegorz.nitka@intel.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/projects/46/?format=json","name":"Intel Wired Ethernet development","link_name":"intel-wired-lan","list_id":"intel-wired-lan.osuosl.org","list_email":"intel-wired-lan@osuosl.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260422123144.485930-3-grzegorz.nitka@intel.com>","list_archive_url":null,"date":"2026-04-22T12:31:44","name":"[iwl-net,2/2] ice: ptp: use primary NAC semaphore on E825","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"63581fb638b99c2b1af30df069aef2551fb435f2","submitter":{"id":82711,"url":"http://patchwork.ozlabs.org/api/people/82711/?format=json","name":"Grzegorz Nitka","email":"grzegorz.nitka@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260422123144.485930-3-grzegorz.nitka@intel.com/mbox/","series":[{"id":501005,"url":"http://patchwork.ozlabs.org/api/series/501005/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=501005","date":"2026-04-22T12:31:42","name":"ice: ptp: fix E825 timer synchronization and locking","version":1,"mbox":"http://patchwork.ozlabs.org/series/501005/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226447/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226447/checks/","tags":{},"related":[],"headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=40OJZ29B;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0zGs1HBtz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:36:05 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id CC577617AE;\n\tWed, 22 Apr 2026 12:36:03 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id ECKZLPMXGg72; Wed, 22 Apr 2026 12:36:01 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id C3AD5617AC;\n\tWed, 22 Apr 2026 12:35:59 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists1.osuosl.org (Postfix) with ESMTP id 41CEE24D\n for <intel-wired-lan@lists.osuosl.org>; Wed, 22 Apr 2026 12:35:58 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 33E378423C\n for <intel-wired-lan@lists.osuosl.org>; Wed, 22 Apr 2026 12:35:58 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id BuIV0lZjDgxS for <intel-wired-lan@lists.osuosl.org>;\n Wed, 22 Apr 2026 12:35:54 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [198.175.65.18])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 1E3A684222\n for <intel-wired-lan@lists.osuosl.org>; Wed, 22 Apr 2026 12:35:53 +0000 (UTC)","from fmviesa007.fm.intel.com ([10.60.135.147])\n by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2026 05:35:54 -0700","from gklab-003-001.igk.intel.com ([10.91.173.48])\n by fmviesa007.fm.intel.com with ESMTP; 22 Apr 2026 05:35:52 -0700"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org C3AD5617AC","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1E3A684222"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776861359;\n\tbh=dnZsxVsFr22d5OmToS2JmCiGmh3eHykezaEML6y2Zz8=;\n\th=From:To:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t Cc:From;\n\tb=40OJZ29BYl4cUaeE5r52gZ/Gcq+iJ6/CV8ik13tMh3HJT55kYwFduqJjU+MjMlG+U\n\t nWLU4rGYGDdBA6/u8zXZSSDBgNg+ZFl3hsY//uF5cj6/4WbQ0EvhA1WlD8AeMIRV4i\n\t E6rWTVBD49e++/m0PcBlXB8SWR2+9c+yTgdkerJcJZXAG66iFRipmgwEkxBfja73cG\n\t JON+lrfMRE5uvv7l5ypdaVj8GqkQLzdJKuqGdd1q/RIrA06yZd8EmUnN1EFUHwGh6c\n\t /+CK8e5FCelJaCwo3Flsi7FO+Vdh9utsvBYAitf9PyqqM360zRUBhD5HLG0CVsTg1J\n\t Zpprk2KiPkOag==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.18;\n helo=mgamail.intel.com; envelope-from=grzegorz.nitka@intel.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1E3A684222","X-CSE-ConnectionGUID":["yft8iJKNR1SpzYBn64IKMg==","jnPp+D69RzWk8HTMMSZLhg=="],"X-CSE-MsgGUID":["+WFCMoidSVWAEIOU2FO4BQ==","SIJp+xLLQbOKFjQTNtXCzw=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11764\"; a=\"77826166\"","E=Sophos;i=\"6.23,192,1770624000\"; d=\"scan'208\";a=\"77826166\"","E=Sophos;i=\"6.23,192,1770624000\"; d=\"scan'208\";a=\"229167437\""],"X-ExtLoop1":"1","From":"Grzegorz Nitka <grzegorz.nitka@intel.com>","To":"intel-wired-lan@lists.osuosl.org","Date":"Wed, 22 Apr 2026 14:31:44 +0200","Message-Id":"<20260422123144.485930-3-grzegorz.nitka@intel.com>","X-Mailer":"git-send-email 2.39.3","In-Reply-To":"<20260422123144.485930-1-grzegorz.nitka@intel.com>","References":"<20260422123144.485930-1-grzegorz.nitka@intel.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1776861354; x=1808397354;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=wDLA3/GJGEO1IbM955Q5FElcfpvCOUEomPnwlKEBe7g=;\n b=XtRsKYsHLMMIOvBawBL7pVE0F3l7lPgw1J3Dd4mnjYZWONW7GkpKKe5Y\n /csQC2k2c2xQ7u1qLX5tshUe24HDkDEjcV/wn0azWzm400gLPEXymVQwY\n 9li/0BgpcfDCQn7GQ2VsXQjt7LYDc2ywQ2Gh1nE7xLN3uJ5CgRqFNOica\n C6rrEcQFJ5ChTgCk3XF0GKnO0Nl90dXGU2+9SNgpo6vYDkNUyXCrYCi+T\n lET8sjunlJYCVxK7xd6vdikoRkPvISRABiun18orZ1zkKwuMxnaGm/rZJ\n UJR1S4MZWkEpT6aeO0L+y4MDQLAMGcRzV5pKPROGv60JPqpDar8Iz97lo\n A==;","X-Mailman-Original-Authentication-Results":["smtp1.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com","smtp1.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=XtRsKYsH"],"Subject":"[Intel-wired-lan] [PATCH iwl-net 2/2] ice: ptp: use primary NAC\n semaphore on E825","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Cc":"netdev@vger.kernel.org,\n Arkadiusz Kubalewski <Arkadiusz.kubalewski@intel.com>,\n anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"For E825 2xNAC configurations, PTP semaphore operations must hit the\nprimary NAC register block so both sides coordinate on the same lock.\n\nCommit e2193f9f9ec9 (\"ice: enable timesync operation on 2xNAC E825\ndevices\") updated other primary-only PTP register accesses to\nuse the primary NAC on non-primary functions, but left ice_ptp_lock()\nand ice_ptp_unlock() operating on the local NAC. As a result, secondary\nNAC PTP paths can take a different semaphore than the primary side.\n\nSelect the primary hardware in ice_ptp_lock() and ice_ptp_unlock() when\nthe current function is not primary, keeping semaphore operations\nsymmetric and consistent with the rest of the 2xNAC PTP register access\npath.\n\nFixes: e2193f9f9ec9 (\"ice: enable timesync operation on 2xNAC E825 devices\")\nReviewed-by: Arkadiusz Kubalewski <Arkadiusz.kubalewski@intel.com>\nSigned-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c\nindex 8bb94e785f2a..2c18e16fe053 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c\n@@ -5264,9 +5264,13 @@ static void ice_ptp_init_phy_e830(struct ice_ptp_hw *ptp)\n  */\n bool ice_ptp_lock(struct ice_hw *hw)\n {\n+\tstruct ice_pf *pf = container_of(hw, struct ice_pf, hw);\n \tu32 hw_lock;\n \tint i;\n \n+\tif (!ice_is_primary(hw))\n+\t\thw = ice_get_primary_hw(pf);\n+\n #define MAX_TRIES 15\n \n \tfor (i = 0; i < MAX_TRIES; i++) {\n@@ -5293,6 +5297,11 @@ bool ice_ptp_lock(struct ice_hw *hw)\n  */\n void ice_ptp_unlock(struct ice_hw *hw)\n {\n+\tstruct ice_pf *pf = container_of(hw, struct ice_pf, hw);\n+\n+\tif (!ice_is_primary(hw))\n+\t\thw = ice_get_primary_hw(pf);\n+\n \twr32(hw, PFTSYN_SEM + (PFTSYN_SEM_BYTES * hw->pf_id), 0);\n }\n \n","prefixes":["iwl-net","2/2"]}