[PATCH 1/5] igc: Call netif_queue_set_napi() with rntl locked

Mika Westerberg
2026-02-24T11:10:52Z

When runtime resuming igc we get:

[ 516.161666] RTNL: assertion failed at ./include/net/netdev_lock.h (72)

Happens because commit 310ae9eb2617 ("net: designate queue -> napi
linking as "ops protected"") added check for this. For this reason drop
the special case for runtime PM from __igc_resume(). This makes it take
rtnl lock unconditionally.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 27e5c2109138..7ffd34bfa14e 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7518,7 +7518,7 @@ static void igc_deliver_wake_packet(struct net_device *netdev)
netif_rx(skb);
}

-static int __igc_resume(struct device *dev, bool rpm)
+static int __igc_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct net_device *netdev = pci_get_drvdata(pdev);
@@ -7563,11 +7563,9 @@ static int __igc_resume(struct device *dev, bool rpm)
wr32(IGC_WUS, ~0);

if (netif_running(netdev)) {
- if (!rpm)
- rtnl_lock();
+ rtnl_lock();
err = __igc_open(netdev, true);
- if (!rpm)
- rtnl_unlock();
+ rtnl_unlock();
if (!err)
netif_device_attach(netdev);
}
@@ -7577,12 +7575,12 @@ static int __igc_resume(struct device *dev, bool rpm)

static int igc_resume(struct device *dev)
{
- return __igc_resume(dev, false);
+ return __igc_resume(dev);
}

static int igc_runtime_resume(struct device *dev)
{
- return __igc_resume(dev, true);
+ return __igc_resume(dev);
}

static int igc_suspend(struct device *dev)
--
2.50.1