O'Reilly logo

PC Hardware in a Nutshell, 3rd Edition by Barbara Fritchman Thompson, Robert Bruce Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required