On Mon, 23 Jan 2006, Steve Finney wrote: > Back in June 2004, Alan Stern answered a question about whether > it was possible to power off individual USB ports via /sys with > a resounding "No". Has this changed in later kernel versions? I notice > there is a devices/*/power/state file which is writeable.
Let me give a more careful answer. You _can_ power off individual USB ports _provided_ the hardware supports it. A user program to do exactly that was posted on this list within the last couple of weeks. That having been said, you should note that almost none of the USB controller hardware found in desktop/laptop computers and a surprisingly small percentage of external hubs support port power control. (I say surprisingly because power control is a requirement in the USB 2.0 spec, so to me anything less than 100% is surprising.) > Our particular issue is that we have a USB flash device which sometimes > doesn't enumerate, and we're interested in whether there's a (simple) > way from user space software to force a re-enumeration of that > port only. Currently we have a monolithic kernel, so module unloading > is not an option (would that work if it were?). Indeed it would. Another way to force re-enumeration is to unbind the hub driver from the root hub and then rebind it. This can be accomplished by a simple shell script, using sysfs (if your kernel is sufficiently recent). It would probably be good enough just to do a runtime suspend & resume of the root hub's interface; also doable by a simple shell script. By the way, does your flash device sometimes fail to enumerate when attached to a host running Windows? Do you have any idea why it fails to enumerate? Is it something wrong with the device or something that needs to be fixed in the Linux stack? Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
