[quoted lines by Greg KH on 2007/06/18 at 18:55 -0700] >What specific data do you want to see be being returned here?
Every USB device has a piece of top-level static data known as a device descriptor. It's cached by the kernel when the device is connected, and is returned as the first 18 bytes read from a usbfs file descriptor. It's this same data which I'd like to read via sysfs so as to avoid resuming any devices (which is what happens when opening a usbfs file). This device descriptor is, among other things, what one must inspect in order to find the device you're looking for as it contains things like vendour and product identifiers. A USB device also has descriptors at lower levels for components such as its interfaces and endpoints. These, too, are static pieces of data. For completeness, although we ourselves don't need sysfs support for them, it'd be logical to provide sysfs files for each of them as well. >The USB configuration data? Like you read from the binary usbfs file if >you open and read from it? Yes. What you get when you read a usbfs file is the device descriptor followed by all of the interface and endpoint descriptors for the currently selected device configuration. >If so, then I have no objection to that, as long as you are taking data >directly from the device and not parsing it at all in the kernel and passing >it on to userspace. I believe usbfs does a little->native endian conversion on a couple of the 2-byte device descriptor fields (the vendour and product ids, if my memory is working correctly today). It'd be okay with me if that weren't done, although it'd be nice if it were so as to minimize the effort to convert applications like lsusb. >Look at the PCI file called "config" in sysfs and see if that is what >you are looking for. It's probably the same in concept, but it doesn't contain the actual data. I'm not familiar with how PCI works, but the data in that ifle is probably relevant for describing and/or accessing the device at the PCI level. Perhaps it was in another message wherein you asked if the file could be called "configuration" rather than "descriptor". The problem with this is that the term "configuration" has a very well-defined meaining with respect to USB devices. The generic USB term for this data really is "descriptor", and, especially if this information were to be provided at all levels, that would be the intuitive term to use. -- Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me EMail: [EMAIL PROTECTED] | Canada K2A 1H7 | if you're concerned about Hell. http://FamilyRadio.com/ | http://Mielke.cc/bible/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users