{"id":2224547,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2224547/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260417145907.696307-3-poros@redhat.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.2/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":"<20260417145907.696307-3-poros@redhat.com>","list_archive_url":null,"date":"2026-04-17T14:59:06","name":"[iwl-net,v7,2/3] ice: fix missing dpll notifications for SW pins","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"03e8caf3df702558dcec87998dc3091ea6d63e4a","submitter":{"id":74657,"url":"http://patchwork.ozlabs.org/api/1.2/people/74657/?format=json","name":"Petr Oros","email":"poros@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260417145907.696307-3-poros@redhat.com/mbox/","series":[{"id":500359,"url":"http://patchwork.ozlabs.org/api/1.2/series/500359/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=500359","date":"2026-04-17T14:59:04","name":"ice: fix missing dpll notifications for SW pins","version":7,"mbox":"http://patchwork.ozlabs.org/series/500359/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2224547/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2224547/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=Di3Sydcs;\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 4fxyhs4WNmz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 00:59:41 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id CE36060E03;\n\tFri, 17 Apr 2026 14:59:39 +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 enZIsVkj0x_v; Fri, 17 Apr 2026 14:59:38 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 22EAB60E00;\n\tFri, 17 Apr 2026 14:59:38 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id DF42F270\n for <intel-wired-lan@lists.osuosl.org>; Fri, 17 Apr 2026 14:59:36 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id C4F1F60E00\n for <intel-wired-lan@lists.osuosl.org>; Fri, 17 Apr 2026 14:59:36 +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 2hJ8pez0GLYE for <intel-wired-lan@lists.osuosl.org>;\n Fri, 17 Apr 2026 14:59:36 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp3.osuosl.org (Postfix) with ESMTPS id B610F60DFF\n for <intel-wired-lan@lists.osuosl.org>; Fri, 17 Apr 2026 14:59:35 +0000 (UTC)","from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-ZQ7uMKMdOJO3sSbQVQ9QGQ-1; Fri,\n 17 Apr 2026 10:59:31 -0400","from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 15302195608B; Fri, 17 Apr 2026 14:59:29 +0000 (UTC)","from ShadowPeak.redhat.com (unknown [10.44.32.76])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id A8D9E3000C1C; Fri, 17 Apr 2026 14:59:23 +0000 (UTC)"],"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 22EAB60E00","OpenDKIM Filter v2.11.0 smtp3.osuosl.org B610F60DFF"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776437978;\n\tbh=HEPdyw6AatoRW7dZ87XoM4QrLpIsuCA3Ya6pp2WqSW0=;\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=Di3Sydcsr8e5pFA8ksiTfyfyH4Bi/ITYmfdZHBIj54N5dbxd4vG7s6RjiZuQ5tN0b\n\t YKzah5w7TFGOAOGEDYjrs/boIYW7KoOveXoIZjW53jIFkhAvlOszsghqjtmrxeLbCg\n\t agy4qhYuIiqHqlA/3MDBgLLhehJTIaeQvpg/FWVo8j3OQNpHuuHGdMBQ3m5Y8SJ7Lq\n\t t870PKMYoKSkCbwiC8YVvkg2epLac2Oe8yr96G8qMtfLGnvW/3Dr+cHnBRqU1mvuEV\n\t eYtNjqcLK/qGKAt86AKOwMze5VMB7kBLKjsIUEMHskeePmt+uI6tyA/stKp3YbL3cK\n\t 2SbNrA2eC+bkA==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=poros@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org B610F60DFF","X-MC-Unique":"ZQ7uMKMdOJO3sSbQVQ9QGQ-1","X-Mimecast-MFC-AGG-ID":"ZQ7uMKMdOJO3sSbQVQ9QGQ_1776437969","From":"Petr Oros <poros@redhat.com>","To":"netdev@vger.kernel.org","Date":"Fri, 17 Apr 2026 16:59:06 +0200","Message-ID":"<20260417145907.696307-3-poros@redhat.com>","In-Reply-To":"<20260417145907.696307-1-poros@redhat.com>","References":"<20260417145907.696307-1-poros@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.4","X-Mimecast-MFC-PROC-ID":"ARdAaaJH4N2ocSOE7EgF6KqFopky5nhZCZYCfclFql0_1776437969","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","content-type":"text/plain; charset=\"US-ASCII\"; x-default=true","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com;\n s=mimecast20190719; t=1776437974;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=HEPdyw6AatoRW7dZ87XoM4QrLpIsuCA3Ya6pp2WqSW0=;\n b=fhz0ROcUFSg0Fq3W/jw0xR7jQItjuTxbXKL8uaoJmSajWc/EDGwOhTwxw+/SKrjReDjU/M\n LvzSvsixFbKVk0OKpmX+qs+WLnnJypeyYVL3O3sNbt0fV1j3KdyM5j9vu0Ok+7RVPJKeuZ\n lIJ8FoLpTAHxzQey3ZlVnKsGyvJWSD8=","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp3.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=fhz0ROcU"],"Subject":"[Intel-wired-lan] [PATCH iwl-net v7 2/3] ice: fix missing dpll\n notifications for SW pins","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":"Ivan Vecera <ivecera@redhat.com>,\n Vadim Fedorenko <vadim.fedorenko@linux.dev>, Jiri Pirko <jiri@resnulli.us>,\n Rinitha S <sx.rinitha@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Eric Dumazet <edumazet@google.com>,\n Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Simon Horman <horms@kernel.org>, intel-wired-lan@lists.osuosl.org,\n Jacob Keller <jacob.e.keller@intel.com>, Jakub Kicinski <kuba@kernel.org>,\n Paolo Abeni <pabeni@redhat.com>, \"David S. Miller\" <davem@davemloft.net>,\n linux-kernel@vger.kernel.org","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"The SMA/U.FL pin redesign (commit 2dd5d03c77e2 (\"ice: redesign dpll\nsma/u.fl pins control\")) introduced software-controlled pins that wrap\nbacking CGU input/output pins, but never updated the notification and\ndata paths to propagate pin events to these SW wrappers.\n\nThe periodic work sends dpll_pin_change_ntf() only for direct CGU input\npins.  SW pins that wrap these inputs never receive change or phase\noffset notifications, so userspace consumers such as synce4l monitoring\nSMA pins via dpll netlink never learn about state transitions or phase\noffset updates.  Similarly, ice_dpll_phase_offset_get() reads the SW\npin's own phase_offset field which is never updated; the PPS monitor\nwrites to the backing CGU input's field instead.\n\nFix by introducing ice_dpll_pin_ntf(), a wrapper around\ndpll_pin_change_ntf() that also notifies any registered SMA/U.FL pin\nwhose backing CGU input matches.  Replace all direct\ndpll_pin_change_ntf() calls in the periodic notification paths with\nthis wrapper.  Fix ice_dpll_phase_offset_get() to return the backing\nCGU input's phase_offset for input-direction SW pins.\n\nFixes: 2dd5d03c77e2 (\"ice: redesign dpll sma/u.fl pins control\")\nSigned-off-by: Petr Oros <poros@redhat.com>\n---\n drivers/net/ethernet/intel/ice/ice_dpll.c | 47 +++++++++++++++++------\n 1 file changed, 36 insertions(+), 11 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c\nindex 3a90a2940fdc6e..11b942b83500fb 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dpll.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c\n@@ -1963,7 +1963,10 @@ ice_dpll_phase_offset_get(const struct dpll_pin *pin, void *pin_priv,\n \t\t\t\t       d->active_input == p->input->pin))\n \t\t*phase_offset = d->phase_offset * ICE_DPLL_PHASE_OFFSET_FACTOR;\n \telse if (d->phase_offset_monitor_period)\n-\t\t*phase_offset = p->phase_offset * ICE_DPLL_PHASE_OFFSET_FACTOR;\n+\t\t*phase_offset = (p->input &&\n+\t\t\t\t p->direction == DPLL_PIN_DIRECTION_INPUT ?\n+\t\t\t\t p->input->phase_offset :\n+\t\t\t\t p->phase_offset) * ICE_DPLL_PHASE_OFFSET_FACTOR;\n \telse\n \t\t*phase_offset = 0;\n \tmutex_unlock(&pf->dplls.lock);\n@@ -2659,6 +2662,27 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)\n \treturn pci_get_dsn(pf->pdev);\n }\n \n+/**\n+ * ice_dpll_pin_ntf - notify pin change including any SW pin wrappers\n+ * @dplls: pointer to dplls struct\n+ * @pin: the dpll_pin that changed\n+ *\n+ * Send a change notification for @pin and for any registered SMA/U.FL pin\n+ * whose backing CGU input matches @pin.\n+ */\n+static void ice_dpll_pin_ntf(struct ice_dplls *dplls, struct dpll_pin *pin)\n+{\n+\tdpll_pin_change_ntf(pin);\n+\tfor (int i = 0; i < ICE_DPLL_PIN_SW_NUM; i++) {\n+\t\tif (dplls->sma[i].pin && dplls->sma[i].input &&\n+\t\t    dplls->sma[i].input->pin == pin)\n+\t\t\tdpll_pin_change_ntf(dplls->sma[i].pin);\n+\t\tif (dplls->ufl[i].pin && dplls->ufl[i].input &&\n+\t\t    dplls->ufl[i].input->pin == pin)\n+\t\t\tdpll_pin_change_ntf(dplls->ufl[i].pin);\n+\t}\n+}\n+\n /**\n  * ice_dpll_notify_changes - notify dpll subsystem about changes\n  * @d: pointer do dpll\n@@ -2667,6 +2691,7 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)\n  */\n static void ice_dpll_notify_changes(struct ice_dpll *d)\n {\n+\tstruct ice_dplls *dplls = &d->pf->dplls;\n \tbool pin_notified = false;\n \n \tif (d->prev_dpll_state != d->dpll_state) {\n@@ -2675,17 +2700,17 @@ static void ice_dpll_notify_changes(struct ice_dpll *d)\n \t}\n \tif (d->prev_input != d->active_input) {\n \t\tif (d->prev_input)\n-\t\t\tdpll_pin_change_ntf(d->prev_input);\n+\t\t\tice_dpll_pin_ntf(dplls, d->prev_input);\n \t\td->prev_input = d->active_input;\n \t\tif (d->active_input) {\n-\t\t\tdpll_pin_change_ntf(d->active_input);\n+\t\t\tice_dpll_pin_ntf(dplls, d->active_input);\n \t\t\tpin_notified = true;\n \t\t}\n \t}\n \tif (d->prev_phase_offset != d->phase_offset) {\n \t\td->prev_phase_offset = d->phase_offset;\n \t\tif (!pin_notified && d->active_input)\n-\t\t\tdpll_pin_change_ntf(d->active_input);\n+\t\t\tice_dpll_pin_ntf(dplls, d->active_input);\n \t}\n }\n \n@@ -2714,6 +2739,7 @@ static bool ice_dpll_is_pps_phase_monitor(struct ice_pf *pf)\n \n /**\n  * ice_dpll_pins_notify_mask - notify dpll subsystem about bulk pin changes\n+ * @dplls: pointer to dplls struct\n  * @pins: array of ice_dpll_pin pointers registered within dpll subsystem\n  * @pin_num: number of pins\n  * @phase_offset_ntf_mask: bitmask of pin indexes to notify\n@@ -2723,15 +2749,14 @@ static bool ice_dpll_is_pps_phase_monitor(struct ice_pf *pf)\n  *\n  * Context: Must be called while pf->dplls.lock is released.\n  */\n-static void ice_dpll_pins_notify_mask(struct ice_dpll_pin *pins,\n+static void ice_dpll_pins_notify_mask(struct ice_dplls *dplls,\n+\t\t\t\t      struct ice_dpll_pin *pins,\n \t\t\t\t      u8 pin_num,\n \t\t\t\t      u32 phase_offset_ntf_mask)\n {\n-\tint i = 0;\n-\n-\tfor (i = 0; i < pin_num; i++)\n-\t\tif (phase_offset_ntf_mask & (1 << i))\n-\t\t\tdpll_pin_change_ntf(pins[i].pin);\n+\tfor (int i = 0; i < pin_num; i++)\n+\t\tif (phase_offset_ntf_mask & BIT(i))\n+\t\t\tice_dpll_pin_ntf(dplls, pins[i].pin);\n }\n \n /**\n@@ -2907,7 +2932,7 @@ static void ice_dpll_periodic_work(struct kthread_work *work)\n \tice_dpll_notify_changes(de);\n \tice_dpll_notify_changes(dp);\n \tif (phase_offset_ntf)\n-\t\tice_dpll_pins_notify_mask(d->inputs, d->num_inputs,\n+\t\tice_dpll_pins_notify_mask(d, d->inputs, d->num_inputs,\n \t\t\t\t\t  phase_offset_ntf);\n \n resched:\n","prefixes":["iwl-net","v7","2/3"]}