]> git.proxmox.com Git - mirror_qemu.git/commit - hw/usb/hcd-xhci.c
usb-xhci: Use PCI DMA helper functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 4 Apr 2012 00:15:58 +0000 (10:15 +1000)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 26 Apr 2012 10:21:16 +0000 (12:21 +0200)
commit59a70ccd3be29d2c5034cf7f22de0cf4e9156432
treeaaa475e0700b4be9cfcf3218e6eee3d42e0e4a95
parent0b377169b18d702d980d526578d8515900ca6eb1
usb-xhci: Use PCI DMA helper functions

Shortly before 1.0, we added helper functions / wrappers for doing PCI DMA
from individual devices.  This makes what's going on clearer and means that
when we add IOMMU support somewhere in the future, only the general PCI
code will have to change, not every device that uses PCI DMA.

However, usb-xhci is not using these wrappers, despite being a PCI only
device.  This patch remedies the situation, using the pci dma functions
instead of direct calls to cpu_physical_memory_{read,write}().  Likewise
address parameters for DMA are changed to dma_addr_t instead of
target_phys_addr_t.

[ kraxel: removed #ifdefs ]

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c