From patchwork Tue Nov 30 17:58:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 73767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 88EF9B6EED for ; Wed, 1 Dec 2010 20:27:12 +1100 (EST) Received: from localhost ([127.0.0.1]:60591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNixu-00040r-3F for incoming@patchwork.ozlabs.org; Wed, 01 Dec 2010 04:27:06 -0500 Received: from [140.186.70.92] (port=43098 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNe1r-0006Oe-Dv for qemu-devel@nongnu.org; Tue, 30 Nov 2010 23:11:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNUSS-0005vY-Gv for qemu-devel@nongnu.org; Tue, 30 Nov 2010 12:57:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNUSS-0005sS-9E for qemu-devel@nongnu.org; Tue, 30 Nov 2010 12:57:40 -0500 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.13.8/8.13.8) with ESMTP id oAUHvaFp013455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Nov 2010 12:57:36 -0500 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAUHvH8n020770; Tue, 30 Nov 2010 12:57:35 -0500 From: Kevin Wolf To: anthony@codemonkey.ws Date: Tue, 30 Nov 2010 18:58:18 +0100 Message-Id: <1291139900-20329-15-git-send-email-kwolf@redhat.com> In-Reply-To: <1291139900-20329-1-git-send-email-kwolf@redhat.com> References: <1291139900-20329-1-git-send-email-kwolf@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. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 14/16] ide: Set bus master inactive on error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org BMIDEA in the status register must be cleared on error. This makes FreeBSD respond (more) correctly to I/O errors. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- 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 7136ade..430350f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -486,6 +486,8 @@ void ide_dma_error(IDEState *s) ide_transfer_stop(s); s->error = ABRT_ERR; s->status = READY_STAT | ERR_STAT; + ide_dma_set_inactive(s->bus->bmdma); + s->bus->bmdma->status |= BM_STATUS_INT; ide_set_irq(s->bus); }