net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
PATCH 1/1 net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
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.
--- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +1 -1
@@ -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); } }
Signature · 1 line
2.43.0
Jakub Kicinski
maintainerQuoted 1 line · 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/[email protected]/
Rex Bytes Good Boy, give them a couple of days, and then please repost under your real name (both author and sign off).
Signature · 1 line
pw-bot: cr
PATCH v2 1/1 net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
In reply to Rex BytesThe 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.
---
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(-)
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +1 -1
@@ -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); } }
Signature · 1 line
2.43.0
Quoted 3 lines · Jakub Kicinski
an atlantic patch that needs review on the list _right_now_! Please take a look ASAP. Link:
https://lore.kernel.org/all/[email protected]/
Bug analysis and fix are correct.
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 11 May 2026 08:40:02 +0200 you wrote:
The shutdown handler
aq_pci_shutdown()unconditionally callspci_wake_from_d3(pdev, false), clearing the PCIPME_Enbit even when wake-on-LAN has been configured. Whileaq_nic_shutdown()correctly programs the NIC firmware viaaq_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.[...]
Here is the summary with links:
- [net,v2] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled
https://git.kernel.org/netdev/net/c/2c308cf34284
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html