> > > The call will setup one or two pre-allocated USB transfers for the
> > > emulation layer between the Linux USB stack and the FreeBSD USB stack.
> >
> > So what's a "transfer" ... just a bunch of TDs?  And what would be
> > the advantage to a Linux driver, since the TDs are allocated on
> > demand in any case?
> 
> A "USB transfer" on FreeBSD is equivalent to an URB on Linux. The difference 
> is that on FreeBSD the "USB transfer", struct usbd_xfer, has pointers to 
> pre-allocated TD's, QH's and data-buffers.

So it's not equivalent at all then.  The call you want to add would
be the first of many, and would imply a second I/O model.  Linux only
associates a QH and TDs -- where relevant! -- on a temporary basis,
while I/O is pending.


> > All Linux drivers are allowed to assume on-the-fly allocation though.
> > That's a simpler model than mandatory pre-allocation.  In this context,
> > simpler is better.
> 
> Why is it simpler than pre-allocation?

If you've already got one model, why would you need a second one?

When you've got a model that doesn't care where the buffer came
from, needing to adopt a second one where you *do* need to care is
obviously adding complexity.  And that's on top of the performance
cost of needing to copy into particular buffers.


Also, the current Linux model only exposes resources to drivers
if they actually need to manage them:  URBs, and buffers (which
may come from upper layers of the driver stack).  Implementation
details (like a TD or other DMA descriptor, QH, etc) are managed
separately.

- Dave



> > Seems to me that your "Linux emulation" is missing some important
> > characteristics!
> 
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to