From patchwork Wed Jun 8 10:26:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 99397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DFC67B6FE7 for ; Wed, 8 Jun 2011 20:30:35 +1000 (EST) Received: from localhost ([::1]:55933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUG1s-0006ao-Kb for incoming@patchwork.ozlabs.org; Wed, 08 Jun 2011 06:30:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUFyM-0006aN-St for qemu-devel@nongnu.org; Wed, 08 Jun 2011 06:26:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUFyK-0003gP-G3 for qemu-devel@nongnu.org; Wed, 08 Jun 2011 06:26:50 -0400 Received: from goliath.siemens.de ([192.35.17.28]:27923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUFyK-0003ft-6K for qemu-devel@nongnu.org; Wed, 08 Jun 2011 06:26:48 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p58AQkcg002268; Wed, 8 Jun 2011 12:26:46 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p58AQjw5017096; Wed, 8 Jun 2011 12:26:46 +0200 From: Jan Kiszka To: "Michael S. Tsirkin" Date: Wed, 8 Jun 2011 12:26:43 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 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.28 Cc: Alexander Graf , qemu-devel , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 5/7] ahci/intel-hda: Properly reset MSI state 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 Also invoke msi_reset on device reset to unsure proper config space state. CC: Gerd Hoffmann CC: Alexander Graf Signed-off-by: Jan Kiszka --- hw/ide/ahci.c | 2 ++ hw/intel-hda.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 1f008a3..feb0ea9 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1159,6 +1159,8 @@ void ahci_reset(void *opaque) struct AHCIPCIState *d = opaque; int i; + msi_reset(&d->card); + d->ahci.control_regs.irqstatus = 0; d->ahci.control_regs.ghc = 0; diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 71843f1..5dd69c7 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -1117,6 +1117,8 @@ static void intel_hda_reset(DeviceState *dev) DeviceState *qdev; HDACodecDevice *cdev; + msi_reset(&d->pci); + intel_hda_regs_reset(d); d->wall_base_ns = qemu_get_clock_ns(vm_clock);