From nobody Tue Feb 10 02:49:48 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF5BE3396E6; Wed, 28 Jan 2026 08:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590197; cv=none; b=dpFwEbov7CCOBRvxstZFVdc5T84xlHLtwGHmj8EXpoct34bEdlW9EDgAvZQzIUUdeD7k6Zla1M4+7Oqqnr5bUUitiiMms4ArL1lrBw2AHTBUOxQ0JutGdSSgjkeZ2xRoYBx2pletgkM9zx2Un5CkxT9Bt7YY919le6Mt0T77Xvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590197; c=relaxed/simple; bh=POOrLQ7MmklMY5XTpUxtW8dqPF4Tvcgft6k5w8JnMlE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pWhDT5UM3qIHXJ+ytSEudQa0xKCfQlDcqi4/czb6kVjxB27wc+/ijo3HVtUx6pYcAng21CZoh0Ly5PWMHsP0h7jNmELnb5W51FlhMUhsYlmgn/nMw7Q9tx8xlfSyvRdvFUFdsoxorRYn6FWOHKetEgOW3oggpC/oItuxsuSGXwo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tEg9vszD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tEg9vszD" Received: by smtp.kernel.org (Postfix) with ESMTPS id 74133C2BCAF; Wed, 28 Jan 2026 08:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769590197; bh=POOrLQ7MmklMY5XTpUxtW8dqPF4Tvcgft6k5w8JnMlE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=tEg9vszDuW1kv1ToIAwHlG+dwwZK/yrjOu1gaooKQuDfJvRhxDmFQl/dXVHNIH0Fc 0AWXjiBNsxGpxGSFsQpWb3u+f2E8QKPYyBdLiTbDlwbb4lxQFjA3AXehSTETKpgrdT xt7dpKSCT9PLGJnWz8nL2lPSdFK92l1RXez6d2nnEsxaJ7qGCsimscHau5m3K+VRKP V6XkIwVk3sJHGLffTfzNdDs+VjupxSrNERu+u7mNLWHmCzcjEA+RmzvNQbVKxaLrIG 7R3/LhnP6lK8PmQxnm7GAzFSE0mPB8eeLgJJKMqaYEt7xreXyB2KWjkXdMfLuiXApC A/56EeaKbkrAw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B5ED35693; Wed, 28 Jan 2026 08:49:57 +0000 (UTC) From: Jan Petrous via B4 Relay Date: Wed, 28 Jan 2026 09:49:52 +0100 Subject: [PATCH v4 1/4] net: stmmac: platform: read channels irq Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260128-dwmac_multi_irq-v4-1-82fa34fcf2f2@oss.nxp.com> References: <20260128-dwmac_multi_irq-v4-0-82fa34fcf2f2@oss.nxp.com> In-Reply-To: <20260128-dwmac_multi_irq-v4-0-82fa34fcf2f2@oss.nxp.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , NXP S32 Linux Team , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org, "Jan Petrous (OSS)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769590195; l=2269; i=jan.petrous@oss.nxp.com; s=20240922; h=from:subject:message-id; bh=qCsESZBMy89pwsWTlxW82yylaPKe2lczm3jPGKQ5OYY=; b=VTScslSigOVSXikeYjCNy8XZUc/zMqLNQ9WJMKt8jU5KLP3y90Unql11i5nx3T1X3ZSd/vrIG 1jaXsww1JA4BX8KFy5E+Slg2CCyUubJAciN3Zyn4yTuZv/pgWluT4G+ X-Developer-Key: i=jan.petrous@oss.nxp.com; a=ed25519; pk=Ke3wwK7rb2Me9UQRf6vR8AsfJZfhTyoDaxkUCqmSWYY= X-Endpoint-Received: by B4 Relay for jan.petrous@oss.nxp.com/20240922 with auth_id=217 X-Original-From: "Jan Petrous (OSS)" Reply-To: jan.petrous@oss.nxp.com From: "Jan Petrous (OSS)" Read IRQ resources for all rx/tx channels, to allow Multi-IRQ mode for platform glue drivers. Reviewed-by: Matthias Brugger Signed-off-by: Jan Petrous (OSS) --- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 ++++++++++++++++++= +++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8979a50b5507..94854bfb6e0d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -700,6 +700,9 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); int stmmac_get_platform_resources(struct platform_device *pdev, struct stmmac_resources *stmmac_res) { + char name[16]; + int i; + memset(stmmac_res, 0, sizeof(*stmmac_res)); =20 /* Get IRQ information early to have an ability to ask for deferred @@ -743,7 +746,40 @@ int stmmac_get_platform_resources(struct platform_devi= ce *pdev, =20 stmmac_res->addr =3D devm_platform_ioremap_resource(pdev, 0); =20 - return PTR_ERR_OR_ZERO(stmmac_res->addr); + if (IS_ERR(stmmac_res->addr)) + return PTR_ERR(stmmac_res->addr); + + /* RX channels irq */ + for (i =3D 0; i < MTL_MAX_RX_QUEUES; i++) { + scnprintf(name, sizeof(name), "rx-queue-%d", i); + stmmac_res->rx_irq[i] =3D platform_get_irq_byname_optional(pdev, + name); + if (stmmac_res->rx_irq[i] <=3D 0) { + if (stmmac_res->rx_irq[i] =3D=3D -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_dbg(&pdev->dev, "IRQ rx-queue-%d not found\n", i); + + /* Stop on first unset rx-queue-%i property member */ + break; + } + } + + /* TX channels irq */ + for (i =3D 0; i < MTL_MAX_TX_QUEUES; i++) { + scnprintf(name, sizeof(name), "tx-queue-%d", i); + stmmac_res->tx_irq[i] =3D platform_get_irq_byname_optional(pdev, + name); + if (stmmac_res->tx_irq[i] <=3D 0) { + if (stmmac_res->tx_irq[i] =3D=3D -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_dbg(&pdev->dev, "IRQ tx-queue-%d not found\n", i); + + /* Stop on first unset tx-queue-%i property member */ + break; + } + } + + return 0; } EXPORT_SYMBOL_GPL(stmmac_get_platform_resources); =20 --=20 2.47.0