From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUf32-0003Qg-TP for qemu-devel@nongnu.org; Thu, 09 Jun 2011 09:13:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUf2v-00020U-Mz for qemu-devel@nongnu.org; Thu, 09 Jun 2011 09:13:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUf2v-00020M-6u for qemu-devel@nongnu.org; Thu, 09 Jun 2011 09:13:13 -0400 From: Kevin Wolf Date: Thu, 9 Jun 2011 15:15:57 +0200 Message-Id: <1307625358-20040-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1307625358-20040-1-git-send-email-kwolf@redhat.com> References: <1307625358-20040-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] ide: Fix ide_drive_pio_state_needed() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@gmail.com, armbru@redhat.com, quintela@redhat.com When a failed PIO request caused the VM to stop, we still need to transfer the PIO state even though DRQ=0 at this point. Signed-off-by: Kevin Wolf --- hw/ide/core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index da250ac..e5def8b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1837,7 +1837,8 @@ static bool ide_drive_pio_state_needed(void *opaque) { IDEState *s = opaque; - return (s->status & DRQ_STAT) != 0; + return ((s->status & DRQ_STAT) != 0) + || (s->bus->error_status & BM_STATUS_PIO_RETRY); } static bool ide_atapi_gesn_needed(void *opaque) -- 1.7.5.2