Re: Problem in IDE Disks cache handling in kernel 2.4.XX

Alan Cox (alan@lxorguk.ukuu.org.uk)
10 Jan 2003 11:37:52 +0000


On Fri, 2003-01-10 at 09:54, Francis Verscheure wrote:
> In fact for ATA/ATAPI 5 cfs_enable_2 has no meaning. The fields to test are
> write cache bits in command_set_1 and cfs_enable_1.
> And in both cases the FLUSH CACHE command ALWAYS EXISTS !
> The test of cfs_enable_2 must only be used for ATA/ATAPI 6 drives to use
> FLUSH CACHE or FLUSH CACHE EXT in case of 48 bit addressing mode.

Thanks for the report. I need to go reread the spec before I can
definitively comemnt on this.

> And it seems to me that when an IDE drive has a cache enabled wcache must be
> initialized to say so ? Or you have to do a STANDY or SLEEP before APM
> suspend or power off to be sure that the cache has been written to the disk.

Technically - no. In the real world its a very very good idea

> I had a look at patch 2.4.21pre3 and the code looks the same.
>
> And by the way how are powered off the IDE drives ?
> Because a FLUSH CACHE or STANDY or SLEEP is MANDATORY before powering off the
> drive with cache enabled or you will enjoy lost data

IDE disagrees with itself over this but when we get a controlled power
off we do this. The same ATA5/ATA6 problem may well be present there
too. I will review both

Any specific opinion Andre ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/