From owner-freebsd-questions Fri Feb 15 12:20:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailc.telia.com (mailc.telia.com [194.22.190.4]) by hub.freebsd.org (Postfix) with ESMTP id 7919D37B402 for ; Fri, 15 Feb 2002 12:20:20 -0800 (PST) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailc.telia.com (8.11.6/8.11.6) with ESMTP id g1FKKIH05610 for ; Fri, 15 Feb 2002 21:20:18 +0100 (CET) Received: from falcon.midgard.homeip.net (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id VAA13152 for ; Fri, 15 Feb 2002 21:20:17 +0100 (CET) Received: (qmail 10156 invoked by uid 1001); 15 Feb 2002 20:20:17 -0000 Date: Fri, 15 Feb 2002 21:20:16 +0100 From: Erik Trulsson To: Cliff Sarginson Cc: freebsd-questions@FreeBSD.ORG Subject: Re: DMA on ATAPI CD's [ Was Re: About printers ] Message-ID: <20020215202016.GA10124@student.uu.se> Mail-Followup-To: Cliff Sarginson , freebsd-questions@FreeBSD.ORG References: <20020215185850.GC1394@raggedclown.net> <20020215191055.50E1E5D09@ptavv.es.net> <20020215195823.GA407@raggedclown.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020215195823.GA407@raggedclown.net> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Feb 15, 2002 at 08:58:23PM +0100, Cliff Sarginson wrote: > On Fri, Feb 15, 2002 at 11:10:55AM -0800, Kevin Oberman wrote: > > > Date: Fri, 15 Feb 2002 19:58:50 +0100 > > > From: Cliff Sarginson > > > Sender: owner-freebsd-questions@FreeBSD.ORG > > > > > > On Fri, Feb 15, 2002 at 10:25:16AM -0800, Kevin Oberman wrote: > > > > > Date: Thu, 14 Feb 2002 22:46:58 +0100 > > > > > From: Cliff Sarginson > > > > > Sender: owner-freebsd-questions@FreeBSD.ORG > > > > > > > > > > On Sat, Jan 09, 1999 at 05:09:35PM +0300, vanya wrote: > > > > > > > > > > (Best to keep unrelated questions in seperate posts). > > > > > > > > > > > And one question about DMA for EIDE disks and ATAPI CD. Is DMA automatically > > > > > > enabled or user must turn on this option? > > > > > > > > > > I believe DMA is not enabled on ATAPI CD devices, I believe it is > > > > > considered a source of possible instability in certain cases (I know > > > > > of no proof for this..) .. you can forceably re-enable it by an entry > > > > > in sysctl.conf. I have 2 IDE i/faces, with a hard drive and a CD/DVD > > > > > on one slave and a CD R/W on another. My line looks as follows: > > > > > > > > > > hw.atamodes=dma,dma,dma,dma > > > > > > > > > > You will need to adjust this according to your actual IDE setup, > > > > > (i.e. how your ide's are actually configured)... > > > > > > > > > > "man 8 sysctl.conf" may help. > > > > > > > > On almost all systems you really want to add hw.ata.atapi_dma="1" to > > > > /boot/loader.conf to enable DMA on ATAPI devices. > > > > > > > > The reason it is disabled by default is that some early ATAPI > > > > controllers did not work correctly (at all) in DMA mode. Since it is > > > > considered critical that CDs be accessible from the GENERIC kernel to > > > > do the initial installation, all ATAPI access had to default to PIO. > > > > > > > > The only way to be sure about this is to turn on DMA and see of the CD > > > > works. (It almost certainly will.) > > > > > > > > This is a parameter that must be set before the ATA driver is started, > > > > so it cannot be put in sysctl.conf. It must be in /boot/loader.conf. > > > > > > > I think this is incorrect, it can be put in sysctl.conf, and I believe > > > it works if you do it as I stated. > > > > When I try this I get: > > sysctl: oid 'hw.ata.atapi_dma' is read only > > > Mmm. Now I am confused (what's new ?). > What I do, is as stated in my post, is to adjust the parameter > hw.atamodes to enable dma on the ide devices. What you are saying, > or demonstrating, is the adjustment of the hw.ata.atapi_dma, variable > cannot be done except at boot time. Now I am a bit confused about the > relationship between these two variables. I am under the impression that > what I do enables DMA on the said devices (I see no reason why it cannot > be dynamically changed)..but doing what you suggest does indeed show up > in dmesg as the CD devices using DMA instead of PIO ) I just tried it. > > So maybe I am under a false impression here, but a sysctl -a does show > what I do as being accepted. So the question remains, am I under a false > impression that what I do has any effect whatsoever ? It certainly does > not generate a syslog message when I change them..is there any other way > to tell ? My understanding, after reading the ata(4) man page, is that the loader variable ( 'hw.ata.atapi_dma' ) determines if the kernel will attempt to set DMA on atapi devices by default at boot time or not. Regardless of what hw.ata.atapi_dma is set to one can later change the mode used via the hw.atamodes syctl. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message