Enabling bus mastering (DMA) support with Linux
Linux DMA support differs significantly by distribution and version. Older Linux releases had limited support for UDMA, particularly for ATAPI devices. Recent releases generally recognize DMA-capable ATAPI devices and automatically configure the interface optimally. To determine the status of DMA, open a terminal window, change to the /proc/ide directory, and list the contents. That list displays the drivers for each IDE/ATAPI device and interface. It also contains a file, named for the chipset in use, that lists the current DMA status for each interface and drive.
Figure 10-6 shows the contents of the file
/proc/ide/piix on an Intel system
running Red Hat Linux 8.X. This system has two ATA interfaces. The
primary ATA interface is IDE0
and the secondary is
IDE1
. Note that this file designates the Master on
each interface as drive0
and the Slave as
drive1
, rather than naming each of the four
devices uniquely as drive0
through
drive3
.
Two devices are connected, one to each interface. Device
hda
, an ATA-100 hard drive, is
drive0
(Master) on the Primary Channel. Device
hdc
, a DMA-capable CD writer, is
drive0
(Master) on the Secondary Channel. The list
shows that DMA and UDMA are enabled for both devices. The second
“DMA enabled:” line should really
read “DMA level:”. It shows that
UDMA-5 (ATA-100) is enabled for hard drive hda
and
UDMA-2 for CD writer hdc
.
Figure 10-6. Displaying /proc/ide/piix, which lists DMA status on this Intel system ...
Get PC Hardware in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.