On Wednesday 18 July 2012 12:40:38 Alan Stern wrote: > Oliver, you seem to be arguing both sides of this discussion. You But there are more than two sides in this discussion. > point out the the power-off operation is too dangerous in general for > the kernel to do it, and now you say that it's too racy for userspace > to do it. It is too dangerous in general. Therefore it may be safe in particular. > Are we to infer that you don't want it to be done at all? No, now that I think about it an attribute for the drivers is necessary. Like drivers have "supports_autosuspend" they also should have "supports_power_off". In addition it is necessary for ports to have an attribute in sysfs which allows user space to block power off. And it is a bit complicated. Power may be cut, if a) a port is internal and unpluggable, or b) a port is internal and it's interfaces' drivers set "supports_power_off", unless: 1) remote wakeup is requested 2) user space has blocked it via the new sysfs attribute 3) USB_QUIRK_RESET_MORPHS is set > What about things like the ubiquitous USB webcams one finds in laptops > these days? I practically never use the one in my laptop, so turning > off its bus power seems like a good idea. Even if that means I have to > turn the power on explicitly before using the webcam. That would work. Btusb wouldn't work. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html