From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AA632EDD40 for ; Wed, 6 May 2026 10:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778064148; cv=none; b=Rfb9xQSbJuNBmNvJsBa/WcBE7sXvjQ/BUL4Z2B1ll3heMUt2JLCAE/rcJA4vZWUpHVvVm/yFDlFF+uf00/xHwWWJ7oHPIxL1aeyEMWKy+QYRsfic6u/1bCVImYmAdDY7GsZxtCl6b7kr5IRavT8crE4zeIlcd2JUHpBoyMG88q8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778064148; c=relaxed/simple; bh=KT3RztIZzygqyt2MqwyzEPofAWPYcv55sw/QXmU1OgE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wl40rAOu2e4btRc0N/oIHF30i9LeYIicwOwD3oxPLauRUMjGNSq2wRVOrSqHEYMtx07ZpIMXONID8/Uv9g3/np1ODhchuaD/KM3Ec1GLbVHmvsNbew9HQLohTq4TsnMRk/AahVVQg18eZiycJfyfxpdMNEMrNjnSl+VlaWEBI+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rexbytes.com; spf=pass smtp.mailfrom=clientuser.net; dkim=pass (2048-bit key) header.d=rexbytes.com header.i=@rexbytes.com header.b=jCnImI8D; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rexbytes.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=clientuser.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rexbytes.com header.i=@rexbytes.com header.b="jCnImI8D" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-bc23bebd345so131858966b.1 for ; Wed, 06 May 2026 03:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rexbytes.com; s=google; t=1778064146; x=1778668946; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jias4nxgB3eyNmqda1jfxvOxgCX6OydtclPwJD7WctA=; b=jCnImI8DseuecP/By/pPx0jzEaxHqhkEK+jL1OgrnoFBsCGlFHcVEgUqp107rLgorM zF1GBRcmP/H/Urv7dBzkcS8S2bDAS2rvDAN/R8CA8zIV1gPu9oeNCZ6ouazxo7nRyOrU PqUhaoOWJipV8awore9KvEtRtCXC6gM8m1a8420qLa8jPvhnvDTQA7dwM0oAqgnixGnw /GyP4LsIiYIB/FvbPQmfntclvrx8h/o7Q2UGaW0G8hCbA9vxw+By3gyoSkqk1ouBFvDQ oVjLGiGV238lQsQ6fsarJ566CZHeTfjVcMgB5KyM0xDE0MqBvQvZDiYJSiSQtj8MppNw zXZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778064146; x=1778668946; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jias4nxgB3eyNmqda1jfxvOxgCX6OydtclPwJD7WctA=; b=n0ffjb3yvwNWI7HzpSBdgzDnK3HFp4Wq8c8kexTLCWfDpT9ryyJYqQaeM+AXnwXqRn kgcrz2qniqWEabOOdrbARZiNo6y1Oz3jzs9lTVqFB0OgpgMx3R7/cKGCI3+Jmtf3tBHh XYNDYLv8NAbO8NEyuzl0zfzK8az7EBdEDD3CvOl1GmtDW+yZJNespO04f+ZPPwyvnm2/ +3MGQzn5SDoiPHj3yDpdUyUXtjmq/WknjfaA9fIayvD0Oco+RonVHGCHp39DVazgaIoa B/5t9xvz2u/kkwRKla3UVowFwgRtO+iUeDcxAezOJthexkQjZvPV8HDrPS0a9XS+Z6eo vXkA== X-Forwarded-Encrypted: i=1; AFNElJ9sz1ylktsFB1KraeIUmrWcL00+i/A2W0DVNCQDn4B3U6MTztc2NMX1rN6CyGxlW3F85/0laBBfJI6GFzs=@vger.kernel.org X-Gm-Message-State: AOJu0YzxF8owwlJu/fIQPjgF414/D8lijyw8CyYdi7Y/0JDKqp0RG9bA tcaH3lzWCopjxKZX3piFzhcBN9LLBQOKMVt0fFBHU5/byPyJTiVtzJDOH2/MAW9oW6M= X-Gm-Gg: AeBDietfIi0rnZ8upCOgcdNdczWlvsGxx14hE9v7wtvXQnedInVDeczdTN+fHf3DD1K yzIXDoMi1ezWh7SwjPRiWCUu8cWRzcLn38VVwqr+jZJZCG0GGDT0xVFq7GNSBhvzFwhtA1mAmqU 2U98unRv9/ZtmQ4CDiVUYj7/GxoiybGlmSkyCV4xxUwFrZ1ESGvMKQJ1bR3YxhtUoGvBLpSgcMN VbmDfHXWRIpebl6BZkiwcdtpALJ7tsxpUcyZ5GkWqfYt0AGQ8x9mx5in+qty/W5uota56WxiWth cWP/Np1kofm0PLGvUXJECdL3S22vibSWm6KU8/5B+oW9XOazoaXHFcI20Komb7kLGab+pf4zW3b RyHOX71r/A6cmOhAh+81uThr6iHmrTHFSglmWC5hm/LHojOBEyPnCP6amKm45K6X5uRhCWdvz5F vQyZbukoVizGc8npklwcmiEG3MDlnP9Pb+bA4m99HbsDWzkqLiVJKbhypeqIxS6G00MrLWfr0fs 7E8mrxSnahaWirtoHLG256Oddyk X-Received: by 2002:a17:907:c80c:b0:bc1:1808:7fe1 with SMTP id a640c23a62f3a-bc54c457536mr143692766b.21.1778064145139; Wed, 06 May 2026 03:42:25 -0700 (PDT) Received: from localhost.localdomain (83-87-100-220.cable.dynamic.v4.ziggo.nl. [83.87.100.220]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bc55e6ec72bsm70210666b.35.2026.05.06.03.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 03:42:24 -0700 (PDT) From: Rex Bytes To: Igor Russkikh , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH net] net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled Date: Wed, 6 May 2026 12:42:11 +0200 Message-ID: <20260506104211.2442-1-goodboy@rexbytes.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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