From: Kevin Wolf Date: Thu, 9 Jun 2011 12:12:57 +0000 (+0200) Subject: ide: Fix ide_drive_pio_state_needed() X-Git-Tag: v0.15.0-rc0~167^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdc650d76d785ba56b1e87c260ce96d8e22c7cc8;p=thirdparty%2Fqemu.git ide: Fix ide_drive_pio_state_needed() 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 --- diff --git a/hw/ide/core.c b/hw/ide/core.c index da250ac39bd..e5def8b3b15 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)