"Mayhall, Tony" wrote:
>
> Does anyone have an example (that works) of how to DMA from a PCI card into
> user space on a PC running Linux? We do this on Unix systems and need to be
> able to do this under Linux.
Have your driver use remap_page_range to make the DMA pages for your
card visible to the mmap() caller. Then have userspace mmap directly to
the DMA-able pages.
If you are really mean you want userspace to talk directly to MMIO
address space on a PCI card, then you use io_remap_page_range instead,
but otherwise the above procedure is the same.
For sample code, grep for remap_page_range in drivers/* of any recent
Linux kernel source tree.
Jeff
-- Jeff Garzik | Liberty is always dangerous, but Building 1024 | it is the safest thing we have. MandrakeSoft, Inc. | -- Harry Emerson Fosdick- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:30 EST