From patchwork Thu Sep 1 18:37:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 112957 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 81A68B6F76 for ; Fri, 2 Sep 2011 04:39:11 +1000 (EST) Received: from localhost ([::1]:55375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzCAM-0003dl-ID for incoming@patchwork.ozlabs.org; Thu, 01 Sep 2011 14:39:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzC9V-0000fw-L2 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzC9U-0004Io-LX for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:38:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzC9U-0004IM-71 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:38:12 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p81IcBWr023103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Sep 2011 14:38:11 -0400 Received: from localhost (ovpn-113-117.phx2.redhat.com [10.3.113.117]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p81IcAHG002661; Thu, 1 Sep 2011 14:38:10 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Thu, 1 Sep 2011 15:37:52 -0300 Message-Id: <1314902275-5240-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1314902275-5240-1-git-send-email-lcapitulino@redhat.com> References: <1314902275-5240-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com Subject: [Qemu-devel] [PATCH 3/6] ide: Support I/O status 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 Signed-off-by: Luiz Capitulino --- hw/ide/core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 41f2679..16b422f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -527,6 +527,7 @@ static int ide_handle_rw_error(IDEState *s, int error, int op) s->bus->error_status = op; bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read); vm_stop(RSTATE_IO_ERROR); + bdrv_iostatus_update(s->bs, error); } else { if (op & BM_STATUS_DMA_RETRY) { dma_buf_commit(s, 0); @@ -1801,6 +1802,7 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind, } ide_reset(s); + bdrv_iostatus_enable(bs); bdrv_set_removable(bs, s->drive_kind == IDE_CD); return 0; }