From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDeOf-0000cS-0x for qemu-devel@nongnu.org; Mon, 08 Jun 2009 08:56:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDeOZ-0000S0-4w for qemu-devel@nongnu.org; Mon, 08 Jun 2009 08:56:15 -0400 Received: from [199.232.76.173] (port=54840 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDeOY-0000Rr-V6 for qemu-devel@nongnu.org; Mon, 08 Jun 2009 08:56:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]:41858) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDeOY-0007PZ-DR for qemu-devel@nongnu.org; Mon, 08 Jun 2009 08:56:10 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58Cu9g8005528 for ; Mon, 8 Jun 2009 08:56:09 -0400 From: Gleb Natapov Date: Mon, 8 Jun 2009 15:56:06 +0300 Message-Id: <1244465766-6349-3-git-send-email-gleb@redhat.com> In-Reply-To: <1244465766-6349-1-git-send-email-gleb@redhat.com> References: <1244465766-6349-1-git-send-email-gleb@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] Call piix3_reset() on system reset. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yaniv Kamay Also zero pci_irq_levels on reset to avoid stuck irq after reset. Signed-off-by: Gleb Natapov Signed-off-by: Yaniv Kamay --- 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