Hi everyone,
I'm standing a little bit on the other side of the road - I am currently developing a USB HID. Things work with Windows 98 and XP, but with Linux (both 2.4.24 and 2.6.3) I get errors when it tries to receive the device descriptor. 2.4.24 tells me:
usb.c: USB device descriptor short read (expected 18, got 2)
Maybe your firmware didn't act right on the previous device descriptor read, which was for just eight bytes. Linux will usually issue SETUP, IN DATA/8, OUT DATA/0 ... three stages.
Since Windows does things OK, I'm just wondering what to blame - is my device too slow? Does Linux send out the requests faster than Windows? Or is there a bug in Linux taking the last packet size for the entire packet size? I've been looking around in usb.c and adding a few debug messages here and there, but I didn't gain any interesting information from them...
Any or all of those could be, though I'd suspect not that last one.
I also tried deactivating the first test when reading only 8 Bytes from the device to get the maximum endpoint packet size and setting maximum packet size manually - and it seems as if I got the entire descriptor without errors, but the next descriptor, the configuration descriptor, fails in that case with a similar error (...short read (expected 25, got 9))
One possibility would be that your firmware has a bug in how it handles short GET_DESCRIPTOR requests, which affects the next request.
The idiom Linux uses is to read a partial descriptor (to find out the full length), and then the whole thing. Some devices would misbehave otherwise. I think most production devices _don't_ misbehave this way, but there will surely be some.
- Dave
Hope anyone can point me to the right direction...
TIA, Heiko
------------------------------------------------------- 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
