On 22 Jul 2004, David Meggy wrote:

> I needed a check for this when working on the national 9604 gadget
> driver.  The National chip only has an 8 byte fifo on end point 0. 
> Until the device is in the configured state I had to change wLength to
> 8, if I read a greater value.

I don't understand.  Are you saying that ep0 uses different maxpacket 
values in the default/addressed states and the configured state?  And that 
the value in the device descriptor is the correct maxpacket size in the 
configured state but is wrong for non-configured states?

Or are you saying that ep0 always has a maxpacket size equal to 8 but 
sometimes the device descriptor includes an incorrect larger value?

Either way, I don't see how the device could hope to work in general, and 
it certainly would be in violation of the USB spec.

>  I haven't checked the USB spec. but I
> think there is probably some logic behind MS's thinking and this is how
> things are supposed to work.

>From what Kyle wrote, I gather that some devices can't handle 
get_descriptor requests unless they are asked to transfer the entire 
descriptor.  Some devices may hang (or NAK) indefinitely, others may try 
to transfer more than they were asked to send.  The approach he described 
is a way to work around this problem, by always asking for the entire 
descriptor even before the maxpacket size is known, then resetting the 
port to clear whatever error condition was provoked.

On the other hand, Kyle also said that some devices don't work when asked 
to transfer 18 bytes in the initial get_descriptor, the implication being 
that they expect to see a 64-byte transfer request.  Or maybe he meant 
that some devices didn't work like that in his particular setup.

Either way, our best approach has got to be to use the current
standards-complaint strategy initially, and if that fails fall back on the 
Windows-like strategy (insofar as we understand how it works).  Do you 
have any suggestions for alternate approaches?

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&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