From patchwork Wed Nov 21 10:12:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 200626 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D83EF2C008F for ; Wed, 21 Nov 2012 21:24:46 +1100 (EST) Received: from localhost ([::1]:36515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb7U4-0002uP-Gy for incoming@patchwork.ozlabs.org; Wed, 21 Nov 2012 05:24:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb7Ti-0002cK-M4 for qemu-devel@nongnu.org; Wed, 21 Nov 2012 05:24:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tb7Tg-0004bN-AR for qemu-devel@nongnu.org; Wed, 21 Nov 2012 05:24:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb7Tg-0004Za-2D for qemu-devel@nongnu.org; Wed, 21 Nov 2012 05:24:20 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qALAOJSs004803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Nov 2012 05:24:19 -0500 Received: from localhost (ovpn-112-23.ams2.redhat.com [10.36.112.23]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qALAOI4Q004738; Wed, 21 Nov 2012 05:24:19 -0500 From: Stefan Hajnoczi To: Anthony Liguori Date: Wed, 21 Nov 2012 11:12:32 +0100 Message-Id: <1353492752-16084-6-git-send-email-stefanha@redhat.com> In-Reply-To: <1353492752-16084-1-git-send-email-stefanha@redhat.com> References: <1353492752-16084-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 5/5] ide: Fix status register after short PRDs 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 From: Kevin Wolf When failing a request because the length of the regions described by the PRDT was too short for the requested number of sectors, the IDE emulation forgot to update the status register, so that the device would keep the BSY flag set indefinitely. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- hw/ide/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index c2ab787..8da894f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -625,6 +625,7 @@ void ide_dma_cb(void *opaque, int ret) if (s->bus->dma->ops->prepare_buf(s->bus->dma, ide_cmd_is_read(s)) == 0) { /* The PRDs were too short. Reset the Active bit, but don't raise an * interrupt. */ + s->status = READY_STAT | SEEK_STAT; goto eot; }