On Tue, 21 Apr 2009, Greg KH wrote: > On Tue, Apr 21, 2009 at 03:45:14PM -0400, Alan Stern wrote: > > On Tue, 21 Apr 2009, Greg KH wrote: > > > > > On Tue, Apr 21, 2009 at 12:52:12PM -0400, Alan Stern wrote: > > > > On Tue, 21 Apr 2009, Scott James Remnant wrote: > > > > > > > > > Modern systems do not use usbfs; the entries within it are files, > > > > > not device nodes, and do not support ACLs which are the default way to > > > > > provide access to USB devices to untrusted users. > > > > > > > > > > It is replaced by device-nodes maintained by udev in /dev/bus/usb, > > > > > libusb uses this device nodes. > > > > > > > > > > Mark the option as deprecated, and hide entirely for non-embedded builds > > > > > (which may not be using udev but require raw USB device access). > > > > > > > > I don't like this at all. usbfs provides /proc/bus/usb/devices, and > > > > some of the information in that file is not easily available anywhere > > > > else. > > > > > > What is lacking in sysfs? Here's a script from Randy Dunlap that pretty > > > much provides the equilivant. > > > > That's a nice script. Translating it into Perl might speed it up a > > bit. > > True, speed isn't really an issue for this, is it? No, not really. But it is noticeably slow. If it is going to be widely distributed, it ought to run faster. > > What's missing in the script (or in sysfs)? Several things. > > > > The script doesn't list the parent and port values. No > > doubt they can be added; certainly they are present in sysfs. > > > > The script doesn't print bandwidth allocation information for > > root hubs. > > Do we export that information anywhere? Nowhere in sysfs. I suppose it could be added to the usb_hostN class directory. > > You can't poll it to detect when devices are added or > > removed (although there may be other ways of doing this). > > libudev provides this now. > > > Sysfs doesn't contain information about configurations > > other than the current one, whereas /proc/bus/usb/devices > > lists all the configs. > > That's the big one. We should be able to just pull it out of the raw > configuration. I was going to work on making usbview do that. > > > By contrast, lsusb _does_ print all the configs. But the values it > > shows are taken from the device, not from the kernel's current data > > structures. > > Would they be different? They can be. The kernel does a certain amount of filtering when it parses and checks the configuration, interface, and endpoint descriptors. > Now I love this file, have for many many years. But the rest of usbfs > really does not need to be mounted anywhere, anymore. I tried to take > it out of a few distros a number of years ago, but vmware messed up and > still relied on it. Now that is fixed so we should be able to drop this > as well. > > Maybe we can just move this devices file to /proc/ somewhere else? That would be okay with me. Or maybe export it as a device node, to be created as /dev/bus/usb/devices. That would match what the rest of usbfs has been doing. Alan Stern -- 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