[v3,4/4] stmmac: s32: enable support for Multi-IRQ mode
Jakub Kicinski
kuba at kernel.org
Sun Jan 25 14:14:05 PST 2026
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
More information about the linux-arm-kernel
mailing list