Christopher Hoover wrote:
So all I/O buffers _must_ be allocated using kmalloc()


Use GFP_DMA flag on the kmalloc() call, too, whenever possible.
^^^^^^^^^^^^^^^^^

I'll disagree.  As a rule, avoid that unless you know you need it.
In most cases, USB drivers don't.


This will help avoid bounce buffering on some systems.

USB has a better solution, in 2.5 kernels: usb_buffer_alloc(). See Documentation/usb/dma.txt for more info ... including the pointer to DMA-mapping.txt, giving "complete" rules.

On "some systems" (like SA-1111 OHCI!) that call arranges
to return memory that fits into those awkward DMA windows.
("Under 1 MByte" in that case; "Under 16 MBytes" for ISA.)

- Dave






------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to