On Fri, 2004-10-08 at 09:08, Alan Stern wrote:
> The new scheme (the "Windows" scheme) is the one used by current Microsoft 
> operating systems (and therefore supported by virtually every USB device, 
> one would hope):
> 
>       Reset the device
>       Set endpoint 0 maxpacket to {8, 64, 64} for {low, full, high}-speed
>       Send 64-byte GET-DEVICE-DESCRIPTOR request.  Since the
>               descriptor is only 18 bytes long, this will terminate
>               with a short packet.  But if the maxpacket size is 8
>               or 16 the device may be waiting to transmit some more.

If the device has a 8 or 16 byte endpoint 0 fifo (full-speed device),
then the device will want to send more data, while the host is trying to
send ZLP.  This could create a large numbers of NAKs, and result in an
extra few seconds of initialization.  At least this happens on Windows. 
Maybe another way to this would be to send the reset earlier if the
device doesn't acknowledge the ZLP after a very small number of NAKs.

Looking at my USB analyzer for my device plugged into Windows I see
Setup Packet            start time: 4.679256
In Packet(8 bytes)      start time: 4.680255
Out Packet(5085 NAKs)   start time: 4.682255
Reset                   start time: 9.768606

*Time is seconds from turning on the analyzer.

That is a long time for a device to startup, and it hasn't even received
an address yet.

>       Reset the device again (clears out any data the device is waiting
>               to send)
>       Set endpoint 0 maxpacket to the correct value
>       Send SET-ADDRESS
>       Send full 18-byte GET-DEVICE-DESCRIPTOR request

David

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: [EMAIL PROTECTED]
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to