public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: resume from ram much slower
Date: Fri, 10 Aug 2007 22:00:10 +0200	[thread overview]
Message-ID: <200708102200.10840.rjw@sisk.pl> (raw)
In-Reply-To: <200708101848.37222.arekm@maven.pl>

On Friday, 10 August 2007 18:48, Arkadiusz Miskiewicz wrote:
> Hi,
> 
> Starting 1-2 weeks ago I have very long resume from
> ram times. It takes more than 1 min to resume. Does anyone see such behaviour?
> 
> Kernel from yesterday git, thinkpad z60m, suspend.sf.net tools 20070801
> 
> "ACPI handle has no context!" are interesting btw.

Let's try to find out something.

Please apply the patch below and see if anything changes.

Greetings,
Rafael


---
 drivers/pnp/pnpacpi/core.c |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

Index: linux-2.6.23-rc2/drivers/pnp/pnpacpi/core.c
===================================================================
--- linux-2.6.23-rc2.orig/drivers/pnp/pnpacpi/core.c
+++ linux-2.6.23-rc2/drivers/pnp/pnpacpi/core.c
@@ -130,11 +130,21 @@ static int pnpacpi_disable_resources(str
 #ifdef CONFIG_ACPI_SLEEP
 static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
 {
-	return acpi_bus_set_power((acpi_handle) dev->data,
-				  acpi_pm_device_sleep_state(&dev->dev,
-							     device_may_wakeup
-							     (&dev->dev),
-							     NULL));
+	int power_state;
+
+	power_state = acpi_pm_device_sleep_state(&dev->dev,
+						device_may_wakeup(&dev->dev),
+						NULL);
+
+	if (power_state < 0) {
+		printk(KERN_ERR
+			"%s: Could not choose power state for device!\n",
+			dev->name);
+		power_state = (state.event == PM_EVENT_ON) ?
+				ACPI_STATE_D0 : ACPI_STATE_D3;
+	}
+
+	return acpi_bus_set_power((acpi_handle) dev->data, power_state);
 }
 
 static int pnpacpi_resume(struct pnp_dev *dev)



  parent reply	other threads:[~2007-08-10 19:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 16:48 resume from ram much slower Arkadiusz Miskiewicz
     [not found] ` <6bffcb0e0708101034x44ef5bd0we6a94e398c30c511@mail.gmail.com>
2007-08-10 19:18   ` Rafael J. Wysocki
2007-08-10 19:13     ` Arkadiusz Miskiewicz
2007-08-13 19:55   ` Pavel Machek
2007-08-13 20:21     ` [linux-pm] " Alan Stern
2007-08-13 20:55     ` Rafael J. Wysocki
2007-08-10 20:00 ` Rafael J. Wysocki [this message]
2007-08-11  9:04   ` Arkadiusz Miskiewicz
2007-08-11 21:50     ` Rafael J. Wysocki
2007-08-21  4:03 ` Len Brown

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=200708102200.10840.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=arekm@maven.pl \
    --cc=linux-kernel@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