mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
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>
This commit is contained in:
parent
d3067b020b
commit
0c6f08b0b0
2 changed files with 10 additions and 11 deletions
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue