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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ce7cd137fc
commit
0458d5b4c9
@@ -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
|
||||
|
Reference in New Issue
Block a user