Thread (3 messages) flat view 3 messages, 2 authors, 2023-08-22

Re: [PATCH net] net: stmmac: remove disable_irq() from ->ndo_poll_controller()

From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-08-12 01:20:31
Also in: lkml, stable

On Thu, 10 Aug 2023 10:37:16 +0200 Remi Pommarel wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4727f7be4f86..bbe509abc5dc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5958,8 +5958,8 @@ static void stmmac_poll_controller(struct net_device *dev)
 		for (i = 0; i < priv->plat->tx_queues_to_use; i++)
 			stmmac_msi_intr_tx(0, &priv->dma_conf.tx_queue[i]);
 	} else {
-		disable_irq(dev->irq);
-		stmmac_interrupt(dev->irq, dev);
+		if (disable_hardirq(dev->irq))
+			stmmac_interrupt(dev->irq, dev);
 		enable_irq(dev->irq);
Implementing .ndo_poll_controller is only needed if driver doesn't use
NAPI. This driver seems to use NAPI on all paths, AFAICT you can simply
delete this function completely.
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help