[SRU][R][PATCH 1/1] igc: fix netdev not re-attached after resume if interface is down
AceLan Kao
acelan.kao at canonical.com
Thu Aug 13 05:47:49 UTC 2026
From: Philipp David <pd-lkml at 3b.pm>
BugLink: https://bugs.launchpad.net/bugs/2163375
__igc_resume() calls netif_device_attach() only inside the
netif_running() branch, so an interface that was down during suspend
is never re-attached on resume. It then stays in the not-present state
that __igc_shutdown() set via netif_device_detach(): ethtool reports
ENODEV and every attempt to bring the interface up fails the
netif_device_present() check in __dev_open() with -ENODEV, silently,
since __igc_resume() returns 0. Only reloading the driver recovers the
device.
This is easy to hit in practice because NetworkManager brings managed
interfaces down before sleep unless Wake-on-LAN is configured, making
the adapter unusable after every suspend/resume cycle with WoL
disabled.
Re-attach the netdev on every successful resume, as igb and e1000e do.
Fixes: 6f31d6b643a3 ("igc: Refactor runtime power management flow")
Cc: stable at vger.kernel.org
Signed-off-by: Philipp David <pd-lkml at 3b.pm>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy at intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen at intel.com>
Link: https://patch.msgid.link/20260804222205.1580328-11-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(cherry picked from commit b0ce5fd9fabe7c79463cf4602217d4dfeff5b1fd)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index f377519bfdeca..0540932b99401 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7589,11 +7589,13 @@ static int __igc_resume(struct device *dev, bool rpm)
err = __igc_open(netdev, true);
if (!rpm)
rtnl_unlock();
- if (!err)
- netif_device_attach(netdev);
+ if (err)
+ return err;
}
- return err;
+ netif_device_attach(netdev);
+
+ return 0;
}
static int igc_resume(struct device *dev)
--
2.53.0
More information about the kernel-team
mailing list