Skip to contentSkip to conversation

ioemu: advertise write cache enabled only when it is

PATCH New Samuel Thibault 1 participant 2 messages Apr 2, 2008 – Apr 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioemu: advertise write cache enabled only when it is

ioemu: advertise write cache enabled only when it is

tools/ioemu/hw/ide.c +1 -1
diff -r 59d2638a7243 tools/ioemu/hw/ide.c
@@ -660,7 +660,7 @@ static void ide_identify(IDEState *s)
     put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     put_le16(p + 84, (1 << 14));
     /* 14=nop 5=write_cache */
-    put_le16(p + 85, (1 << 14) | (1 << 5));
+    put_le16(p + 85, (1 << 14) | (s->write_cache << 5));
     /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
     put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     put_le16(p + 87, (1 << 14));
#1 lore raw

PATCH 1/1 ioemu: advertise write cache feature

ioemu: advertise write cache feature

tools/ioemu/hw/ide.c +2 -1
diff -r 633099ff88a8 tools/ioemu/hw/ide.c
@@ -655,7 +655,8 @@ static void ide_identify(IDEState *s)
     put_le16(p + 68, 120);
     put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
     put_le16(p + 81, 0x16); /* conforms to ata5 */
-    put_le16(p + 82, (1 << 14));
+    /* 14=nop 5=write_cache */
+    put_le16(p + 82, (1 << 14) | (1 << 5));
     /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
     put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     put_le16(p + 84, (1 << 14));