qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 35/43] atapi: reset cdrom tray statuses on ide_reset


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 35/43] atapi: reset cdrom tray statuses on ide_reset
Date: Thu, 13 Dec 2012 16:10:42 +0100

From: Pavel Hrdina <address@hidden>

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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 hw/ide/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index c4f93d0..1235612 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;
-- 
1.7.6.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]