On Tue, 12 Oct 2004, David Brownell wrote:

> > There's already code in hub_port_init to scrub ep0 for full-speed devices
> > when the ep0 maxpacket value is different from the initial guess.  I can
> > make that unconditional, for all devices.  Would that be okay?  
> 
> Not needed.  There are two cases where an HCD needs records
> to be invalidated (unless it's UHCI or other hardware that doesn't
> "know" such things:
> 
> (a) HCD records endpoint address, which changes after SET_ADDRESS.
>      that's what this patch addressed.

I'm not clear on this.  My assumption was that the controllers and drivers
kept track of things by device address and endpoint number (both found in
urb->pipe).  The change resulting from SET-ADDRESS wouldn't matter then,
because the address would be different so it would look like a completely
different queue.  But you're implying the driver uses the usb_device
struct (or maybe the embedded devnum field) as well, so that somehow it
realizes that ep0 at address 0 and ep0 at the new address really are the
same queue.  Is that right?

> (b) HCD records ep0maxpacket, which usbcore may have guessed
>      wrong for full speed devices.
> 
> Only an issue for ep0, only during enumeration, only those cases.
> Separate "scrub that state" calls are appropriate.

Do you think it would be a good precaution to scrub the state for address
0 _before_ doing anything, just in case there's any leftover garbage?

Alan Stern



-------------------------------------------------------
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