Alan Stern wrote:

It sure looks as though usbmodules could stand a little rewriting. The

Better still, it could be eliminated for 2.6 based distros, given code to handle "coldplug" by scanning sysfs.


18-byte call is Get_Device_Descriptor, and the 9- and 32-byte calls are Get_Configuration_Descriptor. All that information is already available through usbfs and sysfs; there's no reason at all to do I/O with the device. Furthermore the timeouts are ridiculously low, but maybe that's been changed in a more recent version of the hotplug package.

"usbbmodules" is part of "usbutils" though. I sent out a patch to usbutils 0.11 a while ago that fixed the ridiculous timeouts for the "lsusb" program, but it didn't touch "usbmodules" (which I've just disabled on all my systems, since lately it makes more trouble than it solves).

There are rumors of a "usbutils 0.12" but it's not yet available
through CVS or anything.  And the main change to it seems to be
making it use "libusb" ... which I actually don't like, since that
means it's a real PITA to add some descriptor fetch heuristics (*)
that I've found essential.  Net result, works worse than the
patched version of 0.11 that I'm using.

Of course, "lsusb" is annoying to use lately since mounting
usbfs with "devmode=0666" stopped working a while back, so
it can only be run as root.  Bleech.

- Dave

(*)  Those heuristics include retries, and using an alternate
     descriptor fetch strategies for devices that don't behave
     well with the default:

       - Some devices work with "read length, then read all"
       - Others dislike that and need "read extra, return short".

     Arguably the root problem in that case is in the kernel's
     descriptor fetch code ... or maybe all the HCDs have a
     common issue with control transfers.  The problems are most
     visible fetching config descriptors and strings.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to