From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjASW-0001V2-BZ for qemu-devel@nongnu.org; Thu, 13 Dec 2012 10:12:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjARf-00065P-US for qemu-devel@nongnu.org; Thu, 13 Dec 2012 10:12:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjARf-000652-MX for qemu-devel@nongnu.org; Thu, 13 Dec 2012 10:11:31 -0500 From: Kevin Wolf Date: Thu, 13 Dec 2012 16:10:42 +0100 Message-Id: <1355411450-12761-36-git-send-email-kwolf@redhat.com> In-Reply-To: <1355411450-12761-1-git-send-email-kwolf@redhat.com> References: <1355411450-12761-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 35/43] atapi: reset cdrom tray statuses on ide_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Pavel Hrdina 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 Signed-off-by: Kevin Wolf --- 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