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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Alan Stern 2007-05-04 11:52:20 -04:00 • committed by Greg Kroah-Hartman
commit 0458d5b4c9
10 changed files with 351 additions and 77 deletions

View file

@ -1015,7 +1015,7 @@ static void hid_pre_reset(struct usb_interface *intf)
hid_suspend(intf, PMSG_ON);
}
static void hid_post_reset(struct usb_interface *intf)
static void hid_post_reset(struct usb_interface *intf, int reset_resume)
{
struct usb_device *dev = interface_to_usbdev (intf);