[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

kernel 2.6, optical drives and DMA



I am at a point of total frustration in figuring out whether and how to 
enable DMA on an optical drive. I am running the Debianized flavour of 
kernel 2.6.10 and the installation tracks Debian sid/unstable.

As far as I understand, the problems surrounding the configuration of 
optical writers as IDE ATA(PI) devices and enabling DMA under kernel 
2.6 are largely resolved, even though there is no resolution in sight 
to the disagreement between the kernel team and the author of cdrecord. 
At the level of one, however, I am having little success.

I continue to suffer all the bad effects of no DMA. Although the overall 
machine is powerful (P4 @ 2.4GHz, 1GB RAM) DVD playback is choppy. 
cdrecord complains that "DMA speed too slow (OK for 11x). Cannot write 
at 24x" (the burner spec is write CD-R at 24x). But the customary 
command to enable DMA ("hdparm -d1 /dev/hde") does evil things. Disks 
cannot be mounted and it takes minutes if not hours for the mount 
command to error out.

The writer in question is a combination CD/DVD RW. It is the fifth IDE 
device in my box and is connected through a 2001-vintage Promise 
PDC20267 Ultra ATA100 PCI controller card.

I believe that the kernel and modules are correctly configured to 
support DMA to optical devices:

CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y

CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_PDC202XX_OLD=y
CONFIG_PDC202XX_BURST=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y

bruce@bruce_P4:~$ su -c 'hdparm /dev/hde'
Password:

/dev/hde:
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Invalid argument
bruce@bruce_P4:~$ su -c 'hdparm -i /dev/hde'
Password:

/dev/hde:

 Model=HL-DT-ST DVDRAM GSA-4082B, FwRev=A201, SerialNo=K2H434I5524
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no
 Drive conforms to: device does not report version:

 * signifies the current active mode

Questions:
1. Is there a way to enable DMA safely for all operations with this 
DVD/CD drive, particularly burning, video DVD playback, data disk 
reading?
2. If the answer to q1 is no, is it OK to enable DMA ("hdparm 
-d1 /dev/hde") for burning disks and for watching DVDs, but to disable 
it again before mounting data disks?
3. For an optical disk (as opposed to a hard disk), is it important to 
use an 80-connector IDE cable with the ATA100 controller as opposed to 
the traditional 40-connector cable?

I have RTFM'ed and STFW'ed to the point of information overload. If 
there are good resources out there that I have missed, please point me 
to them. Help much appreciated. It is a testament to how solid this 
system is that this is my biggest current problem.

-- 
Bruce Miller
Ottawa, ON  K1M 2H9 CANADA
GPG key ID 0x1B9200FC. Public key available from keyservers

Attachment: pgpCQGD2Kq4o3.pgp
Description: PGP signature


Reply to: