qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] scsi: reset cdrom tray statuses on scsi_disk_re


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] scsi: reset cdrom tray statuses on scsi_disk_reset
Date: Fri, 17 May 2013 14:15:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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



reply via email to

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