Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2212535/?format=api
{ "id": 2212535, "url": "http://patchwork.ozlabs.org/api/patches/2212535/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260318093412.2628443-1-dima.ruinskiy@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "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": "<20260318093412.2628443-1-dima.ruinskiy@intel.com>", "list_archive_url": null, "date": "2026-03-18T09:34:12", "name": "[iwl-net,v3] e1000e: correct TIMINCA on ADP/TGP systems with wrong XTAL frequency", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "c5fa2162250d259f2c7eeb709f315eb545ebe92d", "submitter": { "id": 68688, "url": "http://patchwork.ozlabs.org/api/people/68688/?format=api", "name": "Ruinskiy, Dima", "email": "dima.ruinskiy@intel.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260318093412.2628443-1-dima.ruinskiy@intel.com/mbox/", "series": [ { "id": 496426, "url": "http://patchwork.ozlabs.org/api/series/496426/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=496426", "date": "2026-03-18T09:34:12", "name": "[iwl-net,v3] e1000e: correct TIMINCA on ADP/TGP systems with wrong XTAL frequency", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/496426/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2212535/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2212535/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=HBMkuEe2;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\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 4fbNvL2Xjyz1xyS\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Mar 2026 20:34:22 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id E6C5883B57;\n\tWed, 18 Mar 2026 09:34:20 +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 RLC0d_CivdDR; Wed, 18 Mar 2026 09:34:19 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 1743883B52;\n\tWed, 18 Mar 2026 09:34:19 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 6C7E01BD\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Mar 2026 09:34:18 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 4EAA0608EA\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Mar 2026 09:34:18 +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 ymrpi__bCJ69 for <intel-wired-lan@lists.osuosl.org>;\n Wed, 18 Mar 2026 09:34:17 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.15])\n by smtp3.osuosl.org (Postfix) with ESMTPS id B824860784\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Mar 2026 09:34:16 +0000 (UTC)", "from fmviesa002.fm.intel.com ([10.60.135.142])\n by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Mar 2026 02:34:16 -0700", "from ccdlinuxdev11.iil.intel.com ([143.185.162.70])\n by fmviesa002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Mar 2026 02:34:14 -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 smtp1.osuosl.org 1743883B52", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org B824860784" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1773826459;\n\tbh=JwwNVcaX8FuojrsPgklowATIHjoXUEVNKZZBXpEYmMo=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=HBMkuEe2IQwm2vLVTpCogBCbx2Gu/4mO0EC57DPX89d4PK3YmcU6PvCQj34yvFeML\n\t XD4toYiR+qgX7Cfrp3T/QNSF7pXdGZZ43aRGd7va5FtrM1VMhLLesOyz9FzJuUyF6T\n\t ghdZEJgjaPZ8kkB/G9qkbxKYPUDxgFK7QJ2bnBd4mdgOx4ucpyJHuCircZg92Z3XXH\n\t h0DwUfSJhLxzlrceaxk7Ul12pEozcMNVtwSFRnoF4kAVAjiIDrmiM5d3YNsNyHu4/5\n\t HuZMXWXsO5xrOxlXrqJaNxueGawQSiSheHgftpSChMKfZQOhjLHgLxLKjXiG902bAx\n\t EgA40PFCuJ9MA==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.15;\n helo=mgamail.intel.com; envelope-from=dima.ruinskiy@intel.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org B824860784", "X-CSE-ConnectionGUID": [ "LhM6uuL9RZazeIo9Z2u/+g==", "LzrISX69Q/2zycI6pVUeWg==" ], "X-CSE-MsgGUID": [ "UyqZu0+7TxeIrT3kj3Dl4w==", "fML5KubITaO1/TGDt2I65Q==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11732\"; a=\"74995517\"", "E=Sophos;i=\"6.23,127,1770624000\"; d=\"scan'208\";a=\"74995517\"", "E=Sophos;i=\"6.23,127,1770624000\"; d=\"scan'208\";a=\"245596456\"" ], "X-ExtLoop1": "1", "From": "Dima Ruinskiy <dima.ruinskiy@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Cc": "dima.ruinskiy@intel.com,\n\tanthony.l.nguyen@intel.com", "Date": "Wed, 18 Mar 2026 11:34:12 +0200", "Message-Id": "<20260318093412.2628443-1-dima.ruinskiy@intel.com>", "X-Mailer": "git-send-email 2.34.1", "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=1773826457; x=1805362457;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=UKbsw+1g7WbCaVzc9oihUKaZkyVa2+w+p179ldV114k=;\n b=Ki79+FOVUL+nuGCcc2ePgvP+qATU0yNs2GBAIaj9KPwTJDrrJz6uoZnz\n pXCgovoJLkytnghz/ca8n77ZD1PuH/askiEd3nZ20NEJrn/ymveaIoh4a\n u7ecof/PsFYtn+GZmpJVEuTK7MFhWQc0SLiDxdhBdxZsWN4B2RXxqvzK7\n 031m9erWbDpIb76sk9xwaqf1QRaA36C8OrhXMbjcb3+22u5saZ7L2rk+c\n Yuu+wHnA46elj+eNJHdWAYycyAUcI6G+hgO7v9jI5C+Qdzs9UkB/ZUXdr\n 0f3F0SnGQBjRWlvFkAeM8Fe92ejtrpr/1BpDTbA1lVS6CzMbm3fMxHN1u\n Q==;", "X-Mailman-Original-Authentication-Results": [ "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com", "smtp3.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Ki79+FOV" ], "Subject": "[Intel-wired-lan] [PATCH iwl-net v3] e1000e: correct TIMINCA on\n ADP/TGP systems with wrong XTAL frequency", "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>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Vitaly Lifshits <vitaly.lifshits@intel.com>\n\nOn some Tiger Lake (TGP) and Alder Lake (ADP) platforms, the hardware\nXTAL clock is incorrectly interpreted as 24 MHz instead of the actual\n38.4 MHz. This causes the PHC to run significantly faster than system\ntime, breaking PTP synchronization.\n\nTo mitigate this at runtime, measure PHC vs system time over ~1 ms using\ncross-timestamps. If the PHC increment differs from system time beyond\nthe expected tolerance (currently >100 uSecs), reprogram TIMINCA for the\n38.4 MHz profile and reinitialize the timecounter.\n\nTested on an affected system using phc_ctl:\nWithout fix:\nsudo phc_ctl enp0s31f6 set 0.0 wait 10 get\nclock time: 16.000541250 (expected ~10s)\n\nWith fix:\nsudo phc_ctl enp0s31f6 set 0.0 wait 10 get\nclock time: 9.984407212 (expected ~10s)\n\nFixes: fb776f5d57ee (\"e1000e: Add support for Tiger Lake\")\nSigned-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>\nCo-developed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>\nSigned-off-by: Dima Ruinskiy <dima.ruinskiy@intel.com>\n---\nv3: fix cc.shift and wrap TIMINCA write in systim_lock\nv2: avoid resetting the systim and rephrase commit message\nv1: initial version\n---\n drivers/net/ethernet/intel/e1000e/netdev.c | 78 ++++++++++++++++++++++\n 1 file changed, 78 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 9befdacd6730..26fdef6075c8 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -3902,6 +3902,81 @@ static void e1000_flush_desc_rings(struct e1000_adapter *adapter)\n \t\te1000_flush_rx_ring(adapter);\n }\n \n+/**\n+ * e1000e_xtal_tgp_workaround - Adjust XTAL clock based on PHC and system\n+ * clock delta.\n+ * @adapter: Pointer to the private adapter structure\n+ *\n+ * Measures the time difference between the PHC (Precision Hardware Clock)\n+ * and the system clock over a 1 millisecond interval. If the delta\n+ * exceeds 100 microseconds, reconfigure the XTAL clock to 38.4 MHz.\n+ */\n+static void e1000e_xtal_tgp_workaround(struct e1000_adapter *adapter)\n+{\n+\ts64 phc_delta, sys_delta, sys_start_ns, sys_end_ns, delta_ns;\n+\tstruct ptp_system_timestamp sys_start = {}, sys_end = {};\n+\tstruct ptp_clock_info *info = &adapter->ptp_clock_info;\n+\tstruct timespec64 phc_start, phc_end;\n+\tstruct e1000_hw *hw = &adapter->hw;\n+\tstruct netlink_ext_ack extack = {};\n+\tunsigned long flags;\n+\tu32 timinca;\n+\ts32 ret_val;\n+\n+\t/* Capture start */\n+\tif (info->gettimex64(info, &phc_start, &sys_start)) {\n+\t\te_dbg(\"PHC gettimex(start) failed\\n\");\n+\t\treturn;\n+\t}\n+\n+\t/* Small interval to measure increment */\n+\tusleep_range(1000, 1100);\n+\n+\t/* Capture end */\n+\tif (info->gettimex64(info, &phc_end, &sys_end)) {\n+\t\te_dbg(\"PHC gettimex(end) failed\\n\");\n+\t\treturn;\n+\t}\n+\n+\t/* Compute deltas */\n+\tphc_delta = timespec64_to_ns(&phc_end) -\n+\t\t timespec64_to_ns(&phc_start);\n+\n+\tsys_start_ns = (timespec64_to_ns(&sys_start.pre_ts) +\n+\t\t\ttimespec64_to_ns(&sys_start.post_ts)) >> 1;\n+\n+\tsys_end_ns = (timespec64_to_ns(&sys_end.pre_ts) +\n+\t\t timespec64_to_ns(&sys_end.post_ts)) >> 1;\n+\n+\tsys_delta = sys_end_ns - sys_start_ns;\n+\n+\tdelta_ns = phc_delta - sys_delta;\n+\tif (delta_ns > 100000) {\n+\t\te_dbg(\"Corrected PHC frequency: TIMINCA set for 38.4 MHz\\n\");\n+\t\t/* Program TIMINCA for 38.4 MHz */\n+\t\tspin_lock_irqsave(&adapter->systim_lock, flags);\n+\t\tadapter->cc.shift = INCVALUE_SHIFT_38400KHZ;\n+\t\ttiminca = (INCPERIOD_38400KHZ <<\n+\t\t\t E1000_TIMINCA_INCPERIOD_SHIFT) |\n+\t\t\t (((INCVALUE_38400KHZ <<\n+\t\t\t adapter->cc.shift) &\n+\t\t\t E1000_TIMINCA_INCVALUE_MASK));\n+\t\tew32(TIMINCA, timinca);\n+\n+\t\t/* reset the systim ns time counter */\n+\t\ttimecounter_init(&adapter->tc, &adapter->cc,\n+\t\t\t\t ktime_to_ns(ktime_get_real()));\n+\t\tspin_unlock_irqrestore(&adapter->systim_lock, flags);\n+\n+\t\t/* restore the previous hwtstamp configuration settings */\n+\t\tret_val = e1000e_config_hwtstamp(adapter,\n+\t\t\t\t\t\t &adapter->hwtstamp_config,\n+\t\t\t\t\t\t &extack);\n+\t\tif (ret_val && extack._msg)\n+\t\t\te_err(\"%s\\n\", extack._msg);\n+\t}\n+}\n+\n /**\n * e1000e_systim_reset - reset the timesync registers after a hardware reset\n * @adapter: board private structure\n@@ -3953,6 +4028,9 @@ static void e1000e_systim_reset(struct e1000_adapter *adapter)\n \t\tif (extack._msg)\n \t\t\te_err(\"%s\\n\", extack._msg);\n \t}\n+\n+\tif (hw->mac.type == e1000_pch_adp || hw->mac.type == e1000_pch_tgp)\n+\t\te1000e_xtal_tgp_workaround(adapter);\n }\n \n /**\n", "prefixes": [ "iwl-net", "v3" ] }