LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-27-2006, 06:38 PM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 07-27-2006, 06:53 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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
 
Old 07-27-2006, 07:06 PM   #3
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 07-27-2006, 07:27 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Check to see if the options above are enabled. Also what kernel are you using?
 
Old 07-27-2006, 07:42 PM   #5
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 07-27-2006, 07:59 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 07-27-2006, 08:15 PM   #7
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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 $
 
Old 07-27-2006, 08:30 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 07-27-2006, 11:37 PM   #9
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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 #

Last edited by RHLinuxGUY; 07-27-2006 at 11:39 PM.
 
Old 07-27-2006, 11:52 PM   #10
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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
 
Old 07-28-2006, 02:40 PM   #11
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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!
 
Old 07-28-2006, 03:07 PM   #12
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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!
 
Old 07-28-2006, 05:36 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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
 
Old 09-24-2006, 02:26 PM   #14
amw2320
LQ Newbie
 
Registered: Aug 2003
Distribution: Arch 0.7
Posts: 24

Rep: Reputation: 15
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.
 
Old 09-24-2006, 03:11 PM   #15
amw2320
LQ Newbie
 
Registered: Aug 2003
Distribution: Arch 0.7
Posts: 24

Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
S-ATA Optical Drives carlosinfl Linux - Hardware 0 11-21-2005 08:34 AM
Optical drives on Suse 9.2 ylawayjdp SUSE / openSUSE 1 05-09-2005 05:03 AM
optical drives, help please. kenthegardener Linux - General 5 05-01-2005 07:33 AM
Magneto-optical drives olaf77 Linux - Hardware 1 01-28-2005 09:33 PM
Help with Optical Drives QzarBaron Slackware 3 01-17-2005 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration