# unable to enable DMA

## frogg

Hi, I am totally new to linux and I have been having lots of lag when hd is busy. Someone said that I should enable dma, but I am currently unable to do this. As root, I get the following:

```
euc /usr/src/linux# hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

I went to several bbs' and did everything that was said there but nothing has worked. So if you could help I would greatly appreciate it! Thanks.

This is the output of dmesg:

```
Linux version 2.6.8-gentoo-r3 (root@frogg) (gcc version 3.3.4 20040623 (Gentoo L

inux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #12 Thu Oct 21 21:53:33 EDT 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)

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

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001bff0000 (usable)

 BIOS-e820: 000000001bff0000 - 000000001bff3000 (ACPI NVS)

 BIOS-e820: 000000001bff3000 - 000000001c000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

447MB LOWMEM available.

On node 0 totalpages: 114672

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 110576 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

Built 1 zonelists

Kernel command line: root=/dev/hda5

Initializing CPU#0

CPU 0 irqstacks, hard=c03d6000 soft=c03d5000

PID hash table entries: 2048 (order 11: 16384 bytes)

Detected 2201.486 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

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

Memory: 450832k/458688k available (1994k kernel code, 7088k reserved, 761k data,

 116k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 4308.99 BogoMIPS

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU: After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU: After vendor identify, caps:  0383fbff c1c3fbff 00000000 00000000

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

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

CPU: After all inits, caps:        0383fbff c1c3fbff 00000000 00000020

CPU: AMD Athlon(tm) XP 3200+ stepping 00

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

NET: Registered protocol family 16

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

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

PCI: Using IRQ router VIA [1106/3227] at 0000:00:11.0

PCI: IRQ 0 for device 0000:00:0a.0 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 5 for device 0000:00:0a.0

PCI: Sharing IRQ 5 with 0000:00:09.2

PCI: Sharing IRQ 5 with 0000:00:10.4

PCI: IRQ 0 for device 0000:00:10.0 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 10 for device 0000:00:10.0

PCI: Sharing IRQ 10 with 0000:00:10.1

PCI: Sharing IRQ 10 with 0000:00:12.0

PCI: IRQ 0 for device 0000:00:10.2 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 11 for device 0000:00:10.2

PCI: Sharing IRQ 11 with 0000:00:09.0

PCI: Sharing IRQ 11 with 0000:00:10.3

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

NTFS driver 2.1.15 [Flags: R/O].

PCI: Via IRQ fixup for 0000:00:10.0, from 255 to 10

PCI: Via IRQ fixup for 0000:00:10.1, from 255 to 10

PCI: Via IRQ fixup for 0000:00:10.2, from 255 to 11

PCI: Via IRQ fixup for 0000:00:10.3, from 255 to 11

mice: PS/2 mouse device common for all miceinput: AT Translated Set 2 keyboard on isa0060/serio0

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected VIA KM400/KM400A chipset

agpgart: Maximum main memory to use for agp memory: 380M

agpgart: AGP aperture is 64M @ 0xe0000000

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

loop: loaded (max 8 devices)

via-rhine.c:v1.10-LK1.1.20-2.6 May-23-2004 Written by Donald Becker

PCI: Found IRQ 10 for device 0000:00:12.0

PCI: Sharing IRQ 10 with 0000:00:10.0

PCI: Sharing IRQ 10 with 0000:00:10.1

eth0: VIA Rhine II at 0xea008000, 00:11:2f:56:c2:6a, IRQ 10.

eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

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

hda: SAMSUNG SP1604N, ATA DISK drive

hdc: LITE-ON DVD+RW SOHW-802S, ATAPI CD/DVD-ROM drive

hdd: ASUS CD-S480/AH, ATAPI CD/DVD-ROM drive

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

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

hda: max request size: 1024KiB

hda: 312581808 sectors (160041 MB) w/2048KiB Cache, CHS=19457/255/63

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 p8 p9 >

hdc: ATAPI 40X DVD-ROM CD-R/RW drive, 2048kB Cache

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 48X CD-ROM drive, 128kB Cache

ieee1394: Initialized config rom entry `ip1394'

ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>

PCI: Found IRQ 5 for device 0000:00:09.2

PCI: Sharing IRQ 5 with 0000:00:0a.0

PCI: Sharing IRQ 5 with 0000:00:10.4

ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[5]  MMIO=[ea004000-ea0047ff]  Max 

Packet=[2048]

PCI: Found IRQ 3 for device 0000:00:0b.0

ohci1394: fw-host1: OHCI-1394 1.0 (PCI): IRQ=[3]  MMIO=[ea006000-ea0067ff]  Max 

Packet=[2048]

ieee1394: raw1394: /dev/raw1394 device initialized

PCI: Found IRQ 5 for device 0000:00:10.4

PCI: Sharing IRQ 5 with 0000:00:09.2

PCI: Sharing IRQ 5 with 0000:00:0a.0

ehci_hcd 0000:00:10.4: VIA Technologies, Inc. USB 2.0

ehci_hcd 0000:00:10.4: irq 5, pci mem dc858000

ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.4: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 8 ports detected

USB Universal Host Controller Interface driver v2.2

PCI: Found IRQ 10 for device 0000:00:10.0

PCI: Sharing IRQ 10 with 0000:00:10.1

PCI: Sharing IRQ 10 with 0000:00:12.0

uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

uhci_hcd 0000:00:10.0: irq 10, io base 0000cc00

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

PCI: Found IRQ 10 for device 0000:00:10.1

PCI: Sharing IRQ 10 with 0000:00:10.0

PCI: Sharing IRQ 10 with 0000:00:12.0

uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller 

(#2)

uhci_hcd 0000:00:10.1: irq 10, io base 0000d000

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

PCI: Found IRQ 11 for device 0000:00:10.2

PCI: Sharing IRQ 11 with 0000:00:09.0

PCI: Sharing IRQ 11 with 0000:00:10.3

uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller 

(#3)

uhci_hcd 0000:00:10.2: irq 11, io base 0000d400

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

PCI: Found IRQ 11 for device 0000:00:10.3

PCI: Sharing IRQ 11 with 0000:00:09.0

PCI: Sharing IRQ 11 with 0000:00:10.2

uhci_hcd 0000:00:10.3: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller 

(#4)

uhci_hcd 0000:00:10.3: irq 11, io base 0000d800

uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 2 ports detected

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004

 UTC).

PCI: Found IRQ 11 for device 0000:00:09.0

PCI: Sharing IRQ 11 with 0000:00:10.2

PCI: Sharing IRQ 11 with 0000:00:10.3

ALSA device list:

  #0: Sound Blaster Audigy2 (rev.4) at 0xa000, irq 11

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 65536)

NET: Registered protocol family 1

NET: Registered protocol family 17

VFS: Mounted root (ext2 filesystem) readonly.

Freeing unused kernel memory: 116k freed

ieee1394: Host added: ID:BUS[1-00:1023]  GUID[00e01800008da74c]

usb 3-1: new low speed USB device using address 2

input: USB HID v1.10 Mouse [B16_b_02 USB-PS/2 Optical Mouse] on usb-0000:00:10.1

-1

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023c00a1038871]

usb 3-2: new low speed USB device using address 3

input: USB HID v1.00 Keyboard [Darfon USB Combo Keyboard] on usb-0000:00:10.1-2

input: USB HID v1.00 Device [Darfon USB Combo Keyboard] on usb-0000:00:10.1-2

usb 5-1: new full speed USB device using address 2

Adding 1043240k swap on /dev/hda6.  Priority:-1 extents:1

eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

drivers/usb/input/hid-input.c: event field not found

NTFS volume version 3.1.

spurious 8259A interrupt: IRQ7.

serio: i8042 AUX port at 0x60,0x64 irq 12

```

and lspci:

```
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host Bridge

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge

0000:00:09.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)

0000:00:09.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port (rev 04)

0000:00:0a.0 Communication controller: Agere Systems (former Lucent Microelectronics) V.92 56K WinModem (rev 03)

0000:00:0b.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)

0000:00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]

0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)

0000:01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8378 [S3 UniChrome] Integrated Video (rev 01)

```

And I currently have the VIA82CXXX chipset compiled in:

```
CONFIG_BLK_DEV_VIA82CXXX=y

```

Also, in case it is relevant:

```
euc /usr/src/linux# grep IDE .config

# CONFIG_PARIDE is not set

# 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_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 is not set

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_IDE_TASK_IOCTL is not set

CONFIG_BLK_DEV_IDEPCI=y

# CONFIG_IDEPCI_SHARE_IRQ is not set

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_PCI_WIP is not set

# CONFIG_AMD74XX_OVERRIDE is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_IDEDMA_IVB is not set

# CONFIG_IEEE1394_VIDEO1394 is not set

# CONFIG_INPUT_SIDEWINDER is not set

# CONFIG_VIDEO_DEV is not set

# CONFIG_VIDEO_SELECT is not set

# CONFIG_SOUND_TRIDENT is not set

```

----------

## dsd

you should first try upgrading to 2.6.9

----------

## EnsnareGod

My problem is that I can't set my dma to on also and i know i have it in the kernel i just compiled I have only the generic DMA and IDE installed (*) or (y) but my chipset isn't in there

----------

## jeffceth

yo frogg, is that you?  wow, what are the chances that the reason I'm on this forum in the first place is that I can't get my dma working either!

wow,

jeffceth

----------

## EnsnareGod

Nope this isn't frogg but we both can't get dma working.I know that the dma has to be a kernel problem but which one it is I don't know. I believe that the default kernel for the universal cd that I uesd to install gentoo with worked with dma so I will take a look but and ideas about the DMA would help greatly.

            Thanks beforehand               

            EnsnareGod

            (James)

----------

## waif_boy

First you need to uncheck the SCSI emulation in the kernel. and re-compile your kernel. It should work, because when you enable SCSI emulation in the kernel, your kernel will block the DMA setting for all your hd* and sd* drivers.

----------

## EnsnareGod

I figured it out. It was in the kernel like i thought but it was of course my wonderful human error of not looking up all my hardware and knowing which goes with which in the kernel.

PS SCSI was never copiled in or as a module in my kernel.

----------

## frogg

 *waif_boy wrote:*   

> First you need to uncheck the SCSI emulation in the kernel. and re-compile your kernel. It should work, because when you enable SCSI emulation in the kernel, your kernel will block the DMA setting for all your hd* and sd* drivers.

 

I don't see where I am enabling SCSI emulation...

```
euc /usr/src/linux# grep SCSI .config

# CONFIG_CISS_SCSI_TAPE is not set

# CONFIG_BLK_DEV_IDESCSI is not set

# SCSI support

# CONFIG_SCSI is not set

# CONFIG_I2O_SCSI is not set

# CONFIG_USB_HPUSBSCSI is not set

```

And yeah, MANs, it is me :P

----------

## jago25_98

"First you need to uncheck the SCSI emulation in the kernel. and re-compile your kernel. It should work, because when you enable SCSI emulation in the kernel, your kernel will block the DMA setting for all your hd* and sd* drivers."

Oh no, don't think so. After all, we and to be able to burn cds and still be able to use USB drives, SCSI drives. It's unrelated as far as I know.

----------

## EnsnareGod

my DMA works without SCSI in the Kernel

----------

## frogg

btw, this works for me now. I upgraded to 2.6.9-r9 and now it works. Not sure what was wrong.

----------

## EnsnareGod

my problem was my hardware i have a HP laptop and lspci didn't make it clear to me what I had so I did some research and found out what I had.

----------

