From owner-freebsd-current@FreeBSD.ORG Tue Sep 16 18:48:44 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1ABB16A4B3; Tue, 16 Sep 2003 18:48:44 -0700 (PDT) Received: from multiweb.ca (modemcable081.38-200-24.mtl.mc.videotron.ca [24.200.38.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF5C43FAF; Tue, 16 Sep 2003 18:48:43 -0700 (PDT) (envelope-from amyfoub@videotron.ca) Received: from [192.168.1.101] (pc101.multiweb.ca [192.168.1.101]) by multiweb.ca (8.12.9/8.12.6) with ESMTP id h8H1mfXB066626; Tue, 16 Sep 2003 21:48:42 -0400 (EDT) (envelope-from amyfoub@videotron.ca) From: Guillaume To: Thomas Quinot In-Reply-To: <20030916132228.GG52463@melusine.cuivre.fr.eu.org> References: <1062861719.2761.35.camel@guillaume.multiweb.ca> <20030916132228.GG52463@melusine.cuivre.fr.eu.org> Content-Type: text/plain; charset= Message-Id: <1063763321.776.2.camel@guillaume.multiweb.ca> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Tue, 16 Sep 2003 21:48:41 -0400 Content-Transfer-Encoding: 8bit cc: current@FreeBSD.ORG Subject: Re: acd0 vs cd0 (ATAPICAM) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2003 01:48:44 -0000 Le Mar 16/09/2003 à 09:22, Thomas Quinot a écrit : > Le 2003-09-06, Guillaume écrivait : > > > I'm running FreeBSD 5-CURRENT (Aug. 28 2003) on a P3 733MHz, 768MB ram > > with a LG DVD-RW/DVD-RAM burner. I would like to know why ATAPICAM is so > > slow with my system. > > Maybe because ATAPI/CAM does not actually enable DMA. Can you try the > following patch? > I get an error when compiling kernel with this patch: cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I../../.. -I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../contrib/dev/ath -I../../../contrib/dev/ath/freebsd -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-strict-aliasing -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror ../../../dev/ata/atapi-cam.c ../../../dev/ata/atapi-cam.c: In function `setup_dev': ../../../dev/ata/atapi-cam.c:232: error: `atadev' undeclared (first use in this function) ../../../dev/ata/atapi-cam.c:232: error: (Each undeclared identifier is reported only once ../../../dev/ata/atapi-cam.c:232: error: for each function it appears in.) *** Error code 1 Stop in /usr/src/sys/i386/compile/GUILLAUME. > Thomas. > > Index: atapi-cam.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/ata/atapi-cam.c,v > retrieving revision 1.22 > diff -u -r1.22 atapi-cam.c > --- atapi-cam.c 11 Sep 2003 17:34:47 -0000 1.22 > +++ atapi-cam.c 16 Sep 2003 13:20:18 -0000 > @@ -227,6 +227,11 @@ > 2 * device_get_unit(atp->channel->dev) + > (atp->unit == ATA_MASTER) ? 0 : 1); > atp->softc = (void *)scp; > + if (atapi_dma && atp->channel->dma && > + (atp->param->config & ATA_DRQ_MASK) != ATA_DRQ_INTR) > + atp->setmode(atadev, ATA_DMA_MAX); > + else > + atp->setmode(atadev, ATA_PIO_MAX); > } > } >