From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Pavel Machek <pavel@suse.cz>,
pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH 2/2] PCI PM: Introduce pci_preferred_state
Date: Fri, 9 May 2008 09:47:08 -0700 [thread overview]
Message-ID: <200805090947.08620.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200805091744.04749.rjw@sisk.pl>
> > > > I thought about that too. I'd like to know what the other people
> > > > think, though.
> > >
> > > The point of this isn't at all clear.
> > >
> > > Is this routine meant to be called during a hibernation
> > > transition?
> >
> > Yes, it is.
> >
> > > Or is it just for suspend?
> > >
> > > And why would the return value ever be anything other than D3_hot? (Or
> > > why would the driver ever want to put a device in a different state?)
> >
> > In principle, the driver may want to put the device into a state having
> > shorter wake up latency than D3_hot.
> >
> > > AFAICS, the only reason would be because platform_pci_choose_state()
> > > suggested something else. In which case there's no need for the
> > > "policy" argument.
> >
> > There is a need in two cases:
> > - if platform_pci_choose_state() is not defined (it only is defined for
> > ACPI systems at the moment),
> > - if platform_pci_choose_state() returns PCI_POWER_ERROR meaning that it
> > cannot handle the device.
> >
> > I agree with Pavel that the driver could pass a "fallback state" as a
> > second argument to be used in case the platform cannot provide it with
> > one.
>
> Modified patch follows.
So why not make platform_pci_choose_state do:
+ pci_power_t noacpi_pci_choose_state(struct pci_dev *dev, pci_message_t
state)
+ {
+ if (!pci_find_capability(dev, PCI_CAP_ID_PM))
+ return state;
+ }
instead? Then in the PCI core we would assign either
platform_pci_choose_state to acpi_pci_choose_state or noacpi_pci_choose_state
(though that's a bad name).
But really, since drivers should probably know what power state to put their
devices in for suspend & hibernate, maybe on non-ACPI systems the function
should just return an error and the driver can choose...
Jesse
next prev parent reply other threads:[~2008-05-09 16:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.0805071139020.3701-100000@iolanthe.rowland.org>
2008-05-07 18:32 ` [PATCH 2/2] PCI PM: Introduce pci_preferred_state Rafael J. Wysocki
[not found] ` <200805072032.58472.rjw@sisk.pl>
2008-05-09 15:44 ` Rafael J. Wysocki
[not found] ` <200805091744.04749.rjw@sisk.pl>
2008-05-09 16:47 ` Jesse Barnes [this message]
2008-05-09 17:13 ` Rafael J. Wysocki
[not found] ` <200805091913.40197.rjw@sisk.pl>
2008-05-09 17:24 ` Jesse Barnes
2008-05-09 17:34 ` Rafael J. Wysocki
[not found] ` <200805091934.41341.rjw@sisk.pl>
2008-05-09 17:37 ` Jesse Barnes
[not found] ` <200805091037.23767.jbarnes@virtuousgeek.org>
2008-05-09 21:44 ` Rafael J. Wysocki
[not found] ` <200805092344.53713.rjw@sisk.pl>
2008-05-09 22:13 ` Jesse Barnes
[not found] ` <200805091513.04194.jbarnes@virtuousgeek.org>
2008-05-09 22:57 ` Rafael J. Wysocki
[not found] ` <200805100057.01656.rjw@sisk.pl>
2008-05-10 18:28 ` Rafael J. Wysocki
2008-05-12 14:00 ` Pavel Machek
[not found] ` <20080512140013.GC1725@elf.ucw.cz>
2008-05-12 14:52 ` Rafael J. Wysocki
[not found] <200805071422.56147.rjw@sisk.pl>
2008-05-07 15:45 ` Alan Stern
[not found] <200805062342.42789.rjw@sisk.pl>
2008-05-06 21:49 ` Rafael J. Wysocki
[not found] ` <200805062349.18683.rjw@sisk.pl>
2008-05-07 9:33 ` Pavel Machek
[not found] ` <20080507093309.GE13858@elf.ucw.cz>
2008-05-07 12:22 ` 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=200805090947.08620.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@suse.cz \
--cc=rjw@sisk.pl \
/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