{"id":2222822,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2222822/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260413191420.3524013-1-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":"<20260413191420.3524013-1-poros@redhat.com>","list_archive_url":null,"date":"2026-04-13T19:14:20","name":"[iwl-net] ice: fix infinite recursion in ice_cfg_tx_topo via ice_init_dev_hw","commit_ref":null,"pull_url":null,"state":"under-review","archived":false,"hash":"2decfc71b6924b660a480eba05ecc9169487cbf8","submitter":{"id":74657,"url":"http://patchwork.ozlabs.org/api/1.2/people/74657/?format=json","name":"Petr Oros","email":"poros@redhat.com"},"delegate":{"id":109701,"url":"http://patchwork.ozlabs.org/api/1.2/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/20260413191420.3524013-1-poros@redhat.com/mbox/","series":[{"id":499743,"url":"http://patchwork.ozlabs.org/api/1.2/series/499743/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499743","date":"2026-04-13T19:14:20","name":"[iwl-net] ice: fix infinite recursion in ice_cfg_tx_topo via ice_init_dev_hw","version":1,"mbox":"http://patchwork.ozlabs.org/series/499743/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222822/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222822/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=l4V+C+/g;\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 4fvcY32fRSz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 05:14:45 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id C064960EF1;\n\tMon, 13 Apr 2026 19:14:42 +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 0gS-31pKYhna; Mon, 13 Apr 2026 19:14:42 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id EF41C60EE6;\n\tMon, 13 Apr 2026 19:14:41 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists1.osuosl.org (Postfix) with ESMTP id 8038A237\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 19:14:40 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 6571B8333F\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 19:14:40 +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 jnPyvX3bPsYu for <intel-wired-lan@lists.osuosl.org>;\n Mon, 13 Apr 2026 19:14:39 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 4E9FE82EE1\n for <intel-wired-lan@lists.osuosl.org>; Mon, 13 Apr 2026 19:14:38 +0000 (UTC)","from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-pfaZ9RXNNJmSVKi3RakdHg-1; Mon,\n 13 Apr 2026 15:14:34 -0400","from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 445621800245; Mon, 13 Apr 2026 19:14:28 +0000 (UTC)","from ShadowPeak.redhat.com (unknown [10.44.32.25])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 4384E19560AB; Mon, 13 Apr 2026 19:14: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 EF41C60EE6","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4E9FE82EE1"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776107682;\n\tbh=pYt1tOgdZFbK6/EN+WXYPhu9UbbK6FxljyO9OAvK7X4=;\n\th=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:Cc:From;\n\tb=l4V+C+/gj78vGVg5KqR03w3BP3+Otgvr+gEP11pzY9L8zt4IsmNqX3WniZFkCZUBr\n\t sXs63wUf5f05dQq9qgWJ0UjqkieoMk2JHR9fz1nPGa3U2XyYazt6qIt0p0qFFAEsu6\n\t l9BmLF/qVRWHdjwEbsHOmZfdeBb3OdSzEG+2yPFj6ALxL8BkmfkDJ9EiMvCCVby9m6\n\t M5ave5gBa8bKHm6YJggh4CLNhUN23mlUUkIEcnF66R1Yi8paRF3ZaJ3bRoYsDqjFP3\n\t OeZ2dsaVKgZ/L53TDQBqZkP6VVVrcQMGPtHjg2TcE12SD/M5GpTIN74+9C5H6d0HMt\n\t TP7T76aP8UEkg==","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 smtp1.osuosl.org 4E9FE82EE1","X-MC-Unique":"pfaZ9RXNNJmSVKi3RakdHg-1","X-Mimecast-MFC-AGG-ID":"pfaZ9RXNNJmSVKi3RakdHg_1776107668","From":"Petr Oros <poros@redhat.com>","To":"netdev@vger.kernel.org","Date":"Mon, 13 Apr 2026 21:14:20 +0200","Message-ID":"<20260413191420.3524013-1-poros@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.12","X-Mimecast-MFC-PROC-ID":"q0C8J84Y_NYtoeyRYcEc4uFgsST5p62oluXZHf_ZzYo_1776107668","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=1776107677;\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=pYt1tOgdZFbK6/EN+WXYPhu9UbbK6FxljyO9OAvK7X4=;\n b=bbC/J+41x1PoeRoAgs2maQ0pz8/Xr2E4U/CLx3WLFfBFoOz8pGqdcltfiJRoGCVM5Vc1Tl\n m02vtFOtn+ujLQB4vdkDjidF/lkq047ya74TwfUWlD+Wp4xpH+cB/upYYdoV8vSnWzEyfb\n YNfRXo4JTs3DoExnltbuz74Vrs/Ving=","X-Mailman-Original-Authentication-Results":["smtp1.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp1.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=bbC/J+41"],"Subject":"[Intel-wired-lan] [PATCH iwl-net] ice: fix infinite recursion in\n ice_cfg_tx_topo via ice_init_dev_hw","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":"Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,\n Paul Greenwalt <paul.greenwalt@intel.com>,\n Daniel Zahka <daniel.zahka@gmail.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Nikolay Aleksandrov <razor@blackwall.org>,\n Eric Dumazet <edumazet@google.com>,\n linux-kernel@vger.kernel.org,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Dave Ertman <david.m.ertman@intel.com>, jacob.e.keller@intel.com,\n Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,\n \"David S. Miller\" <davem@davemloft.net>, intel-wired-lan@lists.osuosl.org","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"On certain E810 configurations where firmware supports Tx scheduler\ntopology switching (tx_sched_topo_comp_mode_en), ice_cfg_tx_topo()\nmay need to apply a new 5-layer or 9-layer topology from the DDP\npackage. If the AQ command to set the topology fails (e.g. due to\ninvalid DDP data or firmware limitations), the global configuration\nlock must still be cleared via a CORER reset.\n\nCommit 86aae43f21cf (\"ice: don't leave device non-functional if Tx\nscheduler config fails\") correctly fixed this by refactoring\nice_cfg_tx_topo() to always trigger CORER after acquiring the global\nlock and re-initialize hardware via ice_init_hw() afterwards.\n\nHowever, commit 8a37f9e2ff40 (\"ice: move ice_deinit_dev() to the end\nof deinit paths\") later moved ice_init_dev_hw() into ice_init_hw(),\nbreaking the reinit path introduced by 86aae43f21cf. This creates an\ninfinite recursive call chain:\n\n  ice_init_hw()\n    ice_init_dev_hw()\n      ice_cfg_tx_topo()         # topology change needed\n        ice_deinit_hw()\n        ice_init_hw()           # reinit after CORER\n          ice_init_dev_hw()     # recurse\n            ice_cfg_tx_topo()\n              ...               # stack overflow\n\nFix by moving ice_init_dev_hw() back out of ice_init_hw() and calling\nit explicitly from ice_probe() and ice_devlink_reinit_up(). The third\ncaller, ice_cfg_tx_topo(), intentionally does not need ice_init_dev_hw()\nduring its reinit, it only needs the core HW reinitialization. This\nbreaks the recursion cleanly without adding flags or guards.\n\nThe deinit ordering changes from commit 8a37f9e2ff40 (\"ice: move\nice_deinit_dev() to the end of deinit paths\") which fixed slow rmmod\nare preserved, only the init-side placement of ice_init_dev_hw() is\nreverted.\n\nFixes: 8a37f9e2ff40 (\"ice: move ice_deinit_dev() to the end of deinit paths\")\nSigned-off-by: Petr Oros <poros@redhat.com>\n---\n drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 ++\n drivers/net/ethernet/intel/ice/ice_common.c      | 2 --\n drivers/net/ethernet/intel/ice/ice_main.c        | 2 ++\n 3 files changed, 4 insertions(+), 2 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c b/drivers/net/ethernet/intel/ice/devlink/devlink.c\nindex 6144cee8034d77..641d6e289d5ce6 100644\n--- a/drivers/net/ethernet/intel/ice/devlink/devlink.c\n+++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c\n@@ -1245,6 +1245,8 @@ static int ice_devlink_reinit_up(struct ice_pf *pf)\n \t\treturn err;\n \t}\n \n+\tice_init_dev_hw(pf);\n+\n \t/* load MSI-X values */\n \tice_set_min_max_msix(pf);\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex ce11fea122d03e..b617a6bff89134 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -1126,8 +1126,6 @@ int ice_init_hw(struct ice_hw *hw)\n \tif (status)\n \t\tgoto err_unroll_fltr_mgmt_struct;\n \n-\tice_init_dev_hw(hw->back);\n-\n \tmutex_init(&hw->tnl_lock);\n \tice_init_chk_recipe_reuse_support(hw);\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex e2a5534819d194..a27be29f9bbbfc 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -5314,6 +5314,8 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)\n \t\treturn err;\n \t}\n \n+\tice_init_dev_hw(pf);\n+\n \tadapter = ice_adapter_get(pdev);\n \tif (IS_ERR(adapter)) {\n \t\terr = PTR_ERR(adapter);\n","prefixes":["iwl-net"]}