From: Jakub Kicinski <kuba@kernel.org>
To: jan.petrous@oss.nxp.com
Cc: Jakub Kicinski <kuba@kernel.org>,
robh@kernel.org, linux-stm32@st-md-mailman.stormreply.com,
conor+dt@kernel.org, devicetree@vger.kernel.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
mcoquelin.stm32@gmail.com, kernel@pengutronix.de,
pabeni@redhat.com, edumazet@google.com, andrew+netdev@lunn.ch,
chester62515@gmail.com, s32@nxp.com,
linux-kernel@vger.kernel.org, ghennadi.procopciuc@oss.nxp.com,
festevam@gmail.com, alexandre.torgue@foss.st.com,
davem@davemloft.net, krzk+dt@kernel.org, mbrugger@suse.com,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
imx@lists.linux.dev
Subject: Re: [v3,4/4] stmmac: s32: enable support for Multi-IRQ mode
Date: Sun, 25 Jan 2026 14:14:05 -0800 [thread overview]
Message-ID: <20260125221405.3395497-1-kuba@kernel.org> (raw)
In-Reply-To: <20260123-dwmac_multi_irq-v3-4-cc53f2be8961@oss.nxp.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
stmmac: s32: enable support for Multi-IRQ mode
This patch enables Multi-IRQ mode for the S32 DWMAC driver when both
multi-queue and per-queue IRQs are configured. The driver now selects
between Multi-IRQ and MAC IRQ modes based on device tree configuration.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> index 5a485ee98fa7..342091045714 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
[ ... ]
> @@ -149,6 +149,16 @@ 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)) {
^^^^ ^^^^
Should these checks be "> 0" instead of ">= 0"?
stmmac_get_platform_resources() initializes the res structure with
memset(0), then only writes positive IRQ values when per-queue IRQs are
found in the device tree. If no "rx-queue-0" or "tx-queue-0" interrupt
names are defined, rx_irq[0] and tx_irq[0] remain 0 from the memset.
Since 0 >= 0 evaluates to true, this condition will enable Multi-IRQ
mode even when no per-queue IRQs are available. The commit message states
that "queue based IRQs are set" is a prerequisite, but the current check
does not properly verify this.
> + plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> + dev_info(dev, "Multi-IRQ mode (per queue IRQ) selected\n");
[ ... ]
--
pw-bot: cr
next prev parent reply other threads:[~2026-01-25 22:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 10:09 [PATCH v3 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay
2026-01-23 10:09 ` [PATCH v3 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay
2026-01-23 10:09 ` [PATCH v3 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay
2026-01-23 17:13 ` Conor Dooley
2026-01-26 12:46 ` Jan Petrous
2026-01-26 20:00 ` Conor Dooley
2026-01-27 12:51 ` Jan Petrous
2026-01-27 19:32 ` Conor Dooley
2026-01-23 10:09 ` [PATCH v3 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay
2026-01-23 10:09 ` [PATCH v3 4/4] stmmac: s32: enable support for Multi-IRQ mode Jan Petrous via B4 Relay
2026-01-25 22:14 ` Jakub Kicinski [this message]
2026-01-27 13:08 ` [v3,4/4] " Jan Petrous
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=20260125221405.3395497-1-kuba@kernel.org \
--to=kuba@kernel.org \
--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=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mbrugger@suse.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