]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ide/macio: Fix macio DMA initialisation.
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 24 Feb 2013 20:46:11 +0000 (20:46 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Apr 2013 20:39:59 +0000 (15:39 -0500)
Commit 07a7484e5d713f1eb7c1c37b18a8ab0d56d88875 accidentally introduced a bug
in the initialisation of the second macio DMA device which could cause some
DMA operations to segfault QEMU.

CC: Andreas Färber <afaerber@suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 02d583c7232d65920634f7553700eb348f84e472)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/macio.c

index 74bdcd10397bb3d55421ca993460e1a5ef9a5ce8..0c6a6b8e7abb6c49bcc82d1c4ba779ce57f4af4b 100644 (file)
@@ -188,7 +188,7 @@ static int macio_newworld_initfn(PCIDevice *d)
     sysbus_dev = SYS_BUS_DEVICE(&ns->ide[1]);
     sysbus_connect_irq(sysbus_dev, 0, ns->irqs[3]);
     sysbus_connect_irq(sysbus_dev, 1, ns->irqs[4]);
-    macio_ide_register_dma(&ns->ide[0], s->dbdma, 0x1a);
+    macio_ide_register_dma(&ns->ide[1], s->dbdma, 0x1a);
     ret = qdev_init(DEVICE(&ns->ide[1]));
     if (ret < 0) {
         return ret;