aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/ide.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/ide.c b/hw/ide.c
index 686d372d18..33e8b39329 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -2308,8 +2308,15 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
break;
case WIN_DIAGNOSE:
ide_set_signature(s);
- s->status = READY_STAT | SEEK_STAT;
- s->error = 0x01;
+ if (s->is_cdrom)
+ s->status = 0; /* ATAPI spec (v6) section 9.10 defines packet
+ * devices to return a clear status register
+ * with READY_STAT *not* set. */
+ else
+ s->status = READY_STAT | SEEK_STAT;
+ s->error = 0x01; /* Device 0 passed, Device 1 passed or not
+ * present.
+ */
ide_set_irq(s);
break;
case WIN_SRST: