David Brownell said: > Charles Lepple wrote: >> >> While writing USB firmware for the PIC16C765, I noticed that lsusb >> can't read the string descriptors from even the stock Microchip >> firmware. This seems to be limited to lsusb, as the strings show up in >> /proc/bus/usb/devices and in the HID driver's initialization message. [...] > Some firmware, like maybe in your case, has the converse problem: > host requests N bytes, device firmware won't just return the > descriptor (smaller than N bytes). > > In both cases the devices are clearly not conformant to the USB spec, > and the best fix is to make the firmware handle both cases correctly. > Always return min(setup.wLength, descriptor size) bytes.
I think I got it. Between this suggestion, and a conversation with Randy Dunlap, I found the problem: the Microchip USB Chapter 9 code was doing only an 8-bit compare between setup.wLength and the descriptor size. lsusb seems to be requesting a multiple of 256 bytes, as the firmware was returning a zero-length packet. Thanks for the help, guys. If anyone is interested in the Microchip firmware patch, email me. Eventually, I'll submit it to Microchip, but that may take some time (there are other 8-bit compares in the code as well). -- Charles Lepple <[EMAIL PROTECTED]> http://www.ghz.cc/charles/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel