[PATCH net-next v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls
From: Florian Bezdeka
Date: Mon Aug 10 2026 - 09:26:48 EST
The IRQ vectors allocated in stmmac_config_multi_msi() or
stmmac_config_single_msi() where never explicitly cleaned up. As
pcim_enable_device() is used, all sorts of other functions are switched
to managed mode. The missing cleanup here isn't actually missing, it's
buried in the depths of PCI code.
But: There are some ongoing activities to remove that cleanup magic.
See the linked discussions below.
This patch prepares the dwmac-intel code for the removal.
Link: https://lore.kernel.org/netdev/27fec7d0ed633218a7787be3edce63c3038c63e2.camel@xxxxxxxxxxx/
Link: https://lore.kernel.org/netdev/7e024db2557a4d5822a0dd409ae678d10d815d9c.camel@xxxxxxxxxxx/
Signed-off-by: Florian Bezdeka <florian.bezdeka@xxxxxxxxxxx>
---
Hi all,
This are some fallouts of a quick stmmac "review", while trying to
understand some issues that we have around the IRQ spreading implemented
by stmmac.
The root cause turned out to be something more generic, so not limited
to stmmac. I will try to prepare a discussion starting point later. This
is more a RT specific problem, so I have to bring in more people.
---
Changes in v2:
- Patch 1: Rework patch description as suggested by Russell
- Patch 2: Drop, will be handled separately
- Link to v1: https://lore.kernel.org/r/20260210-flo-net-stmmac-default-affinity-core-v1-0-4e76612444e1@xxxxxxxxxxx
---
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 4d207f41a43b3eac64b6ae269765590107f1b30b..f5f9fa67ecd77f6b8a9b5ad5b39f338c4ba49a5f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -1348,6 +1348,7 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
err_alloc_irq:
clk_disable_unprepare(plat->stmmac_clk);
clk_unregister_fixed_rate(plat->stmmac_clk);
+ pci_free_irq_vectors(pdev);
return ret;
}
@@ -1367,6 +1368,7 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)
clk_disable_unprepare(priv->plat->stmmac_clk);
clk_unregister_fixed_rate(priv->plat->stmmac_clk);
+ pci_free_irq_vectors(pdev);
}
#define PCI_DEVICE_ID_INTEL_QUARK 0x0937
---
base-commit: aa2e13ae8d3cbe2c15ef4f7e971b2de0832794aa
change-id: 20260119-flo-net-stmmac-default-affinity-core-c54fa45fe63d
Best regards,
--
Florian Bezdeka <florian.bezdeka@xxxxxxxxxxx>