From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdJZf-0008Fm-4y for qemu-devel@nongnu.org; Fri, 17 May 2013 08:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdJZa-00062z-Fl for qemu-devel@nongnu.org; Fri, 17 May 2013 08:15:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdJZZ-00062j-S5 for qemu-devel@nongnu.org; Fri, 17 May 2013 08:15:46 -0400 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 r4HCFivX031325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 May 2013 08:15:45 -0400 Message-ID: <51961F68.10701@redhat.com> Date: Fri, 17 May 2013 14:15:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5194FE7D.6070904@redhat.com> <5194FFDE.1000408@redhat.com> <5195053B.1070507@redhat.com> <51961B3F.3090503@redhat.com> <51961C3C.1010507@redhat.com> <51961E6C.7060108@redhat.com> In-Reply-To: <51961E6C.7060108@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: reset cdrom tray statuses on scsi_disk_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: kwolf@redhat.com, qemu-devel@nongnu.org Il 17/05/2013 14:11, Pavel Hrdina ha scritto: > On 17.5.2013 14:02, Paolo Bonzini wrote: >> Il 17/05/2013 13:57, Pavel Hrdina ha scritto: >>>> >>>> What happens when you suspend the QEMU machine to RAM? I believe the >>>> tray should remain open or, if closed, should remain locked. Can you >>>> try the same test on bare-metal (hint: boot to emergency mode to bypass >>>> anything that udev can do with locking the tray, then use sg_prevent to >>>> toggle the state). >>> >>> I've booted to init 1, then ejected the CD-ROM tray and run the >>> pm-suspend. The computer has suspended successfully. And again >>> immediately after the computer is turned on before the screen is turned >>> on the CD-ROM tray is closed. >> >> Ok, these are good signs. :) >> >>> I don't have SCSI CD-ROM device to use the sg_prevent. >> >> All CD-ROMs ultimately speak SCSI (via ATAPI). You don't have /dev/sr0? >> >> Paolo >> > > Yes I have. If I run "sg_prevent /dev/sr0" the CD-ROM tray could be > still opened. Even with "sg_prevent -p 3 /dev/sr0". Try "init=/bin/sh". Runlevel 1 might not be enough. Also, you can try "echo 0 > /sys/block/sr0/event_poll_msecs" Paolo