]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
igc: fix netdev not re-attached after resume if interface is down
authorPhilipp David <pd-lkml@3b.pm>
Tue, 4 Aug 2026 22:22:03 +0000 (15:22 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Aug 2026 17:21:28 +0000 (10:21 -0700)
commitb0ce5fd9fabe7c79463cf4602217d4dfeff5b1fd
treec7c530d52d2098d607659c3573315180b61ba08e
parentaf0e5cdd031f4f4a8f6d4160bfbda4f36872b0ed
igc: fix netdev not re-attached after resume if interface is down

__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@vger.kernel.org
Signed-off-by: Philipp David <pd-lkml@3b.pm>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20260804222205.1580328-11-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c