qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@gmail.com,
	armbru@redhat.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 2/3] ide: Fix ide_drive_pio_state_needed()
Date: Thu,  9 Jun 2011 15:15:57 +0200	[thread overview]
Message-ID: <1307625358-20040-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1307625358-20040-1-git-send-email-kwolf@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 <kwolf@redhat.com>
---
 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

  parent reply	other threads:[~2011-06-09 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 13:15 [Qemu-devel] [PATCH 0/3] IDE and live migration fun Kevin Wolf
2011-06-09 13:15 ` [Qemu-devel] [PATCH 1/3] ide: Split error status from status register Kevin Wolf
2011-06-09 13:27   ` Paolo Bonzini
2011-06-09 14:07     ` Kevin Wolf
2011-06-09 14:26       ` Paolo Bonzini
2011-06-09 13:15 ` Kevin Wolf [this message]
2011-06-09 13:15 ` [Qemu-devel] [PATCH 3/3] ide: Add forgotten VMSTATE_END_OF_LIST in subsection Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307625358-20040-3-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).