Normally, a UDMA-aware kernel will automatically enable UDMA support for drives and interfaces that support it. In most cases that it doesn't, the kernel either doesn't know how to drive your IDE chipset (get yourself a patch, see above) or doesn't believe it is safe to enable it (meaning you shouldn't!).
However in some cases the drive is capable of UDMA but the BIOS drops the ball and doesn't report it properly, and forcing the issue can be useful.
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). This may not actually force UDMA though.
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.
The current version of
hdparm, is 3.6 as of this writing. Unpatched older versions will not properly report or set information on UDMA, so be sure to upgrade! You can obtain the source code for hdparm 3.6 at http://metalab.unc.edu/pub/Linux/system/hardware/hdparm-3.6.tar.gz.
Compile and install it something like this:
tar zxvf /tmp/download/hdparm-3.6.tar.gz cd hdparm-3.5 make su root (type password when prompted) make install cp /usr/local/sbin/hdparm /sbin/hdparm exit
To enable DMA for a hard drive:
hdparm -d1 /dev/hda
To disable DMA 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:
To see more info on your drive than you wanted to know: (this will show which UDMA modes are supported/enabled)
hdparm -i /dev/hda
For more detailed info (such as how to choose which UDMA mode to use) read the man page (``
man 8 hdparm'').