From: Mario Limonciello <mario.limonciello@amd.com>
To: Baochen Qiang <quic_bqiang@quicinc.com>,
rafael@kernel.org, mika.westerberg@linux.intel.com,
ulf.hansson@linaro.org, bhelgaas@google.com,
Basavaraj.Natikar@amd.com, Shyam-sundar.S-k@amd.com,
mpearson@lenovo.com, markpearson@lenovo.com,
Kalle Valo <kvalo@kernel.org>,
Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-pm@vger.kernel.org, linux-pci@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: unexptect ACPI GPE wakeup on Lenovo platforms
Date: Mon, 23 Sep 2024 08:37:13 -0500 [thread overview]
Message-ID: <79d288c6-6042-4f73-b465-0ddcde14509a@amd.com> (raw)
In-Reply-To: <370d023e-ec53-4bf2-a005-48524c9cb4b2@quicinc.com>
On 9/23/2024 05:07, Baochen Qiang wrote:
> Hi,
>
> recently it is reported that on some Lenovo machines (P16v, Z13 etc.) unexpected ACPI event wakeup is seen with kernel 6.10 [1][2]. To summary, the unexpected wakeup is triggered by simply unplug AC power or close lid of the laptop. Regression test shows this is caused by below commit, and with that reverted the issue is gone:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/wireless/ath/ath11k?id=166a490f59ac10340ee5330e51c15188ce2a7f8f
>
> Well what confuses me is that this commit basically resets WLAN hardware before going to suspend. that said, WLAN target maintains limited functionality (PCIe link handling etc...) during system suspend and is thus not expected to wakeup system.
>
> kernel log shows this is an ACPI GPE event wakeup:
>
> Sep 22 22:34:32 fedora kernel: PM: Triggering wakeup from IRQ 9
> Sep 22 22:34:32 fedora kernel: ACPI: PM: ACPI non-EC GPE wakeup
> ...
> Sep 22 22:34:32 fedora kernel: PM: noirq resume of devices complete after 693.757 msecs
> Sep 22 22:34:32 fedora kernel: ACPI: GPE event 0x07
> Sep 22 22:34:32 fedora kernel: ACPI: GPE event 0x0e
>
> Consulting ACPI tables show GPE 0x07 is used by the EC and GPE 0x0e is used by GPP6 device:
>
> Scope (\_SB.PCI0.GPP6)
> {
> ...
> Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
> {
> M460 ("PLA-ASL-\\_SB.PCI0.GPP6._PRW Return GPRW (0xE, 0x4)\n", 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
> Return (Package (0x02)
> {
> 0x0E,
> 0x04
> })
> }
> ...
> }
>
> while GPP6 is the PCI bridge (the PCIe root port in this case) to which WLAN target is attached to:
>
> Device (GPP6)
> {
> Name (_ADR, 0x00020002) // _ADR: Address
> ...
> }
>
> Scope (_SB.PCI0.GPP6)
> {
> Device (WLAN)
> {
> ...
> }
> ...
> }
>
> and lspci also shows such relationship:
>
> $ lspci -vt
> -[0000:00]-+-00.0 Advanced Micro Devices, Inc. [AMD] Device 14e8
> ...
> +-02.2-[03]----00.0 Qualcomm Technologies, Inc QCNFA765 Wireless Network Adapter
> ....
>
> Based on above info:
> #1 is that valid to get the conclusion that this unexpected wakeup is triggered directly by PCIe bridge?
> #2 if this is related to WLAN (seems so based on the regression test), is it the WLAN wake pin (a GPIO pin?) that originally triggers this? and how does it affect the bridge?
> #3 quick tests show that with GPP6 wakeup disabled this issue is gone. so a workaround is to disable GPP6 wakeup before going to suspend and enable it back after resume. But is it safe to do so?
>
>
>
> [1] https://bugzilla.kernel.org/show_bug.cgi?id=219196
> [2] https://bugzilla.redhat.com/show_bug.cgi?id=2301921
>
With pinctrl-amd there is an extra debugging message present [1] that is
activated when you enable '/sys/power/pm_debug_messages' which will tell
you if a GPIO is active during the suspend cycle. That can help you to
rule out whether this is the WoWLAN GPIO pin causing the behavior.
[1]
https://github.com/torvalds/linux/blob/v6.11/drivers/pinctrl/pinctrl-amd.c#L626
next prev parent reply other threads:[~2024-09-23 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 10:07 unexptect ACPI GPE wakeup on Lenovo platforms Baochen Qiang
2024-09-23 13:37 ` Mario Limonciello [this message]
2024-09-24 5:52 ` Baochen Qiang
2024-09-24 17:55 ` Mario Limonciello
2024-09-25 2:18 ` Baochen Qiang
2024-09-25 3:46 ` Mario Limonciello
2024-09-25 4:02 ` Baochen Qiang
2024-09-25 4:08 ` Mario Limonciello
2024-09-25 5:14 ` Baochen Qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79d288c6-6042-4f73-b465-0ddcde14509a@amd.com \
--to=mario.limonciello@amd.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=bhelgaas@google.com \
--cc=kvalo@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markpearson@lenovo.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mpearson@lenovo.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=quic_bqiang@quicinc.com \
--cc=quic_jjohnson@quicinc.com \
--cc=rafael@kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox