summaryrefslogtreecommitdiff
path: root/drivers/usb/core/generic.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-05-04 19:52:20 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-13 03:29:47 +0400
commit0458d5b4c9cc4ca0f62625d0144ddc4b4bc97a3c (patch)
tree8b1fcb4f063ef4aa6f2e3cd41a60d986a1e432d4 /drivers/usb/core/generic.c
parentce7cd137fced114d49178b73d468b82096a107fb (diff)
downloadlinux-0458d5b4c9cc4ca0f62625d0144ddc4b4bc97a3c.tar.xz
USB: add USB-Persist facility
This patch (as886) adds the controversial USB-persist facility, allowing USB devices to persist across a power loss during system suspend. The facility is controlled by a new Kconfig option (with appropriate warnings about the potential dangers); when the option is off the behavior will remain the same as it is now. But when the option is on, people will be able to use suspend-to-disk and keep their USB filesystems intact -- something particularly valuable for small machines where the root filesystem is on a USB device! Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/generic.c')
-rw-r--r--drivers/usb/core/generic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 7cbf992adccd..d363b0ea7345 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -217,7 +217,10 @@ static int generic_resume(struct usb_device *udev)
{
int rc;
- rc = usb_port_resume(udev);
+ if (udev->reset_resume)
+ rc = usb_reset_suspended_device(udev);
+ else
+ rc = usb_port_resume(udev);
/* Root hubs don't have upstream ports to resume or reset,
* so the line above won't do much for them. We have to