Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls
@ 2026-08-10 13:19 Florian Bezdeka
  2026-08-14  3:24 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Bezdeka @ 2026-08-10 13:19 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Ong Boon Leong,
	Voon Weifeng
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Florian Bezdeka

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 <florian.bezdeka@siemens.com>
---
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(+)

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@siemens.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls
  2026-08-10 13:19 [PATCH net-next v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls Florian Bezdeka
@ 2026-08-14  3:24 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-14  3:24 UTC (permalink / raw)
  To: Florian Bezdeka
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
	alexandre.torgue, boon.leong.ong, weifeng.voon, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 10 Aug 2026 15:19:17 +0200 you wrote:
> 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.
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-14  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 13:19 [PATCH net-next v2] net: stmmac: intel: Add missing pci_free_irq_vectors() calls Florian Bezdeka
2026-08-14  3:24 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox