After the storm, silence...  Does this mean that everyone is now happy with these
patches?   That's hard to believe...

> > So, what does happen if a disconnect happens while your sparkling new
> > static start_wait_urb sits in wait_for_completion()? How exactly is this
> > different?
> 
> in that case the urb fails, that's all.  If you drop the lock before the urb is
> submitted, it might get sent to the wrong endpoint.  Consider the following:
> (A) you drop the lock
> (B) someone calls usb_set_configuration
> (C) you submit the urb
> If the new configuration happens to have an endpoint with the same pipe
> as the one you are sending to, won't the urb be sent to it?

Can someone please confirm that this problem really exists?  If so, it is really
a problem with the way the core handles things.   My sparkling new start_wait_urb
is just a work-around for it (there may be other problems it avoids too, the whole
thing is a can of worms).  Probably urbs should take a pointer to a (reference
counted) interface, and not a pipe.

> > The patch attached to OSDL 3108 does not look good to me. The right
> > approach would be to do usb_dev_get to prevent disconnect from pulling
> > things from under you, then submit URBs.
> 
> I was talking about logical disconnect, not physical disconnect.  For example,
> usb_set_configuration calls device disconnect methods, but continues to use
> the same struct usb_device.  This is the kind of "disconnection" I was worried
> about.  By the way, there is no need to worry about the struct usb_device being
> freed: usbdev_open calls usb_get_dev, so the reference was taken far back in
> the mists of time :)

All the best,

Duncan.


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to