Normally, a UDMA-aware kernel will automatically enable UDMA support for drives and interfaces that support it. However starting with kernel 2.1.113 DMA drive transfers are disabled by default unless you have configured your kernel specifically to automatically activate it. This may seem inconvenient, but some drives and some interfaces do not function properly with DMA enabled; see the UDMA Blacklist below.
On kernels 2.1.113 and up, you can enable DMA for both drives on a given IDE
interface using the ideX=dma
kernel parameter, where X is the number
of the interface (the first is 0).
Kernel boot parameters can be set using LILO, LOADLIN, or most Linux boot loaders. For more information see the Bootdisk HOWTO.
hdparm
is a program used to tweak the parameters of hard drives under
Linux. Among other things you can use it to enable or disable UDMA for a
drive and test its sustained transfer rate.
Most Linux distributions include hdparm
, but you should apply a patch
to include UDMA support. You can download hdparm
at
ftp://sunsite.unc.edu/pub/Linux/system/hardware/hdparm-3.3.tar.gz and
the patch at
http://pobox.com/~brion/linux/hdparm-3.3-udma.patch.gz.
Compile and install it like so:
cd /usr/src
tar zxvf /tmp/download/hdparm-3.3.tar.gz
cd hdparm-3.3
gzip -cd /tmp/download/hdparm-3.3-udma.patch.gz | patch -p0
make
if [ -f /sbin/hdparm ]; then rm -f /sbin/hdparm ; fi
make install
cp /usr/local/sbin/hdparm /sbin/hdparm
To enable UDMA for a hard drive: hdparm -d1 /dev/hda
To disable UDMA for a hard drive: hdparm -d0 /dev/hda
To measure transfer rate of a hard drive: hdparm -Tt /dev/hda
To see what options are enabled for a hard drive: hdparm /dev/hda
To see more info on your drive than you wanted to know:
hdparm -i /dev/hda
For more detailed info read the man page (``man 8 hdparm
'').