From: Arjen Verweij <a.verweij-oe7qfRrRQfeEZXFvZSAUrfP6llvjuJOh@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Shutting down PCI devices on suspend
Date: Sun, 12 Dec 2004 02:44:25 +0100 [thread overview]
Message-ID: <41BBA279.1090803@student.tudelft.nl> (raw)
In-Reply-To: <41BB80C6.1020404-Y6VGUYTwhu0@public.gmane.org>
It would be swell if this worked for S5 as well. It's also the simplest
case, since the hardware is reinitialised at boottime anyway.
Nate Lawson wrote:
> Matthew Garrett wrote:
>
>> On Sat, 2004-12-11 at 11:50 -0800, Nate Lawson wrote:
>>
>>> In FreeBSD, we do this at the bus layer. So the ACPI and PCI bus
>>> code is responsible for powering down/up children. We currently do it:
>>>
>>> 1. When no driver is attached and on reprobe
>>> 2. When suspending/resuming, based on evaluating _SxD
>>>
>>> See this commit for details:
>>> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1604853+0+archive/2004/cvs-all/20041205.cvs-all
>>>
>>
>>
>>
>> Does _SxD represent the "desired" mode for the hardware, or merely the
>> highest state it can be left in? A mail from Len earlier this year
>> suggested that if S3D returned 0x2, that meant that either D3 or D2 were
>> acceptable.
>
>
> _SxD is the highest state supported by the device for a given sleep
> state, yes. We put devices in D3 unless _SxD specifies something
> higher. The reason to do this is some devices can't wake the system
> if they are in D3. ACPI 3.0 has ways to indicate a desired power
> state (not just maximum). I don't have any evidence but fear some
> devices won't work after resuming if set to D3 and they indicate this
> with an _SxD so we always use the value in _SxD if present.
>
>> Is there any reason why adding something like
>>
>> if (state==3) {
>> pci_set_power_state(dev,ACPI_STATE_D3COLD)
>> }
>>
>> to pci_device_suspend in the non-driver path and reenabling it in
>> pci_default_resume would result in things breaking?
>>
>> (Possibly with sanity checks as to whether it's a bridge or not)
>
>
> Not that I can think of. You probably want state == S3 || S4 since
> it's fine to power down devices for S4. You'll probably find drivers
> that don't properly resume their device. You have to make sure you
> power devices down after suspending them and power them up before
> resuming them.
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
next prev parent reply other threads:[~2004-12-12 1:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-11 15:37 Shutting down PCI devices on suspend Matthew Garrett
2004-12-11 19:50 ` Nate Lawson
[not found] ` <41BB4F70.9060606-Y6VGUYTwhu0@public.gmane.org>
2004-12-11 22:41 ` Matthew Garrett
2004-12-11 23:20 ` Nate Lawson
[not found] ` <41BB80C6.1020404-Y6VGUYTwhu0@public.gmane.org>
2004-12-12 1:44 ` Arjen Verweij [this message]
2004-12-11 21:31 ` Arjen Verweij
2004-12-12 16:44 ` Pavel Machek
[not found] ` <20041212164422.GD6286-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-12 17:01 ` Matthew Garrett
2004-12-12 17:15 ` Pavel Machek
[not found] ` <20041212171521.GC6272-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-12 19:29 ` Adam Belay
[not found] ` <20041212192913.GB2661-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>
2004-12-12 20:18 ` Pavel Machek
[not found] ` <20041212201810.GE6272-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-12 22:36 ` Adam Belay
[not found] ` <20041212223655.GC2661-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>
2004-12-12 23:01 ` Pavel Machek
[not found] ` <20041212230157.GH6272-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-13 0:11 ` Adam Belay
[not found] ` <20041213001125.GD2661-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>
2004-12-13 11:09 ` Pavel Machek
2004-12-12 23:23 ` Matthew Garrett
2004-12-13 10:52 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2004-12-13 1:59 Li, Shaohua
[not found] ` <16A54BF5D6E14E4D916CE26C9AD30575C12271-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-12-13 11:11 ` Pavel Machek
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=41BBA279.1090803@student.tudelft.nl \
--to=a.verweij-oe7qfrrrqfeezxfvzsaurfp6llvjujoh@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.