# DMA problem

## Amorphis

I have seen some ppl experiencing problems when trying to turn DMA support on using INTEL 845G boards.

When trying to set DMA using hdparm i get:

> HDIO_SET_DMA failed: Operation not permitted 

and i also get this error on my dmesg:

> PCI: Device 00:1f.1 not available because of resource collisions

> PCI_IDE: (ide_setup_pci_device:) Could not enable device. 

After looking around for a while i found a thread about this problem:

http://lists.insecure.org/linux-kernel/2002/Jun/0044.html

and the patch to solve it  :Smile: 

http://lists.insecure.org/linux-kernel/2002/Jun/att-0538/01-andre.patch

Didn't have the opportunity to test it yet, will do as soon as I get at home!

----------

## klieber

Please post the results here when you find out how it works.  Also, can you post what kernel flavor you patched it against?  (i.e. gentoo-sources or vanilla-sources?)

--kurt

----------

## Amorphis

Ok

I'm going to patch it against gentoo-sources. Probbably it will work with any 2.4.19 kernel sources as it's only a matter of adding the board model to the list of supported models. Only 5-6 lines to be added.

----------

## Moon

The patch mentioned by Amorphis seems to require a vanilla-kernel 2.4.18 patched up to 2.4.19-pre9 with ac3 applied. I was not able to make it run with the gentoo-sources. 

So the steps required are:

1. emerge vanilla-sources

2. patch these with 2.4.19-pre9

3. apply Alan Cox's third patch for 2.4.19-pre9(=2.4.19-pre9ac3)

4. apply the custom patch posted by Amorphis

Some of these didn't work for me without modifying the Kernelconfig but that maybe caused by my limited knowledge of Kernelpatching in general  :Smile: 

In the end i got a system with working DMA(Chipset is i845E, Board is ABIT-BD7II-Raid). The Problem seems to effect most of the newer i845 Chipsets(D,G,E etc.).

Summary: at least a little understanding of Kernel-compiling required, some steps are rather tricky

P.S.: Problem is NOT solved in 2.4.19-rc1(even though Changelog mentions i8xx Chipset patches)

----------

## Amorphis

I noticed the patch was not for the gentoo-sources but I was planning on patching the file by hand. Anyway when I got home i realized I had a different problem as my IDE controller is already identified by the kernel (the patch was for a different controller not present in the kernel sources).

Anyway i think this patch can solve some people problems with DMA.

----------

## extort

I was wondering if you ever found a solution to the i845G chipset problem with DMA mode and the resource conflict?  I've been looking but I can't seem to find anything.

I'd really appreciate it if you would help me!  PIO mode is horrible   :Crying or Very sad: 

----------

## pilla

Maybe this applies.

----------

## extort

Amorphis's patch on commenting out the return statement in pci-i386.c seems to fix my Intel i845G problem -- I can now set DMA mode.  I modified the file in the gentoo-sources kernel with no other modifications (didnt emerge vanilla-sources or apply any other patches).

Thanks Amorphis, and I suggest anyone else with the problem first try using what he posted   :Wink: 

----------

## Darth_Daver

I have an ASUS P4PE, and I was also getting these errors:

 *Quote:*   

> HDIO_SET_DMA failed: Operation not permitted 
> 
> 

 

when using hdparm and 

 *Quote:*   

> PCI: Device 00:1f.1 not available because of resource collisions 
> 
> 

 

on boot.  I upgraded to the Gentoo Sources 2.4.20-r1 kernel last night.  I still get the "resource collisions" message, but DMA now works.  I went from 3.2 MB/s to 47 MB/s.  No other fixes were required.

----------

