* [Intel-wired-lan] [PATCH] igc: fix netdev not re-attached after resume if interface is down
@ 2026-07-17 9:22 Philipp David via Intel-wired-lan
2026-07-23 9:18 ` Loktionov, Aleksandr
0 siblings, 1 reply; 3+ messages in thread
From: Philipp David via Intel-wired-lan @ 2026-07-17 9:22 UTC (permalink / raw)
To: intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Philipp David, stable
__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>
---
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 2c9e2dfd8499..e777c2df0b73 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7586,11 +7586,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.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH] igc: fix netdev not re-attached after resume if interface is down
2026-07-17 9:22 [Intel-wired-lan] [PATCH] igc: fix netdev not re-attached after resume if interface is down Philipp David via Intel-wired-lan
@ 2026-07-23 9:18 ` Loktionov, Aleksandr
2026-08-04 8:29 ` Ruinskiy, Dima
0 siblings, 1 reply; 3+ messages in thread
From: Loktionov, Aleksandr @ 2026-07-23 9:18 UTC (permalink / raw)
To: Philipp David, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
stable@vger.kernel.org
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Philipp David via Intel-wired-lan
> Sent: Friday, July 17, 2026 11:22 AM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Andrew Lunn
> <andrew+netdev@lunn.ch>; David S . Miller <davem@davemloft.net>; Eric
> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>; Philipp David <pd-lkml@3b.pm>;
> stable@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] 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>
> ---
> 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 2c9e2dfd8499..e777c2df0b73 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -7586,11 +7586,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.54.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH] igc: fix netdev not re-attached after resume if interface is down
2026-07-23 9:18 ` Loktionov, Aleksandr
@ 2026-08-04 8:29 ` Ruinskiy, Dima
0 siblings, 0 replies; 3+ messages in thread
From: Ruinskiy, Dima @ 2026-08-04 8:29 UTC (permalink / raw)
To: Loktionov, Aleksandr, Philipp David,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
stable@vger.kernel.org
On 23/07/2026 12:18, Loktionov, Aleksandr wrote:
>
>
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
>> Of Philipp David via Intel-wired-lan
>> Sent: Friday, July 17, 2026 11:22 AM
>> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
>> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
>> Przemyslaw <przemyslaw.kitszel@intel.com>; Andrew Lunn
>> <andrew+netdev@lunn.ch>; David S . Miller <davem@davemloft.net>; Eric
>> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
>> Abeni <pabeni@redhat.com>; Philipp David <pd-lkml@3b.pm>;
>> stable@vger.kernel.org
>> Subject: [Intel-wired-lan] [PATCH] 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>
>> ---
>> 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 2c9e2dfd8499..e777c2df0b73 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_main.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
>> @@ -7586,11 +7586,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.54.0
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-04 8:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 9:22 [Intel-wired-lan] [PATCH] igc: fix netdev not re-attached after resume if interface is down Philipp David via Intel-wired-lan
2026-07-23 9:18 ` Loktionov, Aleksandr
2026-08-04 8:29 ` Ruinskiy, Dima
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox