From: Matthew Garrett <mjg@redhat.com>
To: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 4/5] ACPI: Missing _S0W shouldn't disable runtime PM
Date: Mon, 4 Oct 2010 14:22:28 -0400 [thread overview]
Message-ID: <1286216549-5438-5-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1286216549-5438-1-git-send-email-mjg@redhat.com>
A failure to evaluate _S0W will effectively result in the suspend state
for PCI devices being set to D0. We should limit that to genuine failures
rather than doing so if the method isn't present.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/acpi/sleep.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index cf82989..ab0ba78 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -609,9 +609,9 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
acpi_method[3] = 'W';
status = acpi_evaluate_integer(handle, acpi_method, NULL,
&d_max);
- if (ACPI_FAILURE(status)) {
+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
d_max = d_min;
- } else if (d_max < d_min) {
+ } else if (ACPI_SUCCESS(status) && d_max < d_min) {
/* Warn the user of the broken DSDT */
printk(KERN_WARNING "ACPI: Wrong value from %s\n",
acpi_method);
--
1.7.3.1
next prev parent reply other threads:[~2010-10-04 18:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 18:22 Runtime PM: Improve support for PCI devices Matthew Garrett
2010-10-04 18:22 ` [PATCH 1/5] ACPI: Allow handlers to be installed at the same time as methods Matthew Garrett
2010-10-05 23:18 ` Rafael J. Wysocki
2010-10-06 2:09 ` Moore, Robert
2010-10-06 16:14 ` Moore, Robert
2010-10-06 16:18 ` Matthew Garrett
2010-10-06 19:30 ` Rafael J. Wysocki
2010-10-06 19:32 ` Matthew Garrett
2010-10-06 19:47 ` Moore, Robert
2010-10-04 18:22 ` [PATCH 2/5] pci: Export some PCI PM functionality Matthew Garrett
2010-10-05 23:20 ` Rafael J. Wysocki
2010-10-15 20:10 ` Jesse Barnes
2010-10-04 18:22 ` [PATCH 3/5] ACPI: Bind implicit GPE dependencies to PCI devices Matthew Garrett
2010-10-05 23:37 ` Rafael J. Wysocki
2010-10-04 18:22 ` Matthew Garrett [this message]
2010-10-04 18:22 ` [PATCH 5/5] pci: Add support for polling PME state on suspended legacy " Matthew Garrett
2010-10-05 23:45 ` Rafael J. Wysocki
2010-10-15 20:10 ` Jesse Barnes
2010-10-15 20:39 ` Rafael J. Wysocki
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=1286216549-5438-5-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox