Re: New USB stack on FreeBSD w/Linux emulation layer coming

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
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.

Alan Stern


-------------------------------------------------------------------------
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.