From: Ian Jackson Date: Wed, 2 Apr 2008 15:28:10 +0000 (+0100) Subject: advertise write cache enabled when it is X-Git-Tag: xen-3.3.0-rc1~237 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=76a7df8cfdc7a8c2d89a181ab5196490f800f733;p=qemu-xen-3.3-testing.git advertise write cache enabled when it is 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 Signed-off-by: Ian Jackson --- diff --git a/hw/ide.c b/hw/ide.c index 8348f43f..1f60abd0 100644 --- 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));