LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-01-2004, 12:23 PM   #1
Timeturtle
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 42

Rep: Reputation: 15
Can't enable DMA


I have spent the last week searching the boards here at linuxquestions, gentoo forums, and plain google searches, but have found nothing to help me get my DMA working. everytime i try to hdparm, i get the same old error:
Code:
# hdparm -d1 /dev/hda  
/dev/hda:   setting using_dma to 1 (on)   
HDIO_SET_DMA failed: Operation not permitted   
using_dma    =  0 (off)
I learned that in order for hdparm to work, you need to have compilied in support for DMA and your chipset. I looked and DMA was already compiled in, my chipset wasnt however. I compiled the VIA82CXXX chipset for my mobo (I know this to be the right one), I restarted and hdparm still gives me the same results.

I am using an Asus a7v266 motherboard with the VIA kt266 chipset. Here is the line from lspci about my ide chipset:
Code:
0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
It seems every other post gets to the part about enabling chipset support, the person enables support, and then it works great, end of posting. I dont know what I am doing wrong, but it is getting really frustrating.

Any help at all would be appreciated. Thanks.

Last edited by Timeturtle; 06-01-2004 at 12:24 PM.
 
Old 06-01-2004, 02:39 PM   #2
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
You are trying this as the root user, are you?...
 
Old 06-01-2004, 02:45 PM   #3
Timeturtle
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 42

Original Poster
Rep: Reputation: 15
yes, I have made sure to always be root when using hdparm, or anything dealing with changing my DMA settings.
 
Old 06-01-2004, 02:59 PM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
post the output of--------

Code:
hdparm -i /dev/hda
 
Old 06-01-2004, 03:04 PM   #5
Timeturtle
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 42

Original Poster
Rep: Reputation: 15
Here is the output of hdparm -i /dev/hda:

Code:
# hdparm -i /dev/hda  

/dev/hda:

 Model=Maxtor 5T040H4, FwRev=TAH71DP0, SerialNo=T4J7FEYC
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=80043264
 IORDY=on/off, tPIO={min:120,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 udma3 udma4 udma5
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 0:

 * signifies the current active mode
 
Old 06-01-2004, 03:34 PM   #6
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Code:
# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
Ok, how do have DMA enabled in your kernel??
this is part of my kernel config................it's all compiled into the kernel,

not as modules........
 
Old 06-01-2004, 03:41 PM   #7
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 33
Hi Timeturtle,

did you check your BIOS if DMA is enabled ? If not go into your BIOS Setup and check this setting.

Besides that, as I can see your drive supports up to UDMA 5 but operates in UDMA 2.

There is one thing you shall keep in mind. It sounds funny but it's a fact:

In order to use UDMA modes > mode 2 (so UDMA3, UDMA4 and UDMA5) you *need*
a 40 pin cable with 80 wires. Using older cables will simply not allow to switch in
an UDMA mode > udma2.


So I suggest that you check your cable. Perhaps you may need a new type IDE/ATA
cable with 80 wires. The shorter the cable the better. Longer cables have some
problems with transmission and signal quality so DMA mode may fall-back to a lower value.

You may also try:

hdparm -d1 -X your_mode /dev/hda

where your_mode = 64 + udma mode
(udma_mode=0,1,2,3,4,5)

So setting to UDMA 5 will be
hdparm -d 1 -X 69

As alraedy said: You *have* to use the "new type" 80 wire IDE/ATA cable in order to use UDMA modes > 2

I have seen several systems, that, although had UDMA running (mod2) displayed
that DMA was not used. Common to those systems was, that they were using older types
of IDE/ATA cables.

Last edited by Vlad-A; 06-01-2004 at 04:09 PM.
 
Old 06-01-2004, 05:28 PM   #8
Beauzeau
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
I have same problem

I have the asus A7V266-E and have the same problem. When I run hdparm -Tt /dev/hda I get only
Timing buffered disk reads: 10 MB in 3.43 seconds = 2.91 MB/sec.
But when I boot in kernel 2.6.24 it runs 14 times faster:
Timing buffered disk reads: 140 MB in 3.03 seconds = 46.20 MB/sec
When (as root) I type hdparm -i /dev/hda I get:

Model=Maxtor 6Y120L0, FwRev=YAR41VW0, SerialNo=Y415E2ME
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=240121728
IORDY=on/off, tPIO={min:120,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 udma3 udma4 *udma5 udma6
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: (null):

* signifies the current active mode
(I believe I get the same output whether in kernel 2.6.6 or 2.4.24). When I try to set hdparm (in kernel 2.6.6), I get the same message as TimeTurtle above.
When I type hdparm /dev/hda in 2.6.6 I get
c# hdparm /dev/hda

/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 240121728, start = 0

This is very different from what I get in 2.4.24:

# hdparm /dev/hda

/dev/hda:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 14946/255/63, sectors = 240121728, start = 0

When I type grep DMA my linux-2.6.6/.config I get:

CONFIG_GENERIC_ISA_DMA=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
ONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
CONFIG_IEEE1394_SBP2_PHYS_DMA=y

In desperation, I tried to compile everything as a module in the section on DMA, but that didn't help. I don't think it is the BIOS (I checked and didn't see anything wrong), because I get DMA when I use kernel 2.4.24.

Any suggestions are appreciated; I hate having such a slow drive.

Last edited by Beauzeau; 06-01-2004 at 05:30 PM.
 
Old 06-03-2004, 02:34 PM   #9
Timeturtle
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 42

Original Poster
Rep: Reputation: 15
Well, I finally got it working, though not as I would have liked. I had exhausted about every option possible with the kernel I was using, so I decided the next logical thing to do was to upgrade my kernel. I downloaded mm-sources 2.6.7-rc2 and configured and compiled it. for some reason my grub.conf got deleted somewhere along the way, so I couldnt configure grub to boot the new kernel (though it was able to boot the old kernel fine without the grub.conf...). I eventually had to use a third party grub installer, and then booted off the new kernel, and sure enough, DMA works fine.

I have no idea what was wrong with my 2.6.5 kernel. I guess it doesnt matter at this point.

Thanks for all your responses and support. I hope this info will help anyone else with this problem.
 
Old 06-03-2004, 05:34 PM   #10
Beauzeau
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
Hmmm, I also tried upgrading to 2.6.7-rc2, but I had the same problem: no DMA. Sooo, I went back to the 2.6.6 kernel, and changed some of the config variables, and now it works. I then changed them in 2.6.7-rc2, and that works also.

What I did was build in three options that I had previously compiled in as modules. They were:
Intel PIIXn chipsets support
PROMISE PDC202{46|62|65|67} support
VIA82CXXX chipset support
When these are compiled in as modules, I don't get DMA. But when they are built in (not as modules), I get DMA. I don't understand exactly why this happens. I also suspect that all three aren't needed, but I didn't have the time to narrow down which of the ones was the problem.

I wonder if you originally compiled some of those as modules, and under 2.6.7-rc2 you built them in?

Ric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
PLease help cannot enable DMA sendas4 Linux - Newbie 12 04-09-2007 12:36 PM
Enable DMA ust Linux - General 1 02-09-2004 01:28 AM
cant enable DMA! håkon Linux - Hardware 1 08-08-2003 03:11 PM
How to enable DMA? Piero Linux - Hardware 14 07-21-2003 06:05 AM
enable DMA? Alinuxnoob Linux - Newbie 1 02-28-2002 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration