Re: how to get virtual address from dma address

From: Ben Collins (bcollins@debian.org)
Date: Wed Oct 03 2001 - 17:03:54 EST


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/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:29 EST