From a7c44619c6977fd64da99a6d1c2b73e2ad9af873 Mon Sep 17 00:00:00 2001 From: Florian Bezdeka Date: Mon, 10 Aug 2026 15:19:17 +0200 Subject: [PATCH] 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. Link: https://lore.kernel.org/netdev/27fec7d0ed633218a7787be3edce63c3038c63e2.camel@mailbox.org/ Link: https://lore.kernel.org/netdev/7e024db2557a4d5822a0dd409ae678d10d815d9c.camel@mailbox.org/ Signed-off-by: Florian Bezdeka Link: https://patch.msgid.link/20260810-flo-net-stmmac-default-affinity-core-v2-1-d2105780b8ca@siemens.com Signed-off-by: Jakub Kicinski --- 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 4d207f41a43b..f5f9fa67ecd7 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