public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Cc: yakui_zhao <yakui.zhao@intel.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	"cedric@belbone.be" <cedric@belbone.be>,
	linux-acpi@vger.kernel.org
Subject: [PATCH] ACPI: suspend: don't let device _PS3 failure prevent suspend
Date: Fri, 08 May 2009 00:39:38 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.0905080037240.20287@localhost.localdomain> (raw)
In-Reply-To: <4A0330E3.9060909@gmx.net>

From: Len Brown <len.brown@intel.com>

6328a57401dc5f5cf9931738eb7268fcd8058c49
"Enable PNPACPI _PSx Support, v3"

added a call to acpi_bus_set_power(handle, ACPI_STATE_D3)
to pnpacpi_disable_resource() before the existing call
to evaluate _DIS on the device.

This caused suspend to fail on the system in
http://bugzilla.kernel.org/show_bug.cgi?id=13243
because the sanity check to verify we entered _PS3
failed on the serial port.

As a work-around, that sanity check can be disabled
system-wide with "acpi.power_nocheck=1"

Or perhaps we should just shrug off the _PS3 failure
and carry on with _DIS like we used to -- which is
what this patch does.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/pnp/pnpacpi/core.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 9a3a682..9496494 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -110,11 +110,9 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev)
 
 	/* acpi_unregister_gsi(pnp_irq(dev, 0)); */
 	ret = 0;
-	if (acpi_bus_power_manageable(handle)) {
-		ret = acpi_bus_set_power(handle, ACPI_STATE_D3);
-		if (ret)
-			return ret;
-	}
+	if (acpi_bus_power_manageable(handle))
+		acpi_bus_set_power(handle, ACPI_STATE_D3);
+		/* continue even if acpi_bus_set_power() fails */
 	if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DIS", NULL, NULL)))
 		ret = -ENODEV;
 	return ret;
-- 
1.6.3


  parent reply	other threads:[~2009-05-08  4:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-13243-10286@http.bugzilla.kernel.org/>
     [not found] ` <20090505150138.92f3ecd6.akpm@linux-foundation.org>
     [not found]   ` <4A02000D.9030400@gmx.net>
     [not found]     ` <200905061616.36707.bjorn.helgaas@hp.com>
2009-05-07  1:43       ` [Bugme-new] [Bug 13243] New: regression from 2.6.29 : can't suspend on a compaq nc6000, suspend_device(): pnp_bus_suspend+0x0/0x6b returns -5 yakui_zhao
2009-05-07 19:05         ` Witold Szczeponik
2009-05-08  1:31           ` yakui_zhao
2009-05-08  4:39           ` Len Brown [this message]
2009-05-08 12:23             ` [PATCH] ACPI: suspend: don't let device _PS3 failure prevent suspend Henrique de Moraes Holschuh
2009-05-10 20:48               ` Witold Szczeponik
2009-05-11  2:43                 ` yakui_zhao
2009-05-11 15:21                   ` Rafael J. Wysocki
2009-05-12  0:48                     ` yakui_zhao
2009-05-12  2:01                       ` Matthew Garrett
2009-05-12  2:26                         ` yakui_zhao
2009-05-12  2:50                           ` Matthew Garrett
2009-05-12  3:06                             ` yakui_zhao
2009-05-12  4:11                               ` Matthew Garrett

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=alpine.LFD.2.00.0905080037240.20287@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=Witold.Szczeponik@gmx.net \
    --cc=bjorn.helgaas@hp.com \
    --cc=cedric@belbone.be \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=yakui.zhao@intel.com \
    /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