diff options
author | Lin Ming <ming.m.lin@intel.com> | 2012-04-22 21:03:49 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-05-05 01:19:52 -0400 |
commit | 1cc0c998fdf2cb665d625fb565a0d6db5c81c639 (patch) | |
tree | 2768315b4d2217ea16082947bf995edfc40d5faf /drivers/pci | |
parent | ec612fcf43e09f5e05d37baf4d3f138b3fcc2f3d (diff) |
ACPI: Fix D3hot v D3cold confusion
Before this patch, ACPI_STATE_D3 incorrectly referenced D3hot
in some places, but D3cold in other places.
After this patch, ACPI_STATE_D3 always means ACPI_STATE_D3_COLD;
and all references to D3hot use ACPI_STATE_D3_HOT.
ACPI's _PR3 method is used to enter both D3hot and D3cold states.
What distinguishes D3hot from D3cold is the presence _PR3
(Power Resources for D3hot) If these resources are all ON,
then the state is D3hot. If _PR3 is not present,
or all _PR0 resources for the devices are OFF,
then the state is D3cold.
This patch applies after Linux-3.4-rc1.
A future syntax cleanup may remove ACPI_STATE_D3
to emphasize that it always means ACPI_STATE_D3_COLD.
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 0f150f271c2a..1929c0c63b75 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -200,7 +200,7 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev) | |||
200 | return PCI_D1; | 200 | return PCI_D1; |
201 | case ACPI_STATE_D2: | 201 | case ACPI_STATE_D2: |
202 | return PCI_D2; | 202 | return PCI_D2; |
203 | case ACPI_STATE_D3: | 203 | case ACPI_STATE_D3_HOT: |
204 | return PCI_D3hot; | 204 | return PCI_D3hot; |
205 | case ACPI_STATE_D3_COLD: | 205 | case ACPI_STATE_D3_COLD: |
206 | return PCI_D3cold; | 206 | return PCI_D3cold; |
@@ -223,7 +223,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
223 | [PCI_D0] = ACPI_STATE_D0, | 223 | [PCI_D0] = ACPI_STATE_D0, |
224 | [PCI_D1] = ACPI_STATE_D1, | 224 | [PCI_D1] = ACPI_STATE_D1, |
225 | [PCI_D2] = ACPI_STATE_D2, | 225 | [PCI_D2] = ACPI_STATE_D2, |
226 | [PCI_D3hot] = ACPI_STATE_D3, | 226 | [PCI_D3hot] = ACPI_STATE_D3_HOT, |
227 | [PCI_D3cold] = ACPI_STATE_D3 | 227 | [PCI_D3cold] = ACPI_STATE_D3 |
228 | }; | 228 | }; |
229 | int error = -EINVAL; | 229 | int error = -EINVAL; |