From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ayaz Abdulla <aabdulla@nvidia.com>,
Stephen Hemminger <shemminger@linux-foundation.org>
Subject: Re: hibernate event order question
Date: Sun, 18 May 2008 14:29:26 +0200 [thread overview]
Message-ID: <200805181429.27686.rjw@sisk.pl> (raw)
In-Reply-To: <20080518122433.GA16663@yamamaya.is-a-geek.org>
On Sunday, 18 of May 2008, Tobias Diedrich wrote:
> Rafael J. Wysocki wrote:
> > On Sunday, 18 of May 2008, Tobias Diedrich wrote:
> > > Rafael J. Wysocki wrote:
> > > > On Sunday, 18 of May 2008, Tobias Diedrich wrote:
> > > > > Tobias Diedrich wrote:
> > > > > > > > Shouldn't there be a 'prepare for poweroff'-callback, which gets
> > > > > > > > called
> > > > > > > > before the system is powered off for real?
> > > > > > >
> > > > > > > Yes, it should and it's called in recent kernels.
> > > > > >
> > > > > > For what values of 'recent'?
> > > > > > I'm running 2.6.26-rc2 here. :)
> > > > > > How do I hook into this callback?
> > > > > > (suspend_late maybe? Going to try that one next...)
> > > > >
> > > > > Ok, this patch fixes the 'regression' introduced by the previous
> > > > > patch (at least for me ;)):
> > > >
> > > > Well, what exactly do you do to hibernate the box?
> > >
> > > |#!/bin/sh
> > > |
> > > |SYSPRINTK=/proc/sys/kernel/printk
> > > |OLDPRINTK=$(cat $SYSPRINTK)
> > > |chvt 1
> > > |# work around forcedeth wake-on-lan bug
> > > |#rmmod forcedeth
> > > |echo 9 > $SYSPRINTK
> > > |# shutdown/reboot/platform
> > > |echo shutdown > /sys/power/disk
> >
> > You don't see the devices' suspend callbacks invoked before powering off
> > because of this. Change that to 'platform' (unless that breaks things).
>
> Hmm, I think someone recommended to use shutdown since that is
> supposed to be more reliable.
> Anyway, I think the shutdown hook is good anyway since I suspect
> that if I do a normal system shutdown with promiscous mode still on,
> then wake-on-lan would also not work?
> I haven't checked that though.
> At least I think the shutdown hook won't hurt. :)
No, it won't.
> > I'm unable to comment on the device-specific things, but apart from this the
> > patch looks okay to me except for one thing.
> > > + if (np->wolenabled)
> > > + pci_set_power_state(pdev, PCI_D3hot);
> > > + else pci_set_power_state(pdev, PCI_D3cold);
> >
> > I'm not sure if it's possible to put the device into D3cold without actually
> > removing power from it.
>
> Ok, I've cleaned it up a bit and split it up properly (I think):
> http://www.tdiedrich.de/~ranma/patches/forcedeth/2.6.26-rc2/
> series:
Can you send those patches as a series of messages, please?
> forcedeth.resume.promisc.patch
> forcedeth.hibernate.wol.patch
> forcedeth.swappedmac.patch
> forcedeth.reorder_suspend_resume.patch
Thanks,
Rafael
next prev parent reply other threads:[~2008-05-18 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080517175046.GA9032@yamamaya.is-a-geek.org>
[not found] ` <200805172156.12686.rjw@sisk.pl>
2008-05-17 22:36 ` hibernate event order question Tobias Diedrich
2008-05-17 23:24 ` Tobias Diedrich
2008-05-18 10:45 ` Rafael J. Wysocki
2008-05-18 11:22 ` Tobias Diedrich
2008-05-18 11:32 ` Rafael J. Wysocki
2008-05-18 12:24 ` Tobias Diedrich
2008-05-18 12:29 ` Rafael J. Wysocki [this message]
2008-05-17 17:50 Tobias Diedrich
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=200805181429.27686.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=aabdulla@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ranma+kernel@tdiedrich.de \
--cc=shemminger@linux-foundation.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