From patchwork Tue Nov 20 16:27:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 200390 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 CD5E92C008E for ; Wed, 21 Nov 2012 03:28:37 +1100 (EST) Received: from localhost ([::1]:59775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taqgd-0000DG-KL for incoming@patchwork.ozlabs.org; Tue, 20 Nov 2012 11:28:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taqfz-00072T-QU for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:27:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Taqfv-0002ko-PV for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:27:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taqfv-0002kZ-Hl for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:27:51 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAKGRorp025610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Nov 2012 11:27:51 -0500 Received: from dhcp-5-188.str.redhat.com (dhcp-200-232.str.redhat.com [10.33.200.232]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAKGRkSW016315; Tue, 20 Nov 2012 11:27:50 -0500 From: Kevin Wolf To: stefanha@redhat.com Date: Tue, 20 Nov 2012 17:27:44 +0100 Message-Id: <1353428864-19505-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1353428864-19505-1-git-send-email-kwolf@redhat.com> References: <1353428864-19505-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/2] 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 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 --- hw/ide/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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; }