aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2012-12-11 08:55:48 +0100
committerKevin Wolf <kwolf@redhat.com>2012-12-13 11:17:35 +0100
commita7f3d65b65b8c86a5ff0c0abcfefb45e2ec6fe4c (patch)
tree708dcca40fa75be61d8f2082a8feda75f9d0835f
parent91d4093dce58e343e2336324794daa93517b86c2 (diff)
atapi: reset cdrom tray statuses on ide_reset
Tray statuses should be also reseted. Some guests may lock the tray and after reset before any kernel is loaded the tray should be unlocked. Also if you reset the real computer the tray is closed. We should do the same in qemu. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--hw/ide/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index c4f93d0e47..1235612d95 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1869,6 +1869,8 @@ static void ide_reset(IDEState *s)
s->io_buffer_index = 0;
s->cd_sector_size = 0;
s->atapi_dma = 0;
+ s->tray_locked = 0;
+ s->tray_open = 0;
/* ATA DMA state */
s->io_buffer_size = 0;
s->req_nb_sectors = 0;