Date: Tue, 21 Dec 2010 09:06:52 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Alexander Best <arundel@freebsd.org> Cc: FreeBSD-Current <freebsd-current@freebsd.org>, Xin LI <delphij@delphij.net> Subject: Re: two ata write chaching request Message-ID: <4D10520C.8010202@FreeBSD.org> In-Reply-To: <mailpost.1292887903.4025619.55006.mailing.freebsd.current@FreeBSD.cs.nctu.edu.tw> References: <20101220231005.GA68477@freebsd.org> <mailpost.1292887903.4025619.55006.mailing.freebsd.current@FreeBSD.cs.nctu.edu.tw>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D10520C.8010202>