On Tue, Jun 19, 2007 at 10:28:24AM -0400, Alan Stern wrote: > On Mon, 18 Jun 2007, Greg KH wrote: > > > > 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. > > > > No, the kernel does not do any conversion from little->native anymore, > > it's up to the different drivers to do that on their own if they want to > > use those fields. > > That's true for the in-memory data structures. However the information > sent to userspace when a process reads a usbfs file does have some of > the fields switched to native byte order. This is because usbfs > started out that way, and being a user API it could not be changed > later.
Yeah, I remember the confusion that happened when the internal structures were changed :) > The sysfs binary attributes I proposed would use the standard USB > little-endian byte order. They would simply export the raw descriptor > data directly. Ok, I have no objection to that. thanks, greg k-h ------------------------------------------------------------------------- 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