Author: Ladislav Slezak < lslezak@suse.cz>
Changes:
Some IDE devices are broken and they do not work properly if they have DMA mode enabled (especially CD-ROM drives) or Linux kernel sometimes detect wrong maximux DMA transfer mode. DMA mode is enabled by kernel after boot for disk devices and disabled for CD-ROMs. Default DMA mode can be changed by boot.idedma init script after boot.
This YaST2 module uses boot.idedma initscript which is frontend for hdparm utility.
In this YaST2 module DMA mode of selected device can be enabled, disabled or changed (e.g. from UltraDMA/100 to UltraDMA/66).
Features of YaST2 module are available here.
Settings are stored in file /etc/sysconfig/hardware in variable DEVICES_FORCE_IDE_DMA. This variable contains pairs <device>:<DMA_mode> separated by space. Device is device file (e.g. /dev/hdc), DMA_mode is on (enable default DMA mode), off (disable DMA mode, use PIO mode instead) or DMA mode specification supported by hdparm (e.g. mdma2, udma2, udma5,...).
Other devices (not specified in DEVICES_FORCE_IDE_DMA variable) have their DMA mode unchanged.
IDE DMA configuration module has only one dialog.
There are displayed all attached IDE devices in the table. Column 'Required DMA mode' contains DMA mode which will be set after 'Finish' button is pressed and after boot by init script. Other columns contain device information and current DMA mode.
To change DMA mode select device in the table and select required DMA mode in combo box below the table. Press Finish to save values to sysconfig/hardware file and activate changes.
Disc cache is flushed (/bin/sync) before DMA is enabled to minimize data loss if the machine hangs just after enabling DMA.
IDE devices which use ide-scsi emulation (usually CD recorders) can be also configured by this tool. Their original IDE device name is used to set up DMA mode.
Although not all DMA modes can be set in the Yast2 module (e.g. UltraDMA/44) they can be set up manually in the sysconfig file. These modes are read-only for Yast2 to not confuse users with too many (usually not used) DMA modes.