> > No, you are repeating the old error on a new level. > > You cannot tell from an interface-endpoint whether the submission is > > legal or not. The binding of an interface to a driver can change an > > arbitrary number of times, even rebinding to the same driver is legal. > > > > You need to record the binding somewhere and use it during submission. > > I see two options to allow that. > > 1. You really make a new data structure like usb_driver_binding > > 2. You record it in the URB meaning changes to usb_alloc_urb() > > I was being too imprecise. What I mean is, yes, we should have something > like a refcounted data structure that refers to an individual endpoint in > an individual interface, and URBs should be submitted for one of these
This somehow doesn't add up. The data structure bound to is the interface and the real addressing is done to a device/endpoint pair. In fact, why do we have a pipe member anyway? > structures. But ep0 still needs special treatment. We could, for > example, add one of these data structures for ep0 to _each_ interface, in > addition to having a special one that doesn't belong to any interface and > is used for overall device management (like SET_CONFIGURATION URBs). > > Or maybe a little simpler, submit URBs for the refcounted interface > structures -- no need to specify the endpoint since that's already > recorded in the pipe member. We'd need some way to submit URBs for ep0 > independent of any interface, though. Yes, but we must not refcount interfaces. We cannot refcount _any_ data structure being an internal representation of a physical USB device. Probe() and disconnect() are entirely software events. The most elegant solution would seem to be refcounting URBs. We do that, but an URB doesn't have an undead state. That would require us to add an interface argument to usb_alloc_urb(). Then we could zombify URBs and submissions to ep0 for no driver could be done by allocating URBs with NULL as an interface parameter. Regards Oliver ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel