net: stmmac: intel: Add missing pci_free_irq_vectors() calls
Subsystems (4)
PATCH v2 1/1 net: stmmac: intel: Add missing pci_free_irq_vectors() calls
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.
---
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@siemens.com
--- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +2 -0
@@ -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,
Signature · 1 line
Florian Bezdeka <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 10 Aug 2026 15:19:17 +0200 you wrote:
The IRQ vectors allocated in
stmmac_config_multi_msi()orstmmac_config_single_msi()where never explicitly cleaned up. Aspcim_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.
[...]
Here is the summary with links:
- [net-next,v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls
https://git.kernel.org/netdev/net-next/c/a7c44619c697
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html