From patchwork Fri May 11 14:42:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 158528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0B040B7012 for ; Sat, 12 May 2012 00:43:32 +1000 (EST) Received: from localhost ([::1]:37862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSr45-0004C3-Ns for incoming@patchwork.ozlabs.org; Fri, 11 May 2012 10:43:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSr3b-0003tR-Uh for qemu-devel@nongnu.org; Fri, 11 May 2012 10:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSr3V-0003Ca-GY for qemu-devel@nongnu.org; Fri, 11 May 2012 10:42:59 -0400 Received: from thoth.sbs.de ([192.35.17.2]:29595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSr3V-0003CG-7B; Fri, 11 May 2012 10:42:53 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id q4BEgoMj029163; Fri, 11 May 2012 16:42:50 +0200 Received: from mchn199C.mchp.siemens.de ([139.22.114.193]) by mail1.siemens.de (8.13.6/8.13.6) with SMTP id q4BEgiv1026375; Fri, 11 May 2012 16:42:49 +0200 From: Jan Kiszka To: "Michael S. Tsirkin" Date: Fri, 11 May 2012 11:42:34 -0300 Message-Id: X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.2 Cc: qemu-stable@nongnu.org, qemu-devel , Alexander Graf Subject: [Qemu-devel] [PATCH v3 1/8] ahci: Fix reset of MSI function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Call msi_reset on device reset as still required by the core. CC: Alexander Graf CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka Acked-by: Alexander Graf --- hw/ide/ich.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 560ae37..242254e 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;