summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-05-11 11:42:34 -0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-06-25 08:55:00 -0500
commit1658e3cd893e3a35d89388fdd736a6d81cb405e8 (patch)
treeef183e3d8b1a69f489de9db6030a4b19e0432ecc
parentrtl8139: honor RxOverflow flag in can_receive method (diff)
downloadqemu-kvm-1658e3cd893e3a35d89388fdd736a6d81cb405e8.tar.gz
qemu-kvm-1658e3cd893e3a35d89388fdd736a6d81cb405e8.tar.bz2
qemu-kvm-1658e3cd893e3a35d89388fdd736a6d81cb405e8.zip
ahci: Fix reset of MSI function
Call msi_reset on device reset as still required by the core. CC: Alexander Graf <agraf@suse.de> CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 868a1a52267daddf933ee18480ae036da029b561) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--hw/ide/ich.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/ide/ich.c b/hw/ide/ich.c
index 560ae3761..242254e8d 100644
--- a/hw/ide/ich.c
+++ b/hw/ide/ich.c
@@ -84,6 +84,14 @@ static const VMStateDescription vmstate_ahci = {
.unmigratable = 1,
};
+static void pci_ich9_reset(void *opaque)
+{
+ struct AHCIPCIState *d = opaque;
+
+ msi_reset(&d->card);
+ ahci_reset(opaque);
+}
+
static int pci_ich9_ahci_init(PCIDevice *dev)
{
struct AHCIPCIState *d;
@@ -102,7 +110,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev)
/* XXX Software should program this register */
d->card.config[0x90] = 1 << 6; /* Address Map Register - AHCI mode */
- qemu_register_reset(ahci_reset, d);
+ qemu_register_reset(pci_ich9_reset, d);
msi_init(dev, 0x50, 1, true, false);
d->ahci.irq = d->card.irq[0];
@@ -133,7 +141,7 @@ static int pci_ich9_uninit(PCIDevice *dev)
d = DO_UPCAST(struct AHCIPCIState, card, dev);
msi_uninit(dev);
- qemu_unregister_reset(ahci_reset, d);
+ qemu_unregister_reset(pci_ich9_reset, d);
ahci_uninit(&d->ahci);
return 0;