LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-10-2004, 05:08 PM   #1
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Rep: Reputation: 15
Question Enable DMA on hard drives


Hi!
After I copied some huge amounts of data from one hard disk to another (and the system becoming unusable meanwhile) it came to my mind that DMA could be disabled for my hard drives. A simple 'hdparm /dev/hda' and I was sure. But enabling DMA with 'hdparm -d1 /dev/hda' just says 'Operation not permitted.' But I was trying as root, so I tried a chmod 777 /dev/hda and chown 777 /dev/hda. But it didn't had any effects.
Does anyone know a way to enable DMA? I use the 2.6.7-rc3 Kernel and an nForce2 chipset. The FAQ on nvidia's homepage just tells you to use the universal ide driver, since the nForce2 IDE controller should be standard-compliant.
 
Old 06-10-2004, 05:14 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
what do you get when you type this in
Code:
hdparm -i /dev/hda
 
Old 06-10-2004, 05:29 PM   #3
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
chown 777 /dev/hda ???
whats that ?
i think it has to be: chown root /dev/hda

now try hdparm -d1 /dev/hda
 
Old 06-10-2004, 05:54 PM   #4
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by 320mb
what do you get when you type this in
Code:
hdparm -i /dev/hda
I get this:
Code:
 Model=WDC WD800BB-75DKA0, FwRev=77.07W77, SerialNo=WD-WMAHL3118939
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156250000
 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 udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6

chmod 777 means, giving read, write, execution rights to all users.

Last edited by thorax; 06-10-2004 at 05:56 PM.
 
Old 06-10-2004, 07:52 PM   #5
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
thorax, u had done "chown 777 " (not chmod) (see original post!!)

according to the info:
DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5

Its already on the DMA mode!! (UDMA5)
 
Old 06-11-2004, 06:16 AM   #6
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
As you can see, it's not:
Code:
/dev/hda:
 multcount    = 16 (on)
 I/O support  =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)  <-------
 keepsettings =  0 (off)
 nowerr       =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 16383/255/63, sectors = 156250000, start = 0
 busstate     =  1 (on)
And, why should I have a transfer rate of ~4 MiB/s when DMA is enabled?


btw, I tried your 'chown root /dev/hda', and it didn't work, too.


When I try to execute 'hdparm -d1 /dev/hda' I get the following:
Code:
/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

Last edited by thorax; 06-11-2004 at 06:19 AM.
 
Old 06-11-2004, 06:26 AM   #7
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
btw, does this include any infos if my chipset supports dma under Linux?
Code:
BIOS-provided physical RAM map:
Shuttle AN35N detected: BIOS IRQ0 pin2 override will be ignored
ACPI: BIOS IRQ0 pin2 override ignored.
CPU:     After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000
CPU:     After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
It was part of my dmesg.



My Kernel .config inclueds the following, so dma should work (?)
Code:
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
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y


the nVidia nForce Linux drivers FAQ just says:
Quote:
Q: My IDE hard drive is running very slowly, how can I enable DMA mode?

A: A kernel patch was added in kernel 2.4.21pre3-ac1 which enables DMA for the nForce2 IDE controller and should be available in the final released 2.4.21 kernel. An alternative to upgrading your kernel is to use the "hdparm" utility to enable DMA for your hard drive. For example:


example% su
Password: ******
example# hdparm -d 1 /dev/hdX


Where /dev/hdX is the IDE device you wish to enable DMA for. You must do this every time you reboot, or add it to an rc script. Some distributions have a file "/etc/sysconfig/harddisks" where you can enable this for all hard drives on system boot.
When the dma patch was added in a 2.4 Kernel, it should surely be available in my 2.6 Kernel, right?

Last edited by thorax; 06-11-2004 at 06:45 AM.
 
  


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
Enable DMA on DVD drives puppy Ubuntu 5 09-08-2005 07:09 PM
Large Hard Drives and DMA geoff-taylor@ho Linux - Hardware 0 10-26-2004 05:09 PM
Hard drives and DMA Hammett Linux - Hardware 8 08-27-2004 06:01 PM
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

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

All times are GMT -5. The time now is 05:25 AM.

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