On Tue, May 27, 2003, Randy.Dunlap <[EMAIL PROTECTED]> wrote: > On Fri, 23 May 2003 16:50:35 -0700 Greg KH <[EMAIL PROTECTED]> wrote: > > | On Thu, May 22, 2003 at 02:09:56PM -0400, Johannes Erdfelt wrote: > | > On Thu, May 22, 2003, Randy.Dunlap <[EMAIL PROTECTED]> wrote: > | > > As mentioned in Jan. 2001 [1] and on linux-hotplug-devel very > | > > recently [2], lsusb produces byte-swapped output on big-endian > | > > (e.g., PPC) systems -- for some USB descriptor fields. This is > | > > due to the following USB core code in usb_get_device_descriptor() > | > > [in 2.4.x and 2.5.x]: > | > > > | > > if (ret >= 0) { > | > > le16_to_cpus(&dev->descriptor.bcdUSB); > | > > le16_to_cpus(&dev->descriptor.idVendor); > | > > le16_to_cpus(&dev->descriptor.idProduct); > | > > le16_to_cpus(&dev->descriptor.bcdDevice); > | > > } > | > > > | > > so we always make these 4 fields native-endian, but other multi-byte > | > > fields are not modified. > | > > > | > > I doubt that this is a good time to change the USB core (if it should > | > > be done at all). However, lsusb can be modified to handle this > | > > endian-ness easily. I am attaching a patch to lsusb from usbutils > | > > version 0.11 that handles this. Tested/verified on x86 by me and on > | > > PPC by Alexander Kühn, who reported the Vosonic X-drive problem on > | > > linux-hotplug-devel. Thanks, Alex. > | > > > | > > This isn't the prettiest patch that I can imagine, but it does fix > | > > the problem. > | > > | > I've run into this problem as well and I think the fix should go into > | > the kernel. > | > | I agree, I'd take a patch for this for 2.5 right now if you want to make > | it. We can add it to 2.4 during the 2.4.22-pre series too. > > I agree that it's the right thing to do in 2.5. > IMO 2.4 shouldn't be touched. That would be like changing an ABI/API > in a stable kernel.
I disagree. It's been broken forever in 2.4 and no one has attempted to workaround it even. Just look at lsusb :) I think it should change for 2.5 and 2.4. JE ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel