Am Montag, 19. April 2004 21:22 schrieb Alan Stern: > On Mon, 19 Apr 2004, Oliver Neukum wrote: > > 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? > > The HCDs use it to determine the endpoint number, transfer direction, and > transfer type (ctrl, bulk, int, or iso).
Specifying these parameters that way is bad, because it is illogical. > > 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. > > I don't see why not. So long as the data structure is marked defunct so > that it can't be used for communication with the device after a > configuration change (for example), there's nothing wrong with leaving it > in memory until its refcount goes to 0. On which event would you zombify and reallocate? The interface is a representation of a device's attributes. A binding to a driver is just a convention at heart. You are making a layering violation. > > 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. > > Right now URBs aren't bound to anything when they are created. I've seen > proposals that they be bound to endpoints, interfaces, and devices. Are > there any possibilities left? altsettings :-) > Binding URBs to _something_ at or below the HCD level makes sense. > Allocation could be handled by the HCD itself, with the necessary Yes. That's a major performance boost. And will get rid of storage's deadlock problems. > hc-private data added automatically (but what about interference with the > variable-length iso packet descriptors at the end?). However elegant it Allocate the iso packet descriptors seperately. > may be, though, I don't see any need for _inactive_ URBs to be identified > with particular endpoints or interfaces. 1. It's a consequence of pushing allocation down the stack. They are specific to the parameters of allocation now. 2. It's a simplification. You eliminate the need to associate on submit and disassociate on the callback. 3. It's essential to let nuke_urbs() do all the work. 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