public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Suspended devices and drivers
@ 2005-09-04 16:13 Alan Stern
  2005-09-04 20:46 ` David Brownell
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2005-09-04 16:13 UTC (permalink / raw)
  To: Linux-pm mailing list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1626 bytes --]

Is there any recommendation about what to do when a driver is probed
for a suspended device?  Probably most drivers don't bother to check
the device state; if they encounter errors because the device doesn't
respond the way they expect, the probe will simply fail.  (The USB
subsystem, for example, doesn't take this into account.)  One possible
answer is that this should be handled at the bus level -- the bus
subsystem could be responsible for setting a device to full power
before probing, or it could rely on individual device drivers doing
whatever they need.  It would be nicer if a common solution could be
found that would work uniformly for all devices and buses.  (As part
of such a solution, buses could have a standard policy that devices
with no driver should be left in a low-power state.)

A related problem is faced by USB drivers in a boot kernel.  The
current design relies on USB devices maintaining their state across a
suspend/resume, even suspend to disk.  This makes things difficult
when resuming from disk; the boot kernel has to realize that it
shouldn't disturb the state of any USB devices.  At the moment this
isn't handled very well.  For instance, it would be largely a matter
of luck if you could do STD with the image stored in a swap partition
on a USB storage device.

In fact, maybe it's a mistake to expect USB devices to maintain their
state across STD.  After all, devices on the motherboard aren't
expected to; it's generally accepted that drivers will restore
whatever state is necessary as part of their resume procedure.  Why
shouldn't USB devices behave the same way?

Alan Stern


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2005-09-12  2:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-04 16:13 Suspended devices and drivers Alan Stern
2005-09-04 20:46 ` David Brownell
2005-09-05  1:25   ` Alan Stern
2005-09-05 17:09     ` Alan Stern
2005-09-05 23:27       ` David Brownell
2005-09-06 14:50         ` Alan Stern
2005-09-06 15:18           ` David Brownell
2005-09-06 15:46             ` Alan Stern
2005-09-11 19:06               ` David Brownell
2005-09-11 19:16                 ` Alan Stern
2005-09-11 21:42                   ` David Brownell
2005-09-12  2:33                   ` Dmitry Torokhov
2005-09-06 19:47           ` Rafael J. Wysocki
2005-09-11  1:55       ` Leo L. Schwab
2005-09-11 19:03         ` Alan Stern
2005-09-06  0:13     ` David Brownell
2005-09-06 15:19       ` Alan Stern
2005-09-11 19:03         ` David Brownell
2005-09-11 20:06           ` Alan Stern
2005-09-11 22:27             ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox