On Saturday, September 22, 2012, Rafael J. Wysocki wrote: > On Friday, September 21, 2012, Sarah Sharp wrote: > > Two weeks ago at Linux Plumbers Conference, I presented about the Intel > > Lynx Point USB port power off mechanism. This email is a report out of > > what was discussed, and a kick off point for further discussion. [...] > > ca9c9d0 usb : Add sysfs files to control port power. > > http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git;a=commit;h=ca9c9d0 I have reviewed the whole series (I suppose there's too late for adding Reviewed-by tags to it, but oh well ;-)) and the only patch I have some serious doubts about is the one above. In fact, I'd prefer it to be reverted for now. First off, if the power resources manipulated through those sysfs files are shared between ports (i.e. there are power domains), the interface isn't really well defined, because the advertised functionality (powering off/on a USB port) is not there in general. Second, I'm not sure if there's any way for user space to figure out what ports are connected to what sockets visible to user space. If there is such a way, I wonder what it is, if not, the proposed interface is just plain dangerous. Finally, it follows from my experience that interfaces of this kind often are sources of pain and grief for distro support folks who need to handle problems reported by users. I used to do that and I know what kind of pain that is. So, in my opinion it's better not to expose low-level functionality to user space directly, like in this case. Of course, I understand the desire to make the feature actually useful to someone, but what about making system suspend/hibernation use it to start with? The logic there should be quite straightforward. Thanks, Rafael -- 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