Re: Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Thursday 17 May 2007, Laurent Pinchart wrote:

> Shouldn't we implement scatter-gather for EHCI (and possibly other) 
> controllers ?

If by "scatter-gather" you mean "struct scatterlist", we've
had that support for some time now ... in usb_sg_*() routines.
That's the usual definition inside Linux.

But I suspect you mean something else, not well defined.  A
few things I've heard called "scatter gather" in the past:

 - Single copy I/O to buffers specified by kernel (or user)
   virtual addresses.  If the page boundaries are transfer
   buffer boundaries, that's handled already ... given a bit
   of glue code to pin the pages and dma-map them, and the
   same I/O queue mechanisms used by usb_sg_*().

 - Combining N buffers, which aren't aligned on wMaxPacketSize
   boundaries ... e.g. buffers of 10, 500, and 2 bytes combined
   into one 512 byte transfer.  This violates the fundamental
   model of what an URB signifies, so it wouldn't be at easy.

So for most definitions we *do* already handle scatter/gather.

- Dave

-------------------------------------------------------------------------
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/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.