Re: Passing user-space addr. to PCI driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Medeiros Edward M NPRI wrote:
Hello,

I need to perform a "copy_to_user()" call in my PCI device driver. I need to do this to make available the data acquired by my PCI device to a user-space DSP routine. "copy_to_user()" has an input parameter that is the address of the user-space buffer My question is how can I pass this user-space buffer address to my PCI device driver? Alternatively, if I get_user_pages in my device driver and allocate the user-space buffer in my driver how can I pass this address to my user-space DSP process?

Thank you!!

your PCI device driver implements the read() and write() function. It's the way to get and put some data from you driver ! Or if the amount of data is too big, you can use a mmap function. It's explained in ldd 2nd edition (I guess it's in the 3rd too) at the char driver chapter I think.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux