From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEPYA-0003ap-JC for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEPY3-0003qI-Ug for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEPY3-0003q8-Nr for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:03 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s74LC3Ux006540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 4 Aug 2014 17:12:03 -0400 From: John Snow Date: Mon, 4 Aug 2014 17:11:16 -0400 Message-Id: <1407186691-16103-16-git-send-email-jsnow@redhat.com> In-Reply-To: <1407186691-16103-1-git-send-email-jsnow@redhat.com> References: <1407186691-16103-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v2 15/30] ide: stop PIO transfer on errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, jsnow@redhat.com, stefanha@redhat.com, mst@redhat.com From: Paolo Bonzini This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 00fe043..91a17e6 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -420,6 +420,7 @@ BlockDriverAIOCB *ide_issue_trim(BlockDriverState *bs, static inline void ide_abort_command(IDEState *s) { + ide_transfer_stop(s); s->status = READY_STAT | ERR_STAT; s->error = ABRT_ERR; } @@ -605,9 +606,7 @@ void ide_set_inactive(IDEState *s, bool more) void ide_dma_error(IDEState *s) { - ide_transfer_stop(s); - s->error = ABRT_ERR; - s->status = READY_STAT | ERR_STAT; + ide_abort_command(s); ide_set_inactive(s, false); ide_set_irq(s->bus); } -- 1.9.3