[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/11] ide: set WCACHE supported in IDENTIFY data
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 04/11] ide: set WCACHE supported in IDENTIFY data |
Date: |
Fri, 22 Oct 2010 15:43:49 +0200 |
From: Christoph Hellwig <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 06b6e14..5ccb09c 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -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 */
--
1.7.2.3
- [Qemu-devel] [PULL 00/11] Block patches, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 02/11] qcow2: Simplify image creation, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 01/11] qcow2: Support exact L1 table growth, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 03/11] qcow2: Remove old image creation function, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 04/11] ide: set WCACHE supported in IDENTIFY data,
Kevin Wolf <=
- [Qemu-devel] [PATCH 05/11] Copy snapshots out of QCOW2 disk, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 06/11] qemu-io: New command map, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 07/11] block: Use GCC_FMT_ATTR and fix a format error, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 09/11] ide: Factor ide_flush_cache out, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 10/11] ide: Handle flush failure, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 08/11] qemu-img: Fix qemu-img convert -obacking_file, Kevin Wolf, 2010/10/22
- [Qemu-devel] [PATCH 11/11] virtio-blk: Respect werror option for flushes, Kevin Wolf, 2010/10/22