linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* New PCI PM
       [not found] <Pine.LNX.4.10.10106121700580.13607-100000@nobelium.transmeta.com>
@ 2001-06-13  3:00 ` Jeff Garzik
  2001-06-13  4:00   ` Patrick Mochel
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2001-06-13  3:00 UTC (permalink / raw)
  To: Patrick Mochel; +Cc: Linux Kernel Mailing List


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)

or just one suspend call?

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

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

-- 
Jeff Garzik      | Andre the Giant has a posse.
Building 1024    |
MandrakeSoft     |

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: New PCI PM
  2001-06-13  3:00 ` New PCI PM Jeff Garzik
@ 2001-06-13  4:00   ` Patrick Mochel
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Mochel @ 2001-06-13  4:00 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel Mailing List


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-06-13  4:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 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).