USB: add power/persist device attribute
[safe/jmp/linux-2.6] / drivers / usb / core / Kconfig
index a08787e..97b09f2 100644 (file)
@@ -31,23 +31,34 @@ config USB_DEVICEFS
          For the format of the various /proc/bus/usb/ files, please read
          <file:Documentation/usb/proc_usb_info.txt>.
 
-         Please note that this code is completely unrelated to devfs, the
-         "/dev file system support".
-
-         Most users want to say Y here.
-
-config USB_BANDWIDTH
-       bool "Enforce USB bandwidth allocation (EXPERIMENTAL)"
-       depends on USB && EXPERIMENTAL
-       help
-         If you say Y here, the USB subsystem enforces USB bandwidth
-         allocation and will prevent some device opens from succeeding
-         if they would cause USB bandwidth usage to go above 90% of
-         the bus bandwidth.
-
-         If you say N here, these conditions will cause warning messages
-         about USB bandwidth usage to be logged and some devices or
-         drivers may not work correctly.
+         Usbfs files can't handle Access Control Lists (ACL), which are the
+         default way to grant access to USB devices for untrusted users of a
+         desktop system. The usbfs functionality is replaced by real
+         device-nodes managed by udev. These nodes live in /dev/bus/usb and
+         are used by libusb.
+
+config USB_DEVICE_CLASS
+       bool "USB device class-devices (DEPRECATED)"
+       depends on USB
+       default y
+       ---help---
+         Userspace access to USB devices is granted by device-nodes exported
+         directly from the usbdev in sysfs. Old versions of the driver
+         core and udev needed additional class devices to export device nodes.
+
+         These additional devices are difficult to handle in userspace, if
+         information about USB interfaces must be available. One device
+         contains the device node, the other device contains the interface
+         data. Both devices are at the same level in sysfs (siblings) and one
+         can't access the other. The device node created directly by the
+         usb device is the parent device of the interface and therefore
+         easily accessible from the interface event.
+
+         This option provides backward compatibility for libusb device
+         nodes (lsusb) when usbfs is not used, and the following udev rule
+         doesn't exist:
+           SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
+           NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
 
 config USB_DYNAMIC_MINORS
        bool "Dynamic USB minor allocation (EXPERIMENTAL)"
@@ -75,6 +86,30 @@ config USB_SUSPEND
 
          If you are unsure about this, say N here.
 
+config USB_PERSIST
+       bool "USB device persistence during system suspend (DANGEROUS)"
+       depends on USB && PM && EXPERIMENTAL
+       default n
+       help
+
+         If you say Y here and enable the "power/persist" attribute
+         for a USB device, the device's data structures will remain
+         persistent across system suspend, even if the USB bus loses
+         power.  (This includes hibernation, also known as swsusp or
+         suspend-to-disk.)  The devices will reappear as if by magic
+         when the system wakes up, with no need to unmount USB
+         filesystems, rmmod host-controller drivers, or do anything
+         else.
+
+               WARNING: This option can be dangerous!
+
+         If a USB device is replaced by another of the same type while
+         the system is asleep, there's a good chance the kernel won't
+         detect the change.  Likewise if the media in a USB storage
+         device is replaced.  When this happens it's almost certain to
+         cause data corruption and maybe even crash your system.
+
+         If you are unsure, say N here.
 
 config USB_OTG
        bool