From abb300d07d90b880852af20d57ba273a25628e4d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 28 Mar 2002 19:49:45 +0000 Subject: turrn off DMA on all CDs at boot --- rc.d/rc.sysinit | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 0555ae88..658c218d 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -351,6 +351,17 @@ mount -f /proc [ -f /proc/bus/usb/devices ] && mount -f -t usbdevfs usbdevfs /proc/bus/usb [ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev +# Turn off DMA on CD-ROMs. It more often than not causes problems. +if [ -e /proc/ide ]; then + DRIVERS=`find /proc/ide/ -name driver` + if [ "$DRIVERS" != "" ]; then + for N in `grep -v ide-disk $DRIVERS | cut -d/ -f5` ; do + hdparm -d0 /dev/$N + done + fi +fi + + # Turn on harddisk optimization # There is only one file /etc/sysconfig/harddisks for all disks # after installing the hdparm-RPM. If you need different hdparm parameters -- cgit v1.2.1