On Thursday 17 May 2007, David Brownell wrote: > 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_*().
That's what I meant, yes. The idea is to vmalloc() a buffer instead of using kmalloc() or get_free_pages(). usb_sg_* creates a URB per sg entry. What I'd like to know is if this could be handled by the USB stack. Users would submit a single URB with a vmalloc buffer, and the buffer would be transparently split if required. Is that doable, too difficult or impossible (due to hardware constraints) ? > - 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. And it wouldn't be that useful anyway. > So for most definitions we *do* already handle scatter/gather. Laurent Pinchart ------------------------------------------------------------------------- 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