From 10ca2943aab6646839769d78f80b0d5499efcbe9 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 27 Jun 2012 14:50:41 +1000 Subject: ide/ahci: Use universal DMA helper functions The AHCI device can provide both PCI and SysBus AHCI device emulations. For this reason, it wasn't previously converted to use the pci_dma_*() helper functions. Now that we have universal DMA helper functions, this converts AHCI to use them. The DMAContext is obtained from pci_dma_context() in the PCI case and set to NULL in the SysBus case (i.e. we assume for now that a SysBus AHCI has no IOMMU translation). Cc: Kevin Wolf Cc: Michael S. Tsirkin Signed-off-by: David Gibson Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Anthony Liguori --- hw/ide/ich.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ide/ich.c') diff --git a/hw/ide/ich.c b/hw/ide/ich.c index e3eaaea882..319bc2bb10 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -98,7 +98,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev) uint8_t *sata_cap; d = DO_UPCAST(struct AHCIPCIState, card, dev); - ahci_init(&d->ahci, &dev->qdev, 6); + ahci_init(&d->ahci, &dev->qdev, pci_dma_context(dev), 6); pci_config_set_prog_interface(d->card.config, AHCI_PROGMODE_MAJOR_REV_1); -- cgit v1.2.1