From owner-freebsd-current Fri Jan 28 9:33:52 2000 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id 8C63014D36 for ; Fri, 28 Jan 2000 09:33:43 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id SAA19957; Fri, 28 Jan 2000 18:33:29 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <200001281733.SAA19957@freebsd.dk> Subject: Re: ata: panic with new sysctl variable In-Reply-To: <3891BF08.35C20143@dead-end.net> from "D. Rock" at "Jan 28, 2000 05:08:40 pm" To: rock@dead-end.net (D. Rock) Date: Fri, 28 Jan 2000 18:33:29 +0100 (CET) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems D. Rock wrote: > Hi, > > just noticed the new sysctl variable for ata. I just wanted to > use the new way for disabling DMA on my disk (has some strange > problems, even under windows). > > Previously I just commented out the ata_dmainit() lines in > ata_disk.c, now I wanted to set it with sysctl: > > sysctl -w hw.atamodes="pio,dma,dma,dma" > > but this paniced my machine. > > I later discovered that there is no sanity check during setting > the new modes: The machine in question didn't have a secondary > IDE controller, but the variables were set without a range check. > > My solution was simple. Just use > sysctl -w hw.atamodes="pio,dma" > > but I think, the ata driver should range check the settings. It does but not for the first two devices as the are kindof magic in some sense. I'll commit the fix asap.. -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message