Lines Matching +full:usb +full:- +full:detect

1 .. _usb-persist:
3 USB device persistence during system suspend
13 According to the USB specification, when a USB bus is suspended the
14 bus must continue to supply suspend current (around 1-5 mA). This
16 detect connect-change events (devices being plugged in or unplugged).
19 If a USB device's power session is interrupted then the system is
26 By default, Linux behaves according to the spec. If a USB host
33 If the kernel wants to believe that your USB keyboard was unplugged
38 Unfortunately problems _can_ arise, particularly with mass-storage
41 filesystem on the device, you're out of luck -- everything in that
50 firmware (i.e., the BIOS) resets the motherboard's USB host
52 it's as though you had unplugged all the USB devices. Yes, it's
56 On many systems the USB host controllers will get reset after a
57 suspend-to-RAM. On almost all systems, no suspend current is
58 available during hibernation (also known as swsusp or suspend-to-disk).
62 In practice, people are forced to unmount any filesystems on a USB
63 device before suspending. If the root filesystem is on a USB device,
65 suspended -- but it will crash as soon as it wakes up, which isn't
72 The kernel includes a feature called USB-persist. It tries to work
73 around these issues by allowing the core USB device data structures to
74 persist across a power-session disruption.
76 It works like this. If the kernel sees that a USB host controller is
79 to each of the USB devices below that controller for which the
81 can't work once the power session is gone. Instead it issues a USB
82 port reset and then re-enumerates the device. (This is exactly the
83 same thing that happens whenever a USB device is reset.) If the
84 re-enumeration shows that the device now attached to that port has the
91 but a USB device was unplugged and then replugged, or if a USB device
100 The end result is that the USB device remains available and usable.
104 Note that the "USB-persist" feature will be applied only to those
108 echo 1 >/sys/bus/usb/devices/.../power/persist
123 to plug in a USB flash device, create a persistent volume associated
126 it would be more far-reaching than USB-persist.
130 solution is much quicker and easier -- and it exists now, a giant
133 Furthermore, the USB-persist feature applies to _all_ USB devices, not
134 just mass-storage devices. It might turn out to be equally useful for
138 WARNING: USB-persist can be dangerous!!
142 to make sure the USB device hasn't been changed; that is, the same
146 If you replace one USB device with another of the same type (same
148 kernel won't detect the change. The serial number string and other
153 Furthermore it's quite possible to leave a USB device exactly the same
155 USB card reader while the system is asleep, the kernel will have no
170 at all. The USB-persist feature can be extremely useful. Make the