On Wednesday 16 May 2007, David Brownell wrote: > On Tuesday 15 May 2007, Laurent Pinchart wrote: > > Hi everybody, > > > > following the discussion about the split bulk transfers, Alan Stern and > > David Brownell told me I shouldn't use usb_buffer_alloc as a generic > > purpose URB buffer allocated. However, Documentation/usb/dma.txt > > contradicts this. Should the documentation be fixed, or can/should > > usb_buffer_alloc be used to allocate URB buffers ? > > I think the doc should be fixed ... avoid using it as a general purpose > allocator. We've learned better since that doc was first written. :) > > It *can* be used to allocate buffers, in cases where the DMA map/unmap > overhead of the more typical usage would excessive. So it's not going > to vanish.
As I explained in my answer to Alan's mail, I think a general purpose allocator will be needed if we implement scatter-gather support for EHCI controllers (provided I'm not mistaken and that the hardware actually supports it). Even without scatter-gather, a general purpose allocator could allocate virtual memory instead of physically contiguous pages for PIO USB host controllers. Could we change usb_buffer_alloc and turn it into a general purpose allocator ? A flag could be used to DMA-map the buffer when needed. 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