PCI / PM: Allow PCI devices to be put into D3cold during system suspend
PATCH 1/1 PCI / PM: Allow PCI devices to be put into D3cold during system suspend
From: Rafael J. Wysocki <[email protected]>
Commit 448bd857d48e (PCI/PM: add PCIe runtime D3cold support) added a check to prevent PCI devices from being put into D3cold during system suspend without giving any particular reason (which was overlooked during review).
Also that check causes the "freeze" sleep state to draw more power than it can potentially, so drop the check.
--- drivers/pci/pci.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/pci/pci.c +0 -4
@@ -1907,10 +1907,6 @@ int pci_prepare_to_sleep(struct pci_devif (target_state ==PCI_POWER_ERROR )return -EIO ; -/* D3cold during system suspend/hibernate is not supported */ -if (target_state > PCI_D3hot) - target_state = PCI_D3hot; -pci_enable_wake (dev, target_state,device_may_wakeup (&dev->dev)); error =pci_set_power_state (dev, target_state);
PATCH 1/1 PCI / PM: Allow PCI devices to be put into D3cold during system suspend
From: Rafael J. Wysocki <[email protected]>
Commit 448bd857d48e (PCI/PM: add PCIe runtime D3cold support) added a check to prevent PCI devices from being put into D3cold during system suspend without giving any particular reason.
Also the check isn't really necessary, because acpi_pci_set_power_state() maps PCI_D3hot to ACPI_STATE_D3_COLD anyway.
---
Ying notices that acpi_pci_set_power_state() maps PCI D3hot to ACPI D3cold, so the check actually isn't effective even, but that means that the second part of my original changelog was in fact incorrect.
--- drivers/pci/pci.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/pci/pci.c +0 -4
@@ -1907,10 +1907,6 @@ int pci_prepare_to_sleep(struct pci_devif (target_state ==PCI_POWER_ERROR )return -EIO ; -/* D3cold during system suspend/hibernate is not supported */ -if (target_state > PCI_D3hot) - target_state = PCI_D3hot; -pci_enable_wake (dev, target_state,device_may_wakeup (&dev->dev)); error =pci_set_power_state (dev, target_state);
Bjorn Helgaas
maintainerQuoted 10 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Commit
448bd857d48e(PCI/PM: add PCIe runtime D3cold support) added a check to prevent PCI devices from being put into D3cold during system suspend without giving any particular reason.Also the check isn't really necessary, because
acpi_pci_set_power_state()mapsPCI_D3hottoACPI_STATE_D3_COLDanyway.Signed-off-by Rafael J. Wysocki <[email protected]>
Added to pci/pm for v3.18, thanks!
Quoted 26 lines
---
Ying notices that
acpi_pci_set_power_state()maps PCI D3hot to ACPI D3cold, so the check actually isn't effective even, but that means that the second part of my original changelog was in fact incorrect.--- drivers/pci/pci.c | 4 ---- 1 file changed, 4 deletions(-)Index:
linux-pm/drivers/pci/pci.c
===================================================================drivers/pci/pci.c +0
-4@@ -1907,10 +1907,6 @@ int pci_prepare_to_sleep(struct pci_devif (target_state ==PCI_POWER_ERROR )return -EIO ; -/* D3cold during system suspend/hibernate is not supported */ -if (target_state > PCI_D3hot) - target_state = PCI_D3hot; -pci_enable_wake (dev, target_state,device_may_wakeup (&dev->dev)); error =pci_set_power_state (dev, target_state);