linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential issue with pci_prepare_to_sleep if there's no platform support for D3cold transition
@ 2025-04-21 20:05 Heiner Kallweit
  2025-04-22  6:27 ` Lukas Wunner
  0 siblings, 1 reply; 5+ messages in thread
From: Heiner Kallweit @ 2025-04-21 20:05 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci@vger.kernel.org

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.


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

end of thread, other threads:[~2025-04-23  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 20:05 Potential issue with pci_prepare_to_sleep if there's no platform support for D3cold transition Heiner Kallweit
2025-04-22  6:27 ` Lukas Wunner
2025-04-22 11:43   ` Rafael J. Wysocki
2025-04-23  9:32     ` Heiner Kallweit
2025-04-23  9:45       ` Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).