Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jh3zP-0002Dg-Vs for qemu-devel@nongnu.org; Wed, 02 Apr 2008 10:30:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jh3zL-0002CK-E9 for qemu-devel@nongnu.org; Wed, 02 Apr 2008 10:30:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh3zL-0002C2-4P for qemu-devel@nongnu.org; Wed, 02 Apr 2008 10:30:55 -0400 Received: from smtp02.citrix.com ([66.165.176.63]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jh3zJ-0008W5-Lh for qemu-devel@nongnu.org; Wed, 02 Apr 2008 10:30:53 -0400 Received: from mariner.uk.xensource.com (mariner.uk.xensource.com [172.31.17.38]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id m32ELWQ4001966 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 2 Apr 2008 07:21:34 -0700 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1Jh3qG-0005rS-Lw for qemu-devel@nongnu.org; Wed, 02 Apr 2008 15:21:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <18419.38508.673800.723996@mariner.uk.xensource.com> Date: Wed, 2 Apr 2008 15:21:32 +0100 Subject: Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush In-Reply-To: <20080401180746.GB5030@implementation> References: <18418.28291.689482.198484@mariner.uk.xensource.com> <20080401180746.GB5030@implementation> From: Ian Jackson Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Samuel Thibault writes ("Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush"): > Oh, by the way, shouldn't this: > Ian Jackson, le Tue 01 Apr 2008 18:18:59 +0100, a écrit : > > put_le16(p + 81, 0x16); /* conforms to ata5 */ > > - put_le16(p + 82, (1 << 14)); > > + /* 14=nop 5=write_cache */ > > + put_le16(p + 82, (1 << 14) | (1 << 5)); > > /* 13=flush_cache_ext,12=flush_cache,10=lba48 */ > > use s->write_cache instead of always 1? Else when using hdparm -i one > would think that write cache is always enabled. No. According to the ATA-7 draft I have in front of me, the meaning of word 82 is `Command set supported' and the meaning of bit 5 is is `write cache supported'. Word 85 bit 5 is `write cache enabled'. I see that the patch I supplied earlier is missing this, which I will fix. Ian.