Re: two ata write chaching request

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Tue, 21 Dec 2010 09:06:52 +0200
Xin LI wrote:
> On 12/20/10 15:10, Alexander Best wrote:
>> i'd really like to see
> 
>> 1) write caching to be turned on and off for individual hdds
>>    (i.e. hw.ata.X.wc) and
> 
> This is possible.  We may need to split the logic out from ad_init() as
> the disk number is not known at that point if I understood the code
> correctly.

ad_init() receives newbus device as an argument, so it does have the
disk number.

>> 2) to be able to turn write chaching on and off on the fly.
> 
> If I understand the code correctly, this is merely issuing a SETFEATURE
> at runtime and *should* be possible.  The problem is atacontrol(8) does
> not offer a way to issue the command directly as camcontrol(8) do.
> 
>> any thoughts on these two topics? is it technically possible?

It is possible, but I would recommend you to focus on CAM-based ATA. As
first step you can easily execute SETFEATURE command just from
camcontrol tool. As second, it could be added to adastart()/adadone() to
be executed on each device attach/reset, same as in ad_init().

-- 
Alexander Motin
Received on Tue Dec 21 2010 - 06:07:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:10 UTC