{"id":2220879,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2220879/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260408110504.1032879-1-poros@redhat.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.1/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":""},"msgid":"<20260408110504.1032879-1-poros@redhat.com>","date":"2026-04-08T11:05:04","name":"[iwl-net,v2] ice: fix SMA and U.FL pin state changes affecting paired pin","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"2593dc1b3643b4fc6c6767d7bc7af84ffcbf9eab","submitter":{"id":74657,"url":"http://patchwork.ozlabs.org/api/1.1/people/74657/?format=json","name":"Petr Oros","email":"poros@redhat.com"},"delegate":{"id":109701,"url":"http://patchwork.ozlabs.org/api/1.1/users/109701/?format=json","username":"anguy11","first_name":"Anthony","last_name":"Nguyen","email":"anthony.l.nguyen@intel.com"},"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260408110504.1032879-1-poros@redhat.com/mbox/","series":[{"id":499119,"url":"http://patchwork.ozlabs.org/api/1.1/series/499119/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499119","date":"2026-04-08T11:05:04","name":"[iwl-net,v2] ice: fix SMA and U.FL pin state changes affecting paired pin","version":2,"mbox":"http://patchwork.ozlabs.org/series/499119/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2220879/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2220879/checks/","tags":{},"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=groWG50K;\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 4frL074RxNz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 21:08:23 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 3BBDB822BD;\n\tWed,  8 Apr 2026 11:08:21 +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 Kfdoo96PMTlZ; Wed,  8 Apr 2026 11:08:20 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 6A62F822B7;\n\tWed,  8 Apr 2026 11:08:20 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id BBA842C7\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 11:08:18 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id A518660810\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 11:08: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 ftkfoVnzA4Z8 for <intel-wired-lan@lists.osuosl.org>;\n Wed,  8 Apr 2026 11:08:17 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 8435460805\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 11:08:16 +0000 (UTC)","from mx-prod-mc-03.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-29-uv3yoqhQMdeNODp07RMQCA-1; Wed,\n 08 Apr 2026 07:08:12 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 36615195605C; Wed,  8 Apr 2026 11:08:10 +0000 (UTC)","from ShadowPeak.redhat.com (unknown [10.44.48.174])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 45FF81955D84; Wed,  8 Apr 2026 11:08:05 +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 smtp1.osuosl.org 6A62F822B7","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8435460805"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1775646500;\n\tbh=eHfeMlveuGcx7hW6Gtzk+PwguxJpEiOHLrc6d7D9JwM=;\n\th=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:Cc:From;\n\tb=groWG50KEIcvbsbKNId8dyvrmHI5lezqKj2HoE6cAg95OvGlxrCN5B9RtchTDt9jO\n\t sIZaoWetsgZdjpUOCqltHK/Z2DSEmNbq1rjwld547bOqR7bwJDUxa3UtUmt/A/pXev\n\t Jod7shrXZNACiu4SgQgKxTC09TQcQBomJmWaWdURzDhInHZ+ao1MTE3wTkaVt694B/\n\t sLXmUrXx7r2iJ2Tkza9RU2bwqacxGYI+SBplraOU1J/qFpC7t8SrpYZyT+z9qOc1P3\n\t YziPCKSZYvqhzn0fSVsM+XNUKFtDt60Wt/yKdJgZSrj8b6aG3IHSwZRd3+iVPR1JKC\n\t yJ3CotEolB+mg==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.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 8435460805","X-MC-Unique":"uv3yoqhQMdeNODp07RMQCA-1","X-Mimecast-MFC-AGG-ID":"uv3yoqhQMdeNODp07RMQCA_1775646490","From":"Petr Oros <poros@redhat.com>","To":"netdev@vger.kernel.org","Date":"Wed,  8 Apr 2026 13:05:04 +0200","Message-ID":"<20260408110504.1032879-1-poros@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","X-Mimecast-MFC-PROC-ID":"CyXuwUGAUm7iQKrd14TAgiQDVgGqVYmXtA_TWJU2zcs_1775646490","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=1775646495;\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 bh=eHfeMlveuGcx7hW6Gtzk+PwguxJpEiOHLrc6d7D9JwM=;\n b=UMQ/GYsyF5AeYZfIwjpHLRnBbzsvoslLkO3LR1rX3l+yDXgge1L4zoJ+dMMmKTrdBpM1PJ\n XCp3wFeiCzlbF9DGo5yFoil0ujbMhbLW9UknBGoAHp/q0hswmEvXxjUK0DDNYQ+dSMZaod\n UiJn95SIRygPdg2GAgLEFXkkv+F9cuE=","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,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=UMQ/GYsy"],"Subject":"[Intel-wired-lan] [PATCH iwl-net v2] ice: fix SMA and U.FL pin\n state changes affecting paired pin","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":"Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Eric Dumazet <edumazet@google.com>,\n Arkadiusz Kubalewski <arkadiusz.kubalewski@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 Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,\n \"David S. Miller\" <davem@davemloft.net>, linux-kernel@vger.kernel.org","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"SMA and U.FL pins share physical signal paths in pairs (SMA1/U.FL1 and\nSMA2/U.FL2) controlled by the PCA9575 GPIO expander.  Each pair can\nonly have one active pin at a time: SMA1 output and U.FL1 output share\nthe same CGU output, SMA2 input and U.FL2 input share the same CGU\ninput.  The PCA9575 register bits determine which connector in each\npair owns the signal path.\n\nThe driver does not account for this pairing in two places:\n\nice_dpll_ufl_pin_state_set() modifies PCA9575 bits and disables the\nbacking CGU pin without checking whether the U.FL pin is currently\nactive.  Disconnecting an already inactive U.FL pin flips bits that\nthe paired SMA pin relies on, breaking its connection.\n\nice_dpll_sma_direction_set() does not propagate direction changes to\nthe paired U.FL pin.  For SMA2/U.FL2 the ICE_SMA2_UFL2_RX_DIS bit is\nnever managed, so U.FL2 stays disconnected after SMA2 switches to\noutput.  For both pairs the backing CGU pin of the U.FL side is never\nenabled when a direction change activates it, so userspace sees the\npin as disconnected even though the routing is correct.\n\nFix by guarding the U.FL disconnect path against inactive pins and by\nupdating the paired U.FL pin fully on SMA direction changes: manage\nICE_SMA2_UFL2_RX_DIS for the SMA2/U.FL2 pair and enable the backing\nCGU pin whenever the peer becomes active.\n\nFixes: 2dd5d03c77e2 (\"ice: redesign dpll sma/u.fl pins control\")\nSigned-off-by: Petr Oros <poros@redhat.com>\n---\nv2:\n - fix ice_dpll_sma_direction_set() to manage ICE_SMA2_UFL2_RX_DIS\n   when SMA2 direction changes\n - enable paired U.FL backing CGU pin when direction change makes\n   it active, so it reports as connected immediately\n - (both reported by Intel test on the SMA init and notification\n   patch threads)\nv1: https://lore.kernel.org/all/20260325151050.2081977-1-poros@redhat.com/\n---\n drivers/net/ethernet/intel/ice/ice_dpll.c | 50 ++++++++++++++++++++++-\n 1 file changed, 49 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c\nindex 498ec2c045f384..3f8cd5b8298b57 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dpll.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c\n@@ -1171,6 +1171,8 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p,\n \t\t\t\t      enum dpll_pin_direction direction,\n \t\t\t\t      struct netlink_ext_ack *extack)\n {\n+\tstruct ice_dplls *d = &p->pf->dplls;\n+\tstruct ice_dpll_pin *peer;\n \tu8 data;\n \tint ret;\n \n@@ -1189,8 +1191,9 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p,\n \tcase ICE_DPLL_PIN_SW_2_IDX:\n \t\tif (direction == DPLL_PIN_DIRECTION_INPUT) {\n \t\t\tdata &= ~ICE_SMA2_DIR_EN;\n+\t\t\tdata |= ICE_SMA2_UFL2_RX_DIS;\n \t\t} else {\n-\t\t\tdata &= ~ICE_SMA2_TX_EN;\n+\t\t\tdata &= ~(ICE_SMA2_TX_EN | ICE_SMA2_UFL2_RX_DIS);\n \t\t\tdata |= ICE_SMA2_DIR_EN;\n \t\t}\n \t\tbreak;\n@@ -1202,6 +1205,34 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p,\n \t\tret = ice_dpll_pin_state_update(p->pf, p,\n \t\t\t\t\t\tICE_DPLL_PIN_TYPE_SOFTWARE,\n \t\t\t\t\t\textack);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* When a direction change activates the paired U.FL pin, enable\n+\t * its backing CGU pin so the pin reports as connected. Without\n+\t * this the U.FL routing is correct but the CGU pin stays disabled\n+\t * and userspace sees the pin as disconnected.  Do not disable the\n+\t * backing pin when U.FL becomes inactive because the SMA pin may\n+\t * still be using it.\n+\t */\n+\tpeer = &d->ufl[p->idx];\n+\tif (peer->active) {\n+\t\tstruct ice_dpll_pin *target;\n+\t\tenum ice_dpll_pin_type type;\n+\n+\t\tif (peer->output) {\n+\t\t\ttarget = peer->output;\n+\t\t\ttype = ICE_DPLL_PIN_TYPE_OUTPUT;\n+\t\t} else {\n+\t\t\ttarget = peer->input;\n+\t\t\ttype = ICE_DPLL_PIN_TYPE_INPUT;\n+\t\t}\n+\t\tret = ice_dpll_pin_enable(&p->pf->hw, target,\n+\t\t\t\t\t  d->eec.dpll_idx, type, extack);\n+\t\tif (!ret)\n+\t\t\tret = ice_dpll_pin_state_update(p->pf, target,\n+\t\t\t\t\t\t\ttype, extack);\n+\t}\n \n \treturn ret;\n }\n@@ -1253,6 +1284,14 @@ ice_dpll_ufl_pin_state_set(const struct dpll_pin *pin, void *pin_priv,\n \t\t\tdata &= ~ICE_SMA1_MASK;\n \t\t\tenable = true;\n \t\t} else if (state == DPLL_PIN_STATE_DISCONNECTED) {\n+\t\t\t/* Skip if U.FL1 is not active, setting TX_EN\n+\t\t\t * while DIR_EN is set would also deactivate\n+\t\t\t * the paired SMA1 output.\n+\t\t\t */\n+\t\t\tif (data & (ICE_SMA1_DIR_EN | ICE_SMA1_TX_EN)) {\n+\t\t\t\tret = 0;\n+\t\t\t\tgoto unlock;\n+\t\t\t}\n \t\t\tdata |= ICE_SMA1_TX_EN;\n \t\t\tenable = false;\n \t\t} else {\n@@ -1267,6 +1306,15 @@ ice_dpll_ufl_pin_state_set(const struct dpll_pin *pin, void *pin_priv,\n \t\t\tdata &= ~ICE_SMA2_UFL2_RX_DIS;\n \t\t\tenable = true;\n \t\t} else if (state == DPLL_PIN_STATE_DISCONNECTED) {\n+\t\t\t/* Skip if U.FL2 is not active, setting\n+\t\t\t * UFL2_RX_DIS could also disable the paired\n+\t\t\t * SMA2 input.\n+\t\t\t */\n+\t\t\tif (!(data & ICE_SMA2_DIR_EN) ||\n+\t\t\t    (data & ICE_SMA2_UFL2_RX_DIS)) {\n+\t\t\t\tret = 0;\n+\t\t\t\tgoto unlock;\n+\t\t\t}\n \t\t\tdata |= ICE_SMA2_UFL2_RX_DIS;\n \t\t\tenable = false;\n \t\t} else {\n","prefixes":["iwl-net","v2"]}