top image
home  /  pages  /  tech tips  /  contact about

Enabling DMA on a SATA DVD drive, kernel 2.6.18

Problem

You have a SATA controller (in my case a ThinkPad T60 with an Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 02)). The DVD works, but it is very slow because DMA is not enabled. Trying to enable DMA using hdparm results in an error (HDIO_SET_DMA failed: Operation not permitted). You endure this pain with Linux kernel 2.6.18.

Desperately, you read many seemingly relevant web pages about it, but to no avail. You consider giving up.

Keywords

SATA, DMA, DVD, CD-ROM, Linux, ThinkPad, DMA, hdparm.

Solution

Compile IDE and SATA into the kernel. Let IDE/ATAPI detect the CD-ROM, but use kernel parameters "libata.atapi_enabled=1 combined_mode=libata" to enable DMA. Make sure you set SATA Compatibility Mode in the BIOS to AHCI.

You can inspect my entire .config file. The complete set of kernel parameters are acpi_sleep=s3_bios,s3_mode libata.atapi_enabled=1 combined_mode=libata.

You may still have to turn on DMA manually using hdparm -d1 /dev/cdrom (or whatever your DVD device is).

URL: https://thomer.com/howtos/dma_on_sata_dvd.html
Copyright © 1994-2022 by Thomer M. Gil
Updated: 2006/10/15