From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
David Brownell <david-b@pacbell.net>,
USB development list <linux-usb-devel@lists.sourceforge.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [BUG] [linux-pm] Commit "Hibernation: Enter platform hibernation state in a consistent way)" makes my system to resume instantly from S4
Date: Tue, 30 Oct 2007 00:31:13 +0100 [thread overview]
Message-ID: <200710300031.17355.rjw@sisk.pl> (raw)
In-Reply-To: <200710300036.13186.maximlevitsky@gmail.com>
On Monday, 29 October 2007 23:36, Maxim Levitsky wrote:
> On Monday 29 October 2007 22:37:37 Rafael J. Wysocki wrote:
> > On Monday, 29 October 2007 07:45, Maxim Levitsky wrote:
> > > On Sunday 28 October 2007 22:23:15 Rafael J. Wysocki wrote:
> > > > On Sunday, 28 October 2007 21:00, Maxim Levitsky wrote:
> > > > > On Saturday 27 October 2007 23:46:45 Rafael J. Wysocki wrote:
> > > > > > On Saturday, 27 October 2007 14:05, Maxim Levitsky wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > Recently I noticed that my system resumes just after suspend to disk.
> > > > > > >
> > > > > > > I traced this to commit 9cd9a0058dd35268b24fa16795a92c800f4086d4.
> > > > > > >
> > > > > > > Note:
> > > > > > >
> > > > > > > This happens only if I enable WOL using /proc/acpi/wakeup
> > > > > > > (echo "ILAN" > /proc/acpi/wakeup)
> > > > > >
> > > > > > What happens after a suspend to RAM?
> > > > > I do more testing tomorrow, but what I remember is that,
> > > > > I had no issues with suspend-to-ram.
> > > > > (And take into account the fact that _all_ wakeup devices were enabled always,
> > > > > the rc.local does that for me, and still I did quite a lot of suspends, but I
> > > > > got the immediate resume, only and always after suspend to disk.
> > > >
> > > > Hm, can you please retest with the above commit applied, but with
> > > > device_suspend() in hibernation_platform_enter() replaced by device_shutdown()?
> > > Bingo! doing the above fixes this problem.
> > > And... strange, since I did test the system with e1000 unloaded, but still got same bug,
> > > back when I chased that bug, thus it is probably not related to e1000 and WOL.
> > >
> > > the ACPI wake-up source (I have read the DSDT, and ICH datasheets, thus I know that this is a set of bits in southbridge)
> > > of e1000 is shared with EHCI and HDA sound codec.
> > > (But usb on my system only able to wake from S3, and the soundchip which can theoretically wake up from S3 too, doesn't have this ability)
> > >
> > > (But disabling this wakeup source, fixes this bug too)
> >
> > OK
> >
> > Please get back to device_suspend() in hibernation_platform_enter() and try
> > to unload ehci_hcd before hibernation with the wakeup source enabled.
> Well, ... bingo! again!
>
> Replacing back the device_suspend() , and unloading the ehci_hcd fixes the problem!
> Even more, loading this module back causes this problem to reappear, and vise-verso.
> All wakeup sources are enabled always.
>
> Note that I don't have any USB 2.0 devices yet.
> The usb devices I have are: keyboard,mouse,and joystick.
>
> So now this problem looks fixable, I take a look at ehci driver.
This is very similar to what I've been observing for some time on one of my
test boxes wrt suspending to RAM and in that case the problem is also related
to EHCI (this is a pretty old Celeron-based box with an Intel chipset).
It looks like in some situations, on some platforms the EHCI controller
triggers a resume right after the suspend (or hibernation) if the driver's
.suspend() routine is executed before invoking the ACPI firmware to put the
system into the sleep state.
[The "ehci_hcd causes box to resume immediately after suspend to RAM" thread on
linux-pm was about this problem.]
Greetings,
Rafael
next prev parent reply other threads:[~2007-10-29 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-27 12:05 [BUG] [linux-pm] Commit "Hibernation: Enter platform hibernation state in a consistent way)" makes my system to resume instantly from S4 Maxim Levitsky
2007-10-27 21:46 ` Rafael J. Wysocki
2007-10-28 20:00 ` Maxim Levitsky
2007-10-28 20:23 ` Rafael J. Wysocki
2007-10-29 6:45 ` Maxim Levitsky
2007-10-29 20:37 ` Rafael J. Wysocki
2007-10-29 22:36 ` Maxim Levitsky
2007-10-29 23:31 ` Rafael J. Wysocki [this message]
2007-11-01 15:25 ` Maxim Levitsky
2007-11-01 17:03 ` 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=200710300031.17355.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=benh@kernel.crashing.org \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=maximlevitsky@gmail.com \
--cc=stern@rowland.harvard.edu \
/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