qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] atapi: reset cdrom tray statuses on ide_reset
@ 2012-12-11  7:55 Pavel Hrdina
  2012-12-13 10:18 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Hrdina @ 2012-12-11  7:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: phrdina

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 <phrdina@redhat.com>
---
 hw/ide/core.c | 2 ++
 1 file changed, 2 insertions(+)

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.8.0.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] atapi: reset cdrom tray statuses on ide_reset
  2012-12-11  7:55 [Qemu-devel] [PATCH 1/1] atapi: reset cdrom tray statuses on ide_reset Pavel Hrdina
@ 2012-12-13 10:18 ` Kevin Wolf
  2012-12-13 10:44   ` Pavel Hrdina
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2012-12-13 10:18 UTC (permalink / raw)
  To: Pavel Hrdina; +Cc: qemu-devel

Am 11.12.2012 08:55, schrieb 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 <phrdina@redhat.com>

Thanks, applied to the block branch.

Do we need to reset more fields, like s->events?

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] atapi: reset cdrom tray statuses on ide_reset
  2012-12-13 10:18 ` Kevin Wolf
@ 2012-12-13 10:44   ` Pavel Hrdina
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Hrdina @ 2012-12-13 10:44 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On Thu, 2012-12-13 at 11:18 +0100, Kevin Wolf wrote:
> Am 11.12.2012 08:55, schrieb 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 <phrdina@redhat.com>
> 
> Thanks, applied to the block branch.
> 
> Do we need to reset more fields, like s->events?
> 
> Kevin

Good point, I'll check that.

Pavel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-13 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11  7:55 [Qemu-devel] [PATCH 1/1] atapi: reset cdrom tray statuses on ide_reset Pavel Hrdina
2012-12-13 10:18 ` Kevin Wolf
2012-12-13 10:44   ` Pavel Hrdina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).