# DMA issues : SOLVED

## Iron_Mike

whenever i try to enable dma on my disk with gentoo installed i get this :

```
bash-2.05b# hdparm -d 1 /dev/hdb

/dev/hdb:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

i did enable using dma per default in my kernel...

and here's what i obtain from

```

 cat /proc/ide/hdb/settings | grep dma

name                    value           min             max             mode

----                    -----           ---             ---             ----

using_dma               0               0               1               rw

```

how come it is not working and am i losing a lot in performance without dma on my disk?Last edited by Iron_Mike on Fri Mar 28, 2003 2:09 am; edited 1 time in total

----------

## ctford0

Is your motherboards chipset supported?  If so you may want to check the kernel to see if you have it compiled in.  And yes you are most definately loosing much performance by not having dma.

Do you have dma when booting from the live cd?  If so then you just missed something when compiling your kernel.

Hope this helps.

chris

----------

## Iron_Mike

dont know how to check if my chipset is supported...

and besides 

enable DMA by default, what else am i suppose to compile in my kernel??

----------

## Malakin

What kernel are you using? I thought all you needed was generic ide support for nforce. (works for me with a stock 2.4.20)

----------

## Iron_Mike

vanilla sources 2.4.20-r1

----------

## FormerSlacker

I believe some chipsets dma is disabled because of buggy ide controllers, like the cmd640.

My guess is that its either a buggy chipset, or support for your chipset hasn't been compiled in. If support has been compiled in, it may be that linux did not detect your chipset. In that case, you can force chipset detection by using the boot-time option "ide0". For example, ide0 = cmd640_vlb.

----------

## ctford0

Could you run "dmesg" and post the output here?  We should be able to tell from that if your chipset is supported or not.

Chris

----------

## Iron_Mike

```
bash-2.05b# dmesg

Linux version 2.4.20 (root@gentoo-box) (gcc version 3.2.1) #5 Thu Mar 20 20:57:2

9 EST 2003

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 0000000017fec000 (usable)

 BIOS-e820: 0000000017fec000 - 0000000017fef000 (ACPI data)

 BIOS-e820: 0000000017fef000 - 0000000017fff000 (reserved)

 BIOS-e820: 0000000017fff000 - 0000000018000000 (ACPI NVS)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

383MB LOWMEM available.

On node 0 totalpages: 98284

zone(0): 4096 pages.

zone(1): 94188 pages.

zone(2): 0 pages.

Kernel command line: root=/dev/hdb3 ro hdd=ide-scsi hdc=ide-scsi

ide_setup: hdd=ide-scsi

ide_setup: hdc=ide-scsi

Initializing CPU#0

Detected 1477.483 MHz processor.

Console: colour VGA+ 80x25

Calibrating delay loop... 2949.12 BogoMIPS

Memory: 386020k/393136k available (1630k kernel code, 6728k reserved, 539k data,

 108k init, 0k highmem)

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)

Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)

Page-cache hash table entries: 131072 (order: 7, 524288 bytes)

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: 0383f9ff c1c3f9ff 00000000 00000000

CPU:             Common caps: 0383f9ff c1c3f9ff 00000000 00000000

CPU: AMD Athlon(TM)Processor stepping 00

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

PCI: PCI BIOS revision 2.10 entry at 0xf1170, last bus=1

PCI: Using configuration type 1

PCI: Probing PCI hardware

PCI: Using IRQ router ALI [10b9/1533] at 00:07.0

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

Starting kswapd

Journalled Block Device driver loaded

devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)

devfs: devfs_debug: 0x0

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

pty: 256 Unix98 ptys configured

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI IS

APNP enabled

ttyS00 at 0x03f8 (irq = 4) is a 16550A

Uniform Multi-Platform E-IDE driver Revision: 6.31

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ALI15X3: IDE controller on PCI bus 00 dev 20

ALI15X3: detected chipset, but driver not compiled in!

PCI: No IRQ known for interrupt pin A of device 00:04.0. Please try using pci=bi

osirq.

ALI15X3: chipset revision 196

ALI15X3: not 100% native mode: will probe irqs later

ALI15X3: simplex device:  DMA disabled

ide0: ALI15X3 Bus-Master DMA disabled (BIOS)

ALI15X3: simplex device:  DMA disabled

ide1: ALI15X3 Bus-Master DMA disabled (BIOS)

hda: Maxtor 5T030H3, ATA DISK drive

hdb: MAXTOR 6L020J1, ATA DISK drive

hdc: HL-DT-ST GCE-8481B, ATAPI CD/DVD-ROM drive

hdd: Pioneer DVD-ROM ATAPIModel DVD-106S 011, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: 60030432 sectors (30736 MB) w/2048KiB Cache, CHS=3736/255/63

hdb: 40132503 sectors (20548 MB) w/1819KiB Cache, CHS=39813/16/63

```

it says disabled in bios, i went there and didnt find how to enable it...

----------

## ctford0

 *Quote:*   

> ALI15X3: IDE controller on PCI bus 00 dev 20 
> 
>  ALI15X3: detected chipset, but driver not compiled in! 
> 
>  PCI: No IRQ known for interrupt pin A of device 00:04.0. Please try using pci=bi 
> ...

 

This is it.......

You need to enable an ALI chipset in your kernel and that will take care of your chipset problem.  Then if DMA is still not enabled by default, running hdparm should take care of it.

Chris

----------

## Iron_Mike

that did the trick, thank you to all for helping me...

thanks to ctford0 for the module thing

one last question, can i make it enable auto on boot?

----------

## Malakin

When I first replied to this thread I thought you said you had an nforce board, now I don't see nforce mentioned anywhere in the thread, sorry about that, guess I'm losing my mind ;)

----------

## Iron_Mike

 :Smile: 

----------

## ctford0

Well, you have 2 options, you could compile it into the kerne, or if you compile it as a module you need to put it in you modules.autoload file.  I would suggest that you compile it into the kernel.

Chris

----------

## Iron_Mike

yup i did put it in the kernel, the thing is that my drive is dma off by default on boot, i need to log in as root and do the hdparm thing...

----------

## Antonio Sanchez

I have a i-buddie 4 (DeskNote A928), and when i boot my laptop dma is off, after i can put dma on using hdparm, how i put dma on per default ?

----------

## magnet

try adding the hdparm init script to default runlevel, like :

```

rc-update add hdparm default

```

----------

## Antonio Sanchez

Thanks, that's ok. UDMA activated for ever.

----------

