ide: Fix ide_drive_pio_state_needed()
authorKevin Wolf <kwolf@redhat.com>
Thu, 9 Jun 2011 12:12:57 +0000 (14:12 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 15 Jun 2011 12:36:15 +0000 (14:36 +0200)
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

index da250ac..e5def8b 100644 (file)
@@ -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)