From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] ioemu: advertise write cache enabled only when it is Date: Wed, 2 Apr 2008 11:45:48 +0100 Message-ID: <20080402104548.GD4618@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ioemu: advertise write cache enabled only when it is Signed-off-by: Samuel Thibault diff -r 59d2638a7243 tools/ioemu/hw/ide.c --- a/tools/ioemu/hw/ide.c Tue Apr 01 18:06:20 2008 +0100 +++ b/tools/ioemu/hw/ide.c Wed Apr 02 11:09:21 2008 +0100 @@ -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));