From: Heiner Kallweit <hkallweit1@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Potential issue with pci_prepare_to_sleep if there's no platform support for D3cold transition
Date: Mon, 21 Apr 2025 22:05:59 +0200 [thread overview]
Message-ID: <62de9027-e4cd-4192-90e8-64f4c4a8fe4b@gmail.com> (raw)
If there's no platform support for transition to D3cold, then
pci_set_power_state(dev, D3cold) still returns 0, even though
power state is transitioned to D3hot only. We called
pci_enable_wake(dev, D3cold, wakeup) before, therefore PME for
D3hot may not be enabled. Is this a bug?
Background:
In __pci_set_power_state we have the following:
error = pci_set_low_power_state(dev, PCI_D3hot, locked);
if (pci_platform_power_transition(dev, PCI_D3cold))
return error;
The acpi_pci_set_power_state() stub returns -ENODEV.
Therefore, if error=0, __pci_set_power_state() will
return 0 if pci_platform_power_transition() fails.
next reply other threads:[~2025-04-21 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 20:05 Heiner Kallweit [this message]
2025-04-22 6:27 ` Potential issue with pci_prepare_to_sleep if there's no platform support for D3cold transition Lukas Wunner
2025-04-22 11:43 ` Rafael J. Wysocki
2025-04-23 9:32 ` Heiner Kallweit
2025-04-23 9:45 ` Heiner Kallweit
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=62de9027-e4cd-4192-90e8-64f4c4a8fe4b@gmail.com \
--to=hkallweit1@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.