]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
advertise write cache enabled when it is
authorIan Jackson <iwj@mariner.uk.xensource.com>
Wed, 2 Apr 2008 15:28:10 +0000 (16:28 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2008 11:16:24 +0000 (12:16 +0100)
Advertise device status word 85 bit 5 (write cache enabled) only when
it is.  Adapted from a related patch for xen-unstable from Samuel
Thibault.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/ide.c

index 8348f43f5c555ee2602606082de52a6f6e101928..1f60abd0186488d2fc0202c7797ef29c2232a2ab 100644 (file)
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -565,7 +565,7 @@ static void ide_identify(IDEState *s)
     /* 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));
-    put_le16(p + 85, (1 << 14));
+    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));