Am Dienstag, 22. Mai 2007 17:23 schrieb Alan Stern: > On Tue, 22 May 2007, Laurent Pinchart wrote: > > > The usb_buffer_alloc name is misleading. Many USB driver developers believe > > it > > is a generic purpose buffer allocator. > > > > I'd like to change usb_buffer_alloc to make it a general purpose allocator. > > A > > parameter would tell the function to just allocate memory (default > > behaviour) > > or to allocate a DMA coherent mapping as well. We could even pass the URB > > pointer to the function to set the URB_TRANSFER_NO_DMA_MAP automatically > > (although usb_buffer_alloc can be used to allocate the setup buffer, so the > > API might have to be a little different). > > It would be simpler and less objectionable to just change the name of > the routine. If it were called usb_alloc_coherent_DMA_buffer() then > people wouldn't be tempted to think it was a general-purpose allocator.
I thought a bit about this. Maybe there _is_ room for an allocator that will provide memory the HCD can get at, but without the full overhead of allocating a coherent buffer. Regards Oliver ------------------------------------------------------------------------- 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