Please keep all email traffic on the list. On Fri, 11 Feb 2011, Chris Furlough wrote: > On Fri, 2011-02-11 at 12:52 -0500, Alan Stern wrote: > > > Depends on what you mean. When you say the response is wLength, do you > > mean that usb_control_msg returns a value equal to wLength? Or do you > > mean that the device somehow sends a buffer containing the value of > > wLength? Or do you mean that the device sends a buffer whose length is > > wLength? > > usb_control_msg returns wLength, and the buffer that I get back is > wLength bytes long. Which means the device has sent wLength bytes to the computer. > > I don't know what the device is supposed to do. Doesn't the Audio > > class specification say? > > Nothing useful. The only mention is section 5.2.7.1 of wLength is in > Table 5-19 where it is defined as "Length of parameter block". > > Alan, more to the point, should the device only return the data that it > has, and as such a result (say 10, if it only has 10 bytes of data), or > should it return those 10 bytes of data as the first 10 bytes in a > buffer that is wLength size, and always returns wLength? As I said before, I don't know what the device is supposed to do. What does the audio class spec have to say about the response to a memory request? > I understand that what a device does is up to the device, but what is > deemed to be the "correct" functionality? It's up to the class spec. The general rule is that devices should only return as much data as they have available (up to a maximum of wLength bytes), but individual classes are allowed to make exceptions to the general rules. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html