qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/3] Call piix3_reset() on system reset.


From: Gleb Natapov
Subject: [Qemu-devel] [PATCH 3/3] Call piix3_reset() on system reset.
Date: Mon, 8 Jun 2009 15:56:06 +0300

Also zero pci_irq_levels on reset to avoid stuck irq after reset.

Signed-off-by: Gleb Natapov <address@hidden>
Signed-off-by: Yaniv Kamay <address@hidden>
---
 hw/piix_pci.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 914a65a..7b545ac 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -267,6 +267,8 @@ static void piix3_reset(PCIDevice *d)
     pci_conf[0xab] = 0x00;
     pci_conf[0xac] = 0x00;
     pci_conf[0xae] = 0x00;
+
+    memset(pci_irq_levels, 0, sizeof(pci_irq_levels));
 }
 
 static void piix4_reset(PCIDevice *d)
@@ -339,6 +341,7 @@ int piix3_init(PCIBus *bus, int devfn)
         PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION; // 
header_type = PCI_multifunction, generic
 
     piix3_reset(d);
+    qemu_register_reset(piix3_reset, 0, d);
     return d->devfn;
 }
 
-- 
1.6.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]