Netdev List
 help / color / mirror / Atom feed
* [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
@ 2026-05-06 10:42 Rex Bytes
  2026-05-08 23:37 ` Jakub Kicinski
  2026-05-11  6:40 ` [PATCH net v2] " Zoran Ilievski
  0 siblings, 2 replies; 4+ messages in thread
From: Rex Bytes @ 2026-05-06 10:42 UTC (permalink / raw)
  To: Igor Russkikh, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: netdev, linux-kernel, stable

The shutdown handler aq_pci_shutdown() unconditionally calls
pci_wake_from_d3(pdev, false), clearing the PCI PME_En bit even when
wake-on-LAN has been configured. While aq_nic_shutdown() correctly
programs the NIC firmware via aq_nic_set_power() to listen for magic
packets, the PCI subsystem will not propagate the resulting PME wake
event from D3, so the system never wakes after poweroff.

WOL from suspend (S3) is unaffected because aq_suspend_common() does
not touch pci_wake_from_d3() and relies on the PM core's wake
configuration via device_may_wakeup().

This affects all atlantic-supported NICs (AQC107/108/111/112/113);
users have reported that WOL works if the atlantic driver is never
loaded, but breaks once it has run its shutdown path.

Pass the configured WOL state to pci_wake_from_d3() instead of a
literal false, so the PCI PME_En bit is preserved when the user has
armed WOL via ethtool.

Fixes: 90869ddfefeb ("net: aquantia: Implement pci shutdown callback")
Cc: stable@vger.kernel.org
Signed-off-by: Rex Bytes <goodboy@rexbytes.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index baa5f8cc31f2..775cbbc1aa42 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -374,7 +374,7 @@ static void aq_pci_shutdown(struct pci_dev *pdev)
 	pci_disable_device(pdev);
 
 	if (system_state == SYSTEM_POWER_OFF) {
-		pci_wake_from_d3(pdev, false);
+		pci_wake_from_d3(pdev, self->aq_hw->aq_nic_cfg->wol);
 		pci_set_power_state(pdev, PCI_D3hot);
 	}
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
  2026-05-06 10:42 [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled Rex Bytes
@ 2026-05-08 23:37 ` Jakub Kicinski
  2026-05-11 13:53   ` [EXTERNAL] " Sukhdeep Soni [C]
  2026-05-11  6:40 ` [PATCH net v2] " Zoran Ilievski
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2026-05-08 23:37 UTC (permalink / raw)
  To: Rex Bytes, Igor Russkikh, Sukhdeep Singh
  Cc: David S . Miller, Eric Dumazet, Paolo Abeni, netdev, linux-kernel,
	stable

On Wed,  6 May 2026 12:42:11 +0200 Rex Bytes wrote:
> Subject: [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled

Oh wow, Igor, Sukhdeep, I complained to your without realizing there's
an atlantic patch that needs review on the list _right_now_!
Please take a look ASAP. Link:
https://lore.kernel.org/all/20260506104211.2442-1-goodboy@rexbytes.com/

Rex Bytes Good Boy, give them a couple of days, and then please
repost under your real name (both author and sign off).
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net v2] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
  2026-05-06 10:42 [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled Rex Bytes
  2026-05-08 23:37 ` Jakub Kicinski
@ 2026-05-11  6:40 ` Zoran Ilievski
  1 sibling, 0 replies; 4+ messages in thread
From: Zoran Ilievski @ 2026-05-11  6:40 UTC (permalink / raw)
  To: Igor Russkikh, Sukhdeep Singh, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, stable

The shutdown handler aq_pci_shutdown() unconditionally calls
pci_wake_from_d3(pdev, false), clearing the PCI PME_En bit even when
wake-on-LAN has been configured. While aq_nic_shutdown() correctly
programs the NIC firmware via aq_nic_set_power() to listen for magic
packets, the PCI subsystem will not propagate the resulting PME wake
event from D3, so the system never wakes after poweroff.

WOL from suspend (S3) is unaffected because aq_suspend_common() does
not touch pci_wake_from_d3() and relies on the PM core's wake
configuration via device_may_wakeup().

This affects all atlantic-supported NICs (AQC107/108/111/112/113);
users have reported that WOL works if the atlantic driver is never
loaded, but breaks once it has run its shutdown path.

Pass the configured WOL state to pci_wake_from_d3() instead of a
literal false, so the PCI PME_En bit is preserved when the user has
armed WOL via ethtool.

Fixes: 90869ddfefeb ("net: aquantia: Implement pci shutdown callback")
Cc: stable@vger.kernel.org
Signed-off-by: Zoran Ilievski <goodboy@rexbytes.com>
---
v2: Repost under real name, no code changes.

 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index baa5f8cc31f2..775cbbc1aa42 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -374,7 +374,7 @@ static void aq_pci_shutdown(struct pci_dev *pdev)
 	pci_disable_device(pdev);
 
 	if (system_state == SYSTEM_POWER_OFF) {
-		pci_wake_from_d3(pdev, false);
+		pci_wake_from_d3(pdev, self->aq_hw->aq_nic_cfg->wol);
 		pci_set_power_state(pdev, PCI_D3hot);
 	}
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [EXTERNAL] Re: [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
  2026-05-08 23:37 ` Jakub Kicinski
@ 2026-05-11 13:53   ` Sukhdeep Soni [C]
  0 siblings, 0 replies; 4+ messages in thread
From: Sukhdeep Soni [C] @ 2026-05-11 13:53 UTC (permalink / raw)
  To: Jakub Kicinski, Rex Bytes, Igor Russkikh
  Cc: David S . Miller, Eric Dumazet, Paolo Abeni,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org

On May 8, 2026, Jakub Kicinski wrote:
> an atlantic patch that needs review on the list _right_now_!
> Please take a look ASAP. Link:
> https://lore.kernel.org/all/20260506104211.2442-1-goodboy@rexbytes.com/

Bug analysis and fix are correct.

Reviewed-by: Sukhdeep Singh <sukhdeeps@marvell.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-11 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 10:42 [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled Rex Bytes
2026-05-08 23:37 ` Jakub Kicinski
2026-05-11 13:53   ` [EXTERNAL] " Sukhdeep Soni [C]
2026-05-11  6:40 ` [PATCH net v2] " Zoran Ilievski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox