summaryrefslogtreecommitdiff
path: root/qemu
diff options
context:
space:
mode:
authorths <ths>2007-08-19 21:46:53 +0000
committerths <ths>2007-08-19 21:46:53 +0000
commit6503d9a84d3309c8120679288dac31f0f6d3e576 (patch)
tree8941b2ab43c04582fb9c77d60b6a257a4b867ef2 /qemu
parentc0142b3621f515ae0ac98a806365a84a6d68bc50 (diff)
Fix bugs in the ATAPI cdrom driver, by Brandon Philips.
Diffstat (limited to 'qemu')
-rw-r--r--qemu/hw/ide.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c
index 9acb02a8..e84c4d67 100644
--- a/qemu/hw/ide.c
+++ b/qemu/hw/ide.c
@@ -671,7 +671,8 @@ static void ide_transfer_start(IDEState *s, uint8_t *buf, int size,
s->end_transfer_func = end_transfer_func;
s->data_ptr = buf;
s->data_end = buf + size;
- s->status |= DRQ_STAT;
+ if (!(s->status & ERR_STAT))
+ s->status |= DRQ_STAT;
}
static void ide_transfer_stop(IDEState *s)
@@ -1969,6 +1970,7 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
/* overlapping commands not supported */
if (s->feature & 0x02)
goto abort_cmd;
+ s->status = READY_STAT;
s->atapi_dma = s->feature & 1;
s->nsector = 1;
ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE,