aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-05-16 20:33:14 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 18:04:11 -0400
commitb9827e4b29edb4af1481b75efdf9ea2d8a7ffc96 (patch)
treefd8aabed6f397cd7ce968211bccdaa1993f5c4d6 /Documentation/power
parentb761d9d867bcc29e8de3e62d1d72b27e75078ca6 (diff)
[PATCH] USB: correct the USB info in Documentation/power/swsusp.txt
The swsusp.txt documentation harshes confusingly on USB, and this patch addresses the issue. It's harsh because it blames USB for some issues that are generic to all drivers -- especially those supporting removable media -- and it's confusing since it says that USB has the issue with "suspend" not just swsusp ... while in reality, USB doesn't have the issue when real system suspend states are used. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/power')
-rw-r--r--Documentation/power/swsusp.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index d7814a113ee1..516c5019013b 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -18,10 +18,11 @@ Some warnings, first.
18 * 18 *
19 * (*) suspend/resume support is needed to make it safe. 19 * (*) suspend/resume support is needed to make it safe.
20 * 20 *
21 * If you have any filesystems on USB devices mounted before suspend, 21 * If you have any filesystems on USB devices mounted before software suspend,
22 * they won't be accessible after resume and you may lose data, as though 22 * they won't be accessible after resume and you may lose data, as though
23 * you have unplugged the USB devices with mounted filesystems on them 23 * you have unplugged the USB devices with mounted filesystems on them;
24 * (see the FAQ below for details). 24 * see the FAQ below for details. (This is not true for more traditional
25 * power states like "standby", which normally don't turn USB off.)
25 26
26You need to append resume=/dev/your_swap_partition to kernel command 27You need to append resume=/dev/your_swap_partition to kernel command
27line. Then you suspend by 28line. Then you suspend by
@@ -204,7 +205,7 @@ Q: There don't seem to be any generally useful behavioral
204distinctions between SUSPEND and FREEZE. 205distinctions between SUSPEND and FREEZE.
205 206
206A: Doing SUSPEND when you are asked to do FREEZE is always correct, 207A: Doing SUSPEND when you are asked to do FREEZE is always correct,
207but it may be unneccessarily slow. If you want USB to stay simple, 208but it may be unneccessarily slow. If you want your driver to stay simple,
208slowness may not matter to you. It can always be fixed later. 209slowness may not matter to you. It can always be fixed later.
209 210
210For devices like disk it does matter, you do not want to spindown for 211For devices like disk it does matter, you do not want to spindown for
@@ -357,17 +358,25 @@ Q: Is this true that if I have a mounted filesystem on a USB device and
357I suspend to disk, I can lose data unless the filesystem has been mounted 358I suspend to disk, I can lose data unless the filesystem has been mounted
358with "sync"? 359with "sync"?
359 360
360A: That's right. It depends on your hardware, and it could be true even for 361A: That's right ... if you disconnect that device, you may lose data.
361suspend-to-RAM. In fact, even with "-o sync" you can lose data if your 362In fact, even with "-o sync" you can lose data if your programs have
362programs have information in buffers they haven't written out to disk. 363information in buffers they haven't written out to a disk you disconnect,
364or if you disconnect before the device finished saving data you wrote.
363 365
364If you're lucky, your hardware will support low-power modes for USB 366Software suspend normally powers down USB controllers, which is equivalent
365controllers while the system is asleep. Lots of hardware doesn't, 367to disconnecting all USB devices attached to your system.
366however. Shutting off the power to a USB controller is equivalent to 368
367unplugging all the attached devices. 369Your system might well support low-power modes for its USB controllers
370while the system is asleep, maintaining the connection, using true sleep
371modes like "suspend-to-RAM" or "standby". (Don't write "disk" to the
372/sys/power/state file; write "standby" or "mem".) We've not seen any
373hardware that can use these modes through software suspend, although in
374theory some systems might support "platform" or "firmware" modes that
375won't break the USB connections.
368 376
369Remember that it's always a bad idea to unplug a disk drive containing a 377Remember that it's always a bad idea to unplug a disk drive containing a
370mounted filesystem. With USB that's true even when your system is asleep! 378mounted filesystem. That's true even when your system is asleep! The
371The safest thing is to unmount all USB-based filesystems before suspending 379safest thing is to unmount all filesystems on removable media (such USB,
372and remount them after resuming. 380Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays)
381before suspending; then remount them after resuming.
373 382