Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2222982/?format=api
{ "id": 2222982, "url": "http://patchwork.ozlabs.org/api/patches/2222982/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260414065144.2990497-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": "<20260414065144.2990497-1-dima.ruinskiy@intel.com>", "list_archive_url": null, "date": "2026-04-14T06:51:44", "name": "[iwl-net,v3] e1000e: correct TIMINCA on ADP/TGP systems with wrong XTAL frequency", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "27eb918c5f188f32660a9a680cd566fc3c7ec721", "submitter": { "id": 68688, "url": "http://patchwork.ozlabs.org/api/people/68688/?format=api", "name": "Ruinskiy, Dima", "email": "dima.ruinskiy@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260414065144.2990497-1-dima.ruinskiy@intel.com/mbox/", "series": [ { "id": 499786, "url": "http://patchwork.ozlabs.org/api/series/499786/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499786", "date": "2026-04-14T06:51:44", "name": "[iwl-net,v3] e1000e: correct TIMINCA on ADP/TGP systems with wrong XTAL frequency", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/499786/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222982/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222982/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=1k2i6/Af;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4fvw1R2VChz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 16:51:54 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id E7C16429B6;\n\tTue, 14 Apr 2026 06:51:52 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id db-QqPSKGL2A; Tue, 14 Apr 2026 06:51:52 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 2301342989;\n\tTue, 14 Apr 2026 06:51:52 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 66914237\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 06:51:51 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 5808861CA0\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 06:51:51 +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 69GxuGEc4K3T for <intel-wired-lan@lists.osuosl.org>;\n Tue, 14 Apr 2026 06:51:50 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.7])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 3436E61C9F\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 06:51:49 +0000 (UTC)", "from orviesa003.jf.intel.com ([10.64.159.143])\n by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2026 23:51:49 -0700", "from ccdlinuxdev11.iil.intel.com ([143.185.162.70])\n by orviesa003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2026 23:51:47 -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 smtp4.osuosl.org 2301342989", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3436E61C9F" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776149512;\n\tbh=UARQj8SxdTxUrsYo7FJoyB6wUKernTP+wSB5F8i2tA8=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=1k2i6/Af0c6i1Imbd0WCLXawMgrz62EQie+XAyzCuhGANzMACMOpkaBNsAKWPUSMa\n\t btuH5+Mz3lw86FLEaSVjIQfyo9q6DHPQai/qA0bIo2fXXi1Twfcr1AIT50ASW+lM78\n\t s0J7xtwKJWn3lu33xL1ExUdl7j0Ryr3Ol3AfYmLACnQ56BNwUAzHJ9CCcJPYiEpGgO\n\t nwlrIqRqsMFTUfspndfpOZ0FjU9PnKyYnJkWp8rkL2YhDCLPNQ1e/AYQibnff785LA\n\t sRnfbPQdDnwLB68xBUd3zmJhjZ/qsgwqMZODNYTZPPyxhNl8/KCftjkkjx4QCA21kw\n\t YibIDQ3mlpFnQ==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7;\n helo=mgamail.intel.com; envelope-from=dima.ruinskiy@intel.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org 3436E61C9F", "X-CSE-ConnectionGUID": [ "EMjknfRWRC+4oB0DGVjJjg==", "IjgjwI+0RxmZ8P0dlKVgQg==" ], "X-CSE-MsgGUID": [ "6jJ44k1KT1q9uStr7jHNhw==", "MaVvLnj5QJamLfvUc6s3LQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11758\"; a=\"102553953\"", "E=Sophos;i=\"6.23,179,1770624000\"; d=\"scan'208\";a=\"102553953\"", "E=Sophos;i=\"6.23,179,1770624000\"; d=\"scan'208\";a=\"234040803\"" ], "X-ExtLoop1": "1", "From": "Dima Ruinskiy <dima.ruinskiy@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Cc": "dima.ruinskiy@intel.com, jacob.e.keller@intel.com,\n anthony.l.nguyen@intel.com", "Date": "Tue, 14 Apr 2026 09:51:44 +0300", "Message-Id": "<20260414065144.2990497-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=1776149510; x=1807685510;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=TnEDCLRxVWsnakpIIu7X5NOzqPaFmGhI5HZx2OB7W0c=;\n b=iNbWbp59mZ7Cvqt3KXDNtPkHjZCKdkvgHzs2OftiTijwZ1L6LWR/0ZRf\n kqWuTUhdVSElLcx6HtaKf9ynLpzNeBg2OCAjvIGtgnGqVhY6AZlNyrRgp\n jaLjNRTnLiXGX0P0F5VwgrWnrngdXUJDo4SNb7mjnA0N6jaP61wqJUejc\n vozrdOJQceQzHbDzWdez/5nJwMLQMbDaMpIQ/VYtChV71EGHG5yH6cpt9\n bWSap4lhANHzKXhWTb/+27uVetdXIRUvJmVdyP5iYpXna+YLO4PolRvLf\n dvwRIo+raBl4714TZ3chBCwd7caRzW7mbOJwrqHfH5G5puGxDNGKPFj3a\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=iNbWbp59" ], "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---\nv4: replace ktime_to_ns(ktime_get_real()) with ktime_get_real_ns()\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_get_real_ns());\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" ] }