Commit a7f3d65b authored by Pavel Hrdina's avatar Pavel Hrdina Committed by Kevin Wolf
Browse files

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: default avatarPavel Hrdina <phrdina@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 91d4093d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;