lkml.org 
[lkml]   [2001]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to get virtual address from dma address
On Wed, Oct 03, 2001 at 02:48:58PM -0700, Linux Bigot wrote:
> oops! I am sorry. I did not meant "pci_unmap_single"
> pci_unmap_single.
>
> I meant to get a routine which does exactly opposite
> of what pci_map_single does, i.e., give me a virtual
> address for a dma address.

pci_unmap_single is the exact opposite of pci_map_single. It unmaps a
memory region. It just doesn't do what you want.

Bottom line, to keep your driver portable, you are going to have to keep
a mapping of the dma and real addresses either in a structure as most
drivers do, or as a hash like a couple difficult ones do.


Ben

--
.----------=======-=-======-=========-----------=====------------=-=-----.
/ Ben Collins -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.043 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site