> > The docs say we should get URBs with usb_alloc_urb. However, CDCEther.c
> > embeds the URBs as part of ether_dev. I don't see that usb_alloc_urb
> > does anything special, except allocate extra space required when
> > requesting isoch frames. Therefore, does it really matter? Is it
> > preferable to use usb_alloc_urb?
> 
> It is strongly recommended. 

... but not required.

>    See it object oriented: usb_alloc_urb is the
> constructor, and the constructor is the only way to get the object.
> Currently it does nothing special, but it may do more sophisticated locking,
> usage counting etc. in the future. 

Right now the URB model has three startup phases:  allocate, initialize, submit.
The only stage where I think we have a "must do it this way" requirement is at
the usb_submit_urb() stage.  (And even in C++ the "allocate" can be done
as part of another object, the class only controls "initialize".)

On the other hand, I'd agree that until recently the specifications for what/how
URB fields must be initialized before submit has been pretty weak, so it was
risky to do anything other than usb_alloc_urb() and USB_FILL_*_URB() ... but
that's always seemed to me to be a significant bug.  (Which is, I hope, now
fixed in 2.5 ... as part of efforts to make sure all the host controller drivers have
the same input requirements, and behave the same way for outputs.)

- Dave



_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to