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

From: Jakub Kicinski
Date: Fri Aug 11 2023 - 21:20:31 EST


On Thu, 10 Aug 2023 10:37:16 +0200 Remi Pommarel wrote:
> 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