summary refs log tree commit diff stats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2012-11-26 16:37:39 +0100
committerKevin Wolf <kwolf@redhat.com>2012-11-30 11:33:24 +0100
commit0c6f08b0b0d0c758789cdb7257a48e873598bdbb (patch)
tree25b8c64f381de7b1215530dfe951783c2f894868 /hw/ide/core.c
parentd3067b020bdeb572f381c5be4420eedfd6af5884 (diff)
downloadfocaccia-qemu-0c6f08b0b0d0c758789cdb7257a48e873598bdbb.tar.gz
focaccia-qemu-0c6f08b0b0d0c758789cdb7257a48e873598bdbb.zip
atapi: make change media detection for guests easier
If you have a guest with a media in the optical drive and you change
it, the windows guest cannot properly recognize this media change.

Windows needs to detect sense "NOT_READY with ASC_MEDIUM_NOT_PRESENT"
before we send sense "UNIT_ATTENTION with ASC_MEDIUM_MAY_HAVE_CHANGED".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 8da894f240..c4f93d0e47 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2160,12 +2160,6 @@ static int ide_drive_post_load(void *opaque, int version_id)
 {
     IDEState *s = opaque;
 
-    if (version_id < 3) {
-        if (s->sense_key == UNIT_ATTENTION &&
-            s->asc == ASC_MEDIUM_MAY_HAVE_CHANGED) {
-            s->cdrom_changed = 1;
-        }
-    }
     if (s->identify_set) {
         bdrv_set_enable_write_cache(s->bs, !!(s->identify_data[85] & (1 << 5)));
     }