Hi! > > > For systems that don't provide VBUS current during the > > > upcoming system sleep state, it'd be more appropriate > > > to just disconnect() the drivers. > > > > No. Devices can have external power supplies. > > This is a tricky matter. With no VBUS current, it will appear to the host > that the device has been disconnected. When the system awakens, it will > see a disconnect followed by a new connection on the same port. This will > have the effect of unbinding and then rebinding the driver anyway, > regardless of whether the device had its own external power supply. (Note > that the USB standard does not allow devices to power their bus segment; > only the upstream port is allowed to provide power.) > > Since the final result is the same, it doesn't matter too much whether the > driver gets unbound before the sleep transition or after the wakeup. Well, imagine battery-backed usb display. You might want to write "I'm suspended to RAM" on the display when machine goes suspend-to-RAM. Hmm, if user than disconnects the display from the machine and resumes machine, it will say "I'm suspended to RAM" even through machine is running happily... If the driver wants to implement suspend as disconnect... well, why not. But for example usb disk, you probably want it to be left mounted during suspend but unplug should probably trigger emergency unmount. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!