linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Mochel <mochel@transmeta.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: New PCI PM
Date: Tue, 12 Jun 2001 21:00:17 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10106122048520.13607-100000@nobelium.transmeta.com> (raw)
In-Reply-To: <3B26D739.944618E4@mandrakesoft.com>


On Tue, 12 Jun 2001, Jeff Garzik wrote:

> 
> What is are the guarantees about the order of calls to
> pci_driver::suspend and pci_driver::resume?
> 
> Will a driver get calls like
> 	suspend(D3)
> 	suspend(D2)
> 	suspend(D1)

Not possible, according to the PCI PM Spec. 

These are the possible state transitions:

+---------------------------+
| Current State | New State |
+---------------------------+
| D0            | D1, D2, D3|
+---------------------------+
| D1            | D2, D3    |
+---------------------------+
| D2            | D3        |
+---------------------------+
| D1, D2, D3    | D0        |
+---------------------------+

(note the last would be ::resume() from any state)

> or just one suspend call?

Calls to lower power states are possible, but never to higher, except D0.

> What effect does the return value have on the rest of the system?  On
> the order of succeeding calls to pci_driver::suspend functions?

On system suspend, it should be ignored. It sounds bad, but there is
justification. With a two-stage suspension, drivers will get a call to
::save_state before suspend. It is then that they should fail, if they're
going to. That way, nothing will be powered off yet, and a graceful
recovery is much more likely.

However, if you're gradually bringing the device down to lower and lower
power states, you may want to know if it fails (e.g. if it can't enter D1
or D2).

> And where is that patch to Documentation/pci.txt young man?  :)

It should be in -pre4. Quick Draw Torvalds couldn't wait an extra 15
minutes to release -pre3. 

	-pat


      reply	other threads:[~2001-06-13  4:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.10106121700580.13607-100000@nobelium.transmeta.com>
2001-06-13  3:00 ` New PCI PM Jeff Garzik
2001-06-13  4:00   ` Patrick Mochel [this message]

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=Pine.LNX.4.10.10106122048520.13607-100000@nobelium.transmeta.com \
    --to=mochel@transmeta.com \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).