LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Is there DMA for SATA Optical Drives? Or is my inspiron optical not supported (yet)? (https://www.linuxquestions.org/questions/linux-kernel-70/is-there-dma-for-sata-optical-drives-or-is-my-inspiron-optical-not-supported-yet-468368/)

RHLinuxGUY 07-27-2006 06:38 PM

Is there DMA for SATA Optical Drives? Or is my inspiron optical not supported (yet)?
 
I'm having for the first time in 3 years, choppyness in my DVD playback. This is with my new laptop a DELL Inspiron E1505 Custom(but no the drive). Would like to know if this is indeed a SATA drive (if anyone owns this model Dell laptop or similar, since the laptops don't seem to change all that much except the GPU and CPU), or if it is an IDE drive. If it is a SATA where in the kenerl am I able to enable DMA for my drive? I have tried generic DAM acceleration but that is not for SATA drives. Under Serial devices,(I believe that is what it is called, I'll have to look it up once more, bad recall memory) I cannot find anything that has to do with DMA acceleration, unless there isn't any at all.

What should I do to get DMA acceleration?

HappyTux 07-27-2006 06:53 PM

DMA is supposedly not needed for SATA here is what I have set for the IDE variety.

Code:

>$ grep -i idedma /boot/config-2.6.17-ck1-smp
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y


RHLinuxGUY 07-27-2006 07:06 PM

Thank you, afer reviewing dmesg and chatting with someone from dell support chat. (that is terrible by the way) Though, I got next to nothing from Dell (I'm suprised to say after fighting about me not using Windows but using Linux, the person sent me a link out of the blue to enable DMA for Linux, strange), dmesg and lspci seems to tell me I'm using an IDE chipset named ICH7 from intel... sadly, I only see ICH5 in the Linux kernel. My question is, is there any hope of me being able to enable any sort of DMA acceleration?

HappyTux 07-27-2006 07:27 PM

Check to see if the options above are enabled. Also what kernel are you using?

RHLinuxGUY 07-27-2006 07:42 PM

2.6.17.6 vanilla sources from gentoo, not the gen kernel. When I passed that arguement above, I got no results, but no errors.

HappyTux 07-27-2006 07:59 PM

Quote:

Originally Posted by RHLinuxGUY
2.6.17.6 vanilla sources from gentoo, not the gen kernel. When I passed that arguement above, I got no results, but no errors.

That would be for my kernel config that gets installed you need to check in your config most likely in your top level kernel directory as a hidden file .config.

RHLinuxGUY 07-27-2006 08:15 PM

I see, here we go now:

Code:

george@geotop /usr/src/linux $ grep -i idedma /usr/src/linux/.config
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
george@geotop /usr/src/linux $


HappyTux 07-27-2006 08:30 PM

That looks ok can you install hdparm and check the output of hdparm /dev/hd? changing the ? to the drive letter of the CD to see if the DMA is enabled. If not then try hdparm -d1 /dev/hd? to see if it will let you set it if this works then put the command in a script that runs at startup to have it set on boot in Debian you can do the same by editing the /etc/hdparm.conf perhaps Gentoo has a similar setup and you may not have to put it in a script.

RHLinuxGUY 07-27-2006 11:37 PM

Code:

geotop linux # hdparm /dev/hdc

/dev/hdc:
 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: Inappropriate ioctl for device
geotop linux # ls -FGg /dev/dvd
lrwxrwxrwx 1 3 Jul 22 09:45 /dev/dvd -> hdc

From what I understand the 'failed' line means that the required module (builtin or not) is not found, or does not support this device if one is loaded. I need to have my chipset ticked off, except that I do not see (under ide/ata section in the kernel) one for my Intel Chipset ICH7, just ICH5. If I'm looking in the wrong place please tell me.

--EDIT--
Passing values such as
Code:

hdparm -d1 /dev/hdc
results in the following:

Code:

geotop linux # hdparm -d1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
geotop linux #


HappyTux 07-27-2006 11:52 PM

Quote:

Originally Posted by RHLinuxGUY
Code:

geotop linux # hdparm /dev/hdc

/dev/hdc:
 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: Inappropriate ioctl for device
geotop linux # ls -FGg /dev/dvd
lrwxrwxrwx 1 3 Jul 22 09:45 /dev/dvd -> hdc

From what I understand the 'failed' line means that the required module (builtin or not) is not found, or does not support this device if one is loaded. I need to have my chipset ticked off, except that I do not see (under ide/ata section in the kernel) one for my Intel Chipset ICH7, just ICH5. If I'm looking in the wrong place please tell me.

I think you are looking in the wrong place this I found this page which seems to suggest you need CONFIG_BLK_DEV_PIIX=y. Not sure what exactly the failed means but it is of no importance to the DMA I get it on my CD/DVD drives.

Code:

HappyTux:/home/stephen# hdparm /dev/hdc

/dev/hdc:
 IO_support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly    =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Inappropriate ioctl for device


RHLinuxGUY 07-28-2006 02:40 PM

Thank you! I believe I found out my problem from the link you showed me! I'll get back to you after I reboot to see if it worked!

RHLinuxGUY 07-28-2006 03:07 PM

Well, I got what I needed. It was to tick off "Intel PIIXn chipsets support" in "ATA/ATAPI/MFM/RLL support", when configuring your kernel. I don't remember exactly trying to enable settings in hdparm using the following command:

Code:

hdparm -c1 -u1 -d1 -a1 /dev/hdc
Of course not all worked... here was the output:

Code:

geotop george # hdparm /dev/hdc

/dev/hdc:
 IO_support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly    =  0 (off)
 readahead    =  0 (off)
 HDIO_GETGEO failed: Inappropriate ioctl for device
geotop george #

but the first two seem to help the stuttering, I almost see some stuttering, but it is not drasticly reduced from before. If someone can help me get DMA enabled, I would appreciate it. Though, now the DVD playback is much, much more smooth then it was before. HappyTux thanks for the help!

HappyTux 07-28-2006 05:36 PM

Quote:

Originally Posted by RHLinuxGUY
Well, I got what I needed. It was to tick off "Intel PIIXn chipsets support" in "ATA/ATAPI/MFM/RLL support", when configuring your kernel. I don't remember exactly trying to enable settings in hdparm using the following command:

Code:

hdparm -c1 -u1 -d1 -a1 /dev/hdc
Of course not all worked... here was the output:

Code:

geotop george # hdparm /dev/hdc

/dev/hdc:
 IO_support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly    =  0 (off)
 readahead    =  0 (off)
 HDIO_GETGEO failed: Inappropriate ioctl for device
geotop george #

but the first two seem to help the stuttering, I almost see some stuttering, but it is not drasticly reduced from before. If someone can help me get DMA enabled, I would appreciate it. Though, now the DVD playback is much, much more smooth then it was before. HappyTux thanks for the help!

Your welcome I think I have run out of ideas on why the dma doesn't get set in this instance now though. These are the only other settings for dma I have can't see the ISA applying but you never know might be worth trying if you don't have them set might want to give the CONFIG_BLK_DEV_IDEDMA_FORCED=y a try as well.

Code:

grep -i dma /boot/config-2.6.17-ck1-smp
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ISA_DMA_API=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_SCSI_PDC_ADMA is not set
# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
# CONFIG_SOUND_DMAP is not set


amw2320 09-24-2006 02:26 PM

I have the same laptop and have been working on this for a while. I think the problem has to do with 2.6.17 kernel not supporting ICH7, you can look at it here. The issue was supposed to be fixed in 2.6.18 as the patch went mainstream, but I still can't get it working. Try upgrading the kernel or using the patch a few replies later in the thread and let me know if you have any success.

amw2320 09-24-2006 03:11 PM

Actually it looks like using the new kernel UDMA is enabled by default. You cannot change this and I dont believe there is DMA on SATA drives. hdparm -i /dev/hdc gives me:

/dev/hdc:

Model=SONY DVD+/-RW DW-Q58A, FwRev=UDS2, SerialNo=
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=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no
Drive conforms to: Unspecified: ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

* signifies the current active mode

So, Im guessing udma2 is running. I just wish dvd playback wasnt so choppy.


All times are GMT -5. The time now is 04:34 PM.