Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2001 10:25:39 +0100 (CET)
From:      Andrzej Bialecki <abial@webgiro.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Valentin Nechayev <netch@lucky.net>, Bruce Evans <bde@zeta.org.au>, arch@FreeBSD.org
Subject:   Re: Re: dynamic vs static sysctls?
Message-ID:  <Pine.BSF.4.20.0101311021320.52835-100000@mx.webgiro.com>
In-Reply-To: <20010130091045.A52258@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Jan 2001, Kris Kennaway wrote:

> On Tue, Jan 30, 2001 at 02:48:48PM +0200, Valentin Nechayev wrote:
> 
> > >     hw.atamodes: dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,:-8,dma,dma,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,dma,dma,pio,dm!
> >  a,dma,dma,dma,dma,dma,dma,pio,dma,dma,dma,dma,dma,:-%,
> 
> Actually, it's worse than that..apparently the driver suppresses all
> leading controllers which are not present: I had a controller which
> provided ad4 through ad7, and wanted to change the modes (Promise
> Ultra 100, which was giving me massive filesystem corruption), but
> hw.atamodes said this:
> 
> hw.atamodes: dma, dma, dma, dma,
> 
> However what it really meant was this:
> 
> hw.atamodes: ---, ---, ---, ---, dma, dma, dma, dma,
> 
> and I couldn't alter the settings without knowing this and adding back
> the missing four entries.

I'd like to point out that sysctl_add_oid(9) was created exactly to
address issues like that. The original problem (as I understand it) with
this particular sysctl was that it wasn't possible to create additional
sysctl nodes for each ata channel/disk on the fly (without compiling them
into kernel in advance). But now it's possible, so IMHO the code should be
changed to create the subtree on the fly, based on the actual presence of
the hardware:

hw.atamode.ata0: ---
hw.atamode.ata1: ---
hw.atamode.ata2: dma
hw.atamode.ata3: dma
...

This scheme accomodates also removable media, as you can add and remove
oids as you see it fit during runtime.

Andrzej Bialecki

//  <abial@webgiro.com> WebGiro AB, Sweden (http://www.webgiro.com)
// -------------------------------------------------------------------
// ------ FreeBSD: The Power to Serve. http://www.freebsd.org --------
// --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ----




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0101311021320.52835-100000>