[linux-pm] Suspended devices and drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux