From patchwork Thu Feb 23 14:42:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 142641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 97096B6EE8 for ; Fri, 24 Feb 2012 01:43:31 +1100 (EST) Received: from localhost ([::1]:51890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0ZtH-0003k9-4l for incoming@patchwork.ozlabs.org; Thu, 23 Feb 2012 09:43:27 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Zsz-0003Pd-Nk for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0Zsu-00071M-78 for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:43:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Zsu-000717-0Z for qemu-devel@nongnu.org; Thu, 23 Feb 2012 09:43:04 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1NEh3lk030581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Feb 2012 09:43:03 -0500 Received: from localhost (ovpn-113-76.phx2.redhat.com [10.3.113.76]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1NEh2AK024619; Thu, 23 Feb 2012 09:43:02 -0500 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Thu, 23 Feb 2012 12:42:53 -0200 Message-Id: <1330008174-26084-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1330008174-26084-1-git-send-email-lcapitulino@redhat.com> References: <1330008174-26084-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 4/5] ide: drop ide_tray_state_post_load() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is used to sync the physical tray state after migration when using CD-ROM passthrough. However, migrating when using passthrough is broken anyway and shouldn't be supported... So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED event, which is going to be introduced by the next commit. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster Acked-by: Kevin Wolf --- hw/ide/core.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 0856385..ce570a7 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2077,15 +2077,6 @@ static bool ide_drive_pio_state_needed(void *opaque) || (s->bus->error_status & BM_STATUS_PIO_RETRY); } -static int ide_tray_state_post_load(void *opaque, int version_id) -{ - IDEState *s = opaque; - - bdrv_eject(s->bs, s->tray_open); - bdrv_lock_medium(s->bs, s->tray_locked); - return 0; -} - static bool ide_tray_state_needed(void *opaque) { IDEState *s = opaque; @@ -2125,7 +2116,6 @@ static const VMStateDescription vmstate_ide_tray_state = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .post_load = ide_tray_state_post_load, .fields = (VMStateField[]) { VMSTATE_BOOL(tray_open, IDEState), VMSTATE_BOOL(tray_locked, IDEState),