Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Sep 2003 15:22:28 +0200
From:      Thomas Quinot <thomas@FreeBSD.ORG>
To:        Guillaume <amyfoub@videotron.ca>
Cc:        current@freebsd.org
Subject:   Re: acd0 vs cd0 (ATAPICAM)
Message-ID:  <20030916132228.GG52463@melusine.cuivre.fr.eu.org>
In-Reply-To: <1062861719.2761.35.camel@guillaume.multiweb.ca>
References:  <1062861719.2761.35.camel@guillaume.multiweb.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Le 2003-09-06, Guillaume =E9crivait :

> 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?

Thomas.

Index: atapi-cam.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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 =3D=3D ATA_MASTER) ? 0 : 1);
 	atp->softc =3D (void *)scp;
+	if (atapi_dma && atp->channel->dma &&
+	    (atp->param->config & ATA_DRQ_MASK) !=3D ATA_DRQ_INTR)
+	    atp->setmode(atadev, ATA_DMA_MAX);
+	else
+	    atp->setmode(atadev, ATA_PIO_MAX);
     }
 }
=20
--=20
    Thomas.Quinot@Cuivre.FR.EU.ORG

--oyUTqETQ0mS9luUI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/Zw6TAE1UuDk9JGkRAipOAJwLrHCRaUUmlgwCEuKQbWVTMaNiIACeOfUK
4lSB9L0SE/y+vcYHbQi1TuA=
=DMTN
-----END PGP SIGNATURE-----

--oyUTqETQ0mS9luUI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030916132228.GG52463>