From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk4yF-00087Y-S0 for qemu-devel@nongnu.org; Wed, 14 Sep 2016 03:51:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk4yE-0002eL-Qq for qemu-devel@nongnu.org; Wed, 14 Sep 2016 03:51:03 -0400 Received: from [59.151.112.132] (port=57925 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk4yE-0002ZU-E5 for qemu-devel@nongnu.org; Wed, 14 Sep 2016 03:51:02 -0400 From: Cao jin Date: Wed, 14 Sep 2016 15:51:03 +0800 Message-ID: <1473839464-8670-8-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1473839464-8670-1-git-send-email-caoj.fnst@cn.fujitsu.com> References: <1473839464-8670-1-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 7/8] megasas: undo the overwrites of msi user configuration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hannes Reinecke , Paolo Bonzini , Markus Armbruster , Marcel Apfelbaum , "Michael S. Tsirkin" Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Signed-off-by: Cao jin --- hw/scsi/megasas.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 90cd873..ff314a2 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2333,11 +2333,10 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp) "msi=off with this machine type.\n"); error_propagate(errp, err); return; - } else if (ret) { - /* With msi=auto, we fall back to MSI off silently */ - s->msi = ON_OFF_AUTO_OFF; - error_free(err); } + assert(!err || s->msix == ON_OFF_AUTO_AUTO); + /* With msi=auto, we fall back to MSI off silently */ + error_free(err); } memory_region_init_io(&s->mmio_io, OBJECT(s), &megasas_mmio_ops, s, -- 2.1.0