From: Matthias Brugger <mbrugger@suse.com>
To: jan.petrous@oss.nxp.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Chester Lin <chester62515@gmail.com>,
Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>,
NXP S32 Linux Team <s32@nxp.com>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
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
Subject: Re: [PATCH RFC v2 4/4] stmmac: s32: enable support for Multi-IRQ mode
Date: Wed, 21 Jan 2026 17:16:54 +0100 [thread overview]
Message-ID: <1e2d0c75-35d1-4096-a96f-c3fc6f7ce52a@suse.com> (raw)
In-Reply-To: <20260121-dwmac_multi_irq-v2-4-3b829230d071@oss.nxp.com>
On 21/01/2026 15:23, Jan Petrous via B4 Relay wrote:
> From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com>
>
> To get enabled Multi-IRQ mode, the driver checks:
>
> 1) property of 'snps,mtl-xx-config' subnode
> defines 'snps,xx-queues-to-use' bigger then one, ie:
>
> ethernet@4033c000 {
> compatible = "nxp,s32g2-dwmac";
> ...
> snps,mtl-rx-config = <&mtl_rx_setup>;
> ...
>
> mtl_rx_setup: rx-queues-config {
> snps,rx-queues-to-use = <2>;
> };
>
> 2) queue based IRQs are set, ie:
>
> ethernet@4033c000 {
> compatible = "nxp,s32g2-dwmac";
> ...
> interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
> /* CHN 0: tx, rx */
> <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
> <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
> /* CHN 1: tx, rx */
> <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
> <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
> interrupt-names = "macirq",
> "tx-queue-0", "rx-queue-0",
> "tx-queue-1", "rx-queue-1";
>
> If those prerequisites are met, the driver switch to Multi-IRQ mode,
> using per-queue IRQs for rx/tx data pathr:
>
> [ 1.387045] s32-dwmac 4033c000.ethernet: Multi-IRQ mode (per queue IRQ) selected
>
> Now the driver owns all queues IRQs:
>
> root@s32g399aevb3:~# grep eth /proc/interrupts
> 29: 0 0 0 0 0 0 0 0 GICv3 89 Level eth0:mac
> 30: 0 0 0 0 0 0 0 0 GICv3 91 Level eth0:rx-0
> 31: 0 0 0 0 0 0 0 0 GICv3 93 Level eth0:rx-1
> 32: 0 0 0 0 0 0 0 0 GICv3 95 Level eth0:rx-2
> 33: 0 0 0 0 0 0 0 0 GICv3 97 Level eth0:rx-3
> 34: 0 0 0 0 0 0 0 0 GICv3 99 Level eth0:rx-4
> 35: 0 0 0 0 0 0 0 0 GICv3 90 Level eth0:tx-0
> 36: 0 0 0 0 0 0 0 0 GICv3 92 Level eth0:tx-1
> 37: 0 0 0 0 0 0 0 0 GICv3 94 Level eth0:tx-2
> 38: 0 0 0 0 0 0 0 0 GICv3 96 Level eth0:tx-3
> 39: 0 0 0 0 0 0 0 0 GICv3 98 Level eth0:tx-4
>
> Otherwise, if one of the prerequisite don't met, the driver
> continue with MAC IRQ mode:
>
> [ 1.387045] s32-dwmac 4033c000.ethernet: MAC IRQ mode selected
>
> And only MAC IRQ will be attached:
>
> root@s32g399aevb3:~# grep eth /proc/interrupts
> 29: 0 0 0 0 0 0 0 0 GICv3 89 Level eth0:mac
>
> What represents the original MAC IRQ mode and is fully backward
> compatible.
>
> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> index 5a485ee98fa7..823700219534 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> @@ -2,7 +2,7 @@
> /*
> * NXP S32G/R GMAC glue layer
> *
> - * Copyright 2019-2024 NXP
> + * Copyright 2019-2026 NXP
> *
> */
>
> @@ -149,6 +149,17 @@ static int s32_dwmac_probe(struct platform_device *pdev)
> plat->core_type = DWMAC_CORE_GMAC4;
> plat->pmt = 1;
> plat->flags |= STMMAC_FLAG_SPH_DISABLE;
> +
> + /* Check for multi-IRQ config. Assumption: symetrical rx/tx queues */
> + if (plat->rx_queues_to_use > 1 &&
> + (res.rx_irq[0] >= 0 || res.tx_irq[0] >= 0)) {
> + plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> + dev_info(dev, "Multi-IRQ mode (per queue IRQ) selected\n");
> + } else {
> + dev_info(dev, "MAC IRQ mode selected\n");
> + }
> +
> + plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> plat->rx_fifo_size = 20480;
> plat->tx_fifo_size = 20480;
>
>
prev parent reply other threads:[~2026-01-21 16:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 14:23 [PATCH RFC v2 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay
2026-01-21 14:23 ` [PATCH RFC v2 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay
2026-01-21 16:14 ` Matthias Brugger
2026-01-21 14:23 ` [PATCH RFC v2 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay
2026-01-21 16:14 ` Matthias Brugger
2026-01-21 14:23 ` [PATCH RFC v2 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay
2026-01-21 16:15 ` Matthias Brugger
2026-01-21 14:23 ` [PATCH RFC v2 4/4] stmmac: s32: enable support for Multi-IRQ mode Jan Petrous via B4 Relay
2026-01-21 16:16 ` Matthias Brugger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e2d0c75-35d1-4096-a96f-c3fc6f7ce52a@suse.com \
--to=mbrugger@suse.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=chester62515@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=ghennadi.procopciuc@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=jan.petrous@oss.nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox