public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernard Blackham <bernard@blackham.com.au>
To: "Li, Shaohua" <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@suse.cz>,
	acpi-devel@lists.sourceforge.net,
	suspend2-devel@lists.suspend2.net
Subject: Re: [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops
Date: Tue, 8 Mar 2005 17:47:11 +0800	[thread overview]
Message-ID: <20050308094711.GC20154@blackham.com.au> (raw)
In-Reply-To: <16A54BF5D6E14E4D916CE26C9AD305750155ECAA@pdsmsx402.ccr.corp.intel.com>

On Tue, Mar 08, 2005 at 02:58:01PM +0800, Li, Shaohua wrote:
> >Removing the check resolves this issue (patch attached). Is this an
> >adequate fix?
> 
> Great analyzing! I guess Both S3, swsusp, and swsusp2 can't suffer from
> this bug. Sure this patch hasn't any side effect.

At least one user has reported that this patch makes the battery
status unreadable. - http://lists.suspend2.net/lurker/message/20050306.201243.cbbca9ea.en.html

I don't know why this is the case yet, but I'd hesitate to use it
until this is sorted out.

> But I wonder if it's the right fix. Maybe we should disable all
> GPEs which have been disabled on very early of resume (that is to
> restore ACPI hardware's state).

Does calling acpi_enter_sleep_state_prep through pm_ops->prepare()
disable runtime GPEs? I can only see that done in
acpi_enter_sleep_state called through pm_ops->enter(). But calling
enter() will physically enter the sleep state too which isn't what
we want at that stage.

Hence I'm still unclear on how to disable the GPEs from swsusp2
without delving into drivers/acpi/. Should runtime GPEs be disabled
in prepare() ? The ACPI spec doesn't mention what to do with runtime
GPEs on suspend, but Pavel suggested that keeping kacpid running
during suspend would be a good idea in order to respond to things
like thermal events.

Vanilla swsusp seems to call pm_ops->prepare() on resume before
restoring the atomic copy, if the platform method is used, and later
call pm_ops->finish() once resumed. Is this valid? I gather that it
means that the entire sequence goes:
 - prepare()
 - snapshot & write to disk
 - enter()
 - wakeup & boot
 - read image from disk
 - prepare()
 - restore snapshot
 - finish()

Are the two calls to prepare() intentional or safe? To me it seems
that GPEs aren't disabled until enter() is called so currently
calling prepare() on resume wouldn't synchronise the GPE states.

Bernard.

-- 
 Bernard Blackham <bernard at blackham dot com dot au>

  reply	other threads:[~2005-03-08  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-08  6:58 [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops Li, Shaohua
2005-03-08  9:47 ` Bernard Blackham [this message]
     [not found]   ` <20050308094711.GC20154-4vSAtV5O1nc0n/F98K4Iww@public.gmane.org>
2005-03-08 10:02     ` Re: [Suspend2-devel] " Sebastian Kügler
  -- strict thread matches above, loose matches on Subject: below --
2005-03-08  7:24 [ACPI] " Li, Shaohua
2005-03-08  3:25 Re: [Suspend2-devel] " Li, Shaohua
2005-03-08  5:28 ` [ACPI] " Nigel Cunningham
2005-03-08  6:12   ` Li Shaohua
2005-03-08  6:55     ` Nigel Cunningham
     [not found] <20050304175058.GA4042@blackham.com.au>
     [not found] ` <1110012298.6028.10.camel@DustPuppy.LNX.RO>
     [not found]   ` <20050305100254.GH4042@blackham.com.au>
2005-03-05 17:56     ` Re: [Suspend2-devel] " Pavel Machek
2005-03-05 20:35       ` [ACPI] " Bernard Blackham
2005-03-06 12:33         ` Pavel Machek
2005-03-07 16:48         ` Re: [Suspend2-devel] " John M Flinchbaugh
2005-03-07 16:54           ` [ACPI] " Bernard Blackham

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=20050308094711.GC20154@blackham.com.au \
    --to=bernard@blackham.com.au \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=pavel@suse.cz \
    --cc=shaohua.li@intel.com \
    --cc=suspend2-devel@lists.suspend2.net \
    /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