qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ide: set WCACHE supported in IDENTIFY data
@ 2010-10-04 13:29 Christoph Hellwig
  2010-10-08 12:03 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2010-10-04 13:29 UTC (permalink / raw)
  To: qemu-devel

ATA does not only have the WCACHE enabled bit in identify word 85, but also
a WCACHE supported bit in word 82.  While the Linux kernel is fine with the
latter at least hdparm also needs the former before correctly displaying
the cache settings.  There's also a non-zero chance other operating systems
are more picky in their volatile write cache detection.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: qemu/hw/ide/core.c
===================================================================
--- qemu.orig/hw/ide/core.c	2010-10-04 15:22:26.848003542 +0200
+++ qemu/hw/ide/core.c	2010-10-04 15:24:11.900255468 +0200
@@ -146,8 +146,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 */
-    /* 14=NOP supported, 0=SMART supported */
-    put_le16(p + 82, (1 << 14) | 1);
+    /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
+    put_le16(p + 82, (1 << 14) | (1 << 5) | 1);
     /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
     put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     /* 14=set to 1, 1=SMART self test, 0=SMART error logging */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ide: set WCACHE supported in IDENTIFY data
  2010-10-04 13:29 [Qemu-devel] [PATCH] ide: set WCACHE supported in IDENTIFY data Christoph Hellwig
@ 2010-10-08 12:03 ` Kevin Wolf
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2010-10-08 12:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: qemu-devel

Am 04.10.2010 15:29, schrieb Christoph Hellwig:
> ATA does not only have the WCACHE enabled bit in identify word 85, but also
> a WCACHE supported bit in word 82.  While the Linux kernel is fine with the
> latter at least hdparm also needs the former before correctly displaying
> the cache settings.  There's also a non-zero chance other operating systems
> are more picky in their volatile write cache detection.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-08 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 13:29 [Qemu-devel] [PATCH] ide: set WCACHE supported in IDENTIFY data Christoph Hellwig
2010-10-08 12:03 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).