acd0 vs cd0 (ATAPICAM)

Thomas Quinot thomas at FreeBSD.ORG
Tue Sep 16 06:22:31 PDT 2003


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?

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);
     }
 }
 
-- 
    Thomas.Quinot at Cuivre.FR.EU.ORG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030916/076b1d33/attachment.bin


More information about the freebsd-current mailing list