# DMA on kernel 2.6.10-gentoo-r7? [SOLVED]

## Sargonmetal

Hi,

when I try to turn on de DMA on my hda I get the following error message:

#hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

my  Host Bridge when I do an lspci is:

Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)

When I compiled the kernel I use (2.6.10-gentoo-r7) I set up the following line as "y":

CONFIG_BLK_DEV_PIIX=y

I got a PIV 3400 Ht processor and I don't know what else I can do to solve this.

I heard somewhere something about the syslog, but I don't know what is that. I am newbie on linux.

I would really appreciate any help  :Wink: 

Here you have a part of my .config:

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_CMD640_ENHANCED=y

CONFIG_BLK_DEV_IDEPNP=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_IDEDMA_FORCED=y

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

CONFIG_BLK_DEV_PIIX=y

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

# CONFIG_BLK_DEV_VIA82CXXX is not set

# CONFIG_IDE_ARM is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

Thanks!

UriLast edited by Sargonmetal on Tue Mar 15, 2005 9:24 am; edited 1 time in total

----------

## i92guboj

Mine:

```
#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_CMD640 is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

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

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

# CONFIG_BLK_DEV_PIIX is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set
```

Are you sure that you choosed the correct driver?

----------

## Sargonmetal

Yes, I am.

I'll try to recompile with the same .config as yours.

I will tell...

Thanks!

----------

## Sargonmetal

I recompiled my kernel with that configuration and it still doesn't work...

I got only one hd and it's partitioned as:

hda1: win partition

hda2: /boot

hda3: /swap

hda4: /

I should turn on DMA with "hdparm -d1 /dev/hda", isn't it?

I hope someone could help...  :Wink: 

----------

## i92guboj

Could you post the output of 'dmesg|grep IDE' and 'lspci'?

----------

## Sargonmetal

Here you have:

PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1

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

Probing IDE interface ide0...

Probing IDE interface ide1...

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

and lspci:

0000:00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)

0000:00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02)

0000:00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)

0000:00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)

0000:00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)

0000:00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)

0000:00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)

0000:00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)

0000:00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)

0000:00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)

0000:00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)

0000:00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)

0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5500] (rev a1)

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

0000:02:0e.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

0000:02:0f.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

Thanks!

----------

## i92guboj

Here you have the kernel config for a machine with the same chipset.

http://gentoo-wiki.com/Fractoon's_dedicated_build_-_part_1

Your driver is not loading for any reason as dmesg output shows, untill it loads right you won't be able to use advanced features like power saving and ultra dma. Are you sure that you are running the right kernel image?

----------

## Sargonmetal

Thanks, I'll try to recompile with those settings.

Anyway, I'm not sure if I'm getting the correct image of the kernel, how could I know it?

Sorry, as I said, I'm a newbie on linux...

----------

## i92guboj

 *Sargonmetal wrote:*   

> Thanks, I'll try to recompile with those settings.
> 
> Anyway, I'm not sure if I'm getting the correct image of the kernel, how could I know it?
> 
> Sorry, as I said, I'm a newbie on linux...

 Seems like is the case. How are you compiling? I don't know about genkernel as I've never used it. To manually compile the kernel choose the correct settings (for example with make menuconfig in the kernel dir of the version that you want to compile (/usr/src/linux is a soft link to another dir, check that the link is adequate).

Then you have to:

```
make && make install modules_install
```

For 2.4 series you do:

```
make bzImage && make modules && make modules_install && make install
```

By the way, make sure that you choose all the stuff related to this thing compiled into the kernel, not as a module.

----------

## Sargonmetal

I''ve followed every step of the kernel config from the link above and I still get the same error message when I try to turn dma on.

When I boot the computer I get two warnings telling me that my dma is off and fschk process could be very slow.

I don't know what else I can do... I am compiling and using the right kernel version, now I'm really sure about it.

Please, somebody help me!  :Rolling Eyes: 

Thanks!

----------

## i92guboj

Could you try the gentoo livecd and see if the dma is on?

If affirmative then the point is somewhere in your kernel config for sure (or maybe in the kernel version you choosed).

----------

## Sargonmetal

Definetely is a configuration kernel problem: when I boot from a live CD I can do an hdparm an dmy dma is activated.

Any more ideas?

I really want to have my dma working!

Thanks!!

----------

## i92guboj

One point to start would be to compare compare the output of mesg between the livecd kernel and yours, so you could figure what the differences are between them.

Your could also compare the configs, but I'm not sure if you can acces the config of the livecd kernel (if you can it would be thru the /proc/config.gz file, supposing that feature is enabled in the livecd kernel, with I doubt).

----------

## Sargonmetal

When I do "mesg" on the livecd I only get:

```

is n

```

I have no idea what does this mean....

I think I'll never solve this problem  :Crying or Very sad: 

----------

## i92guboj

```
man mesg
```

```
MESG(1)                       Linux User's Manual                      MESG(1)

NAME

       mesg - control write access to your terminal

SYNOPSIS

       mesg [y|n]

DESCRIPTION

       Mesg  controls  the  access to your terminal by others.  It's typically

       used to allow or disallow other users to write to  your  terminal  (see

       write(1)).

```

The right code

```
man dmesg
```

```
DMESG(8)                                                              DMESG(8)

NAME

       dmesg - print or control the kernel ring buffer

SYNOPSIS

       dmesg [ -c ] [ -n level ] [ -s bufsize ]

DESCRIPTION

       dmesg is used to examine or control the kernel ring buffer.

       The program helps users to print out their bootup messages.  Instead of

       copying the messages by hand, the user need only:

              dmesg > boot.messages

       and mail the boot.messages file to whoever can debug their problem.

```

----------

## Sargonmetal

I didn't know the name of dmesg. Now I think I'll remember it  :Wink: 

Ok, I rebooted with live CD and I copied the .config and the output of dmesg.

With LiveCD the Hyper Threading is also activated, and I can turn on the dma so I've tried to compile my kernel with the .config from the liveCD but the same thing has happened: No DMA, no HT, no eth, no USB, no NTFS, ...

To compile I do:

```

make && make install modules_install

```

Anyway, I've compiled my kernel with my old configuration (to have my eth works!) and I 've done:

```

diff boot.livecd.txt boot.txt

```

And what I have seen is that the live CD is using a kernel 2.6.9-gentoo-r1. Maybe this one is more stable than the 2.6.10-gentoo-r7 (the one I am using at the moment)?. Do you recommend me to install this kernel with the config from the live CD? Everything should work this way isn't it? In this case, what should I have to do to keep the old kernel but using the new one?

[/code]

Thanks a lot, I really apreciate your help!  :Wink: 

----------

## i92guboj

there should beno problem for that. i ca thik oly of on thing. is your /boot partition mouted whe you install the rcompild kernel? if it is't then you ar istallig it o a dead zoe. O the other hand maybe you are usig the wrong paths into grub.conf. Othrwise this is ot understandable.  :Shocked:  (my ky is brokn)

----------

## Sargonmetal

 :Shocked:   :Shocked:   :Shocked: 

YES! The boot partition was unmounted!

grgr

Now I understand almost everything.

But I still got some problems: when I mount my /boot it says that the device is full, while it is 32Mb and I'm only using 6 or 7Mb.

on fstab I use:

/dev/hda2 /boot reserf notail 0 1

Thank you very much.

I feel like the one tou talk about on your sign... "Cuanta estupidez en tan poco cerebro..."

----------

## i92guboj

 *Sargonmetal wrote:*   

>   
> 
> YES! The boot partition was unmounted!
> 
> grgr
> ...

 

Hi again, I have a new keyboard, now I can continue writing all over the forums.  :Wink:  Don't worry about my signature (solamente una frase famosa entre my grupo de amigos).

I feel so glad that we could figure out what were happening with this, I was becoming ungry with this... Regarding to the new error that you get... Don't know if it's related (surely not, but...) you mispelled reiserfs in your post. Check it, and it it do not work try temporarily change /boot into the root partition (just comment out the boot line in fstab, and then, recompile the kernel, this time without having mounted /boot, so your kernel will be saved in the root partition). This way you will be able to boot from the proper kernell till' you figure out what's wrong with this.

----------

## Sargonmetal

At last, It all works now!

HT enabled, DMA enabled, NTFS, usb, everything!

wow.

My system works really fast!  :Very Happy: 

I've had to boot with my / partition but everything is fine now. Great! Thank you very much, your help has been amazing.

I think I'm beggining to like linux hehe

See you around, take care!

----------

## i92guboj

Wow, I feel happy too! Count on me for everything you need (till my limited knowledge reachs, of course).

----------

## i92guboj

Wow, I feel happy too! Count on me for everything you need (till my limited knowledge reachs, of course).

[EDIT]

Mark as solved, plz, so maybe anyone more will find this usefull.

[/EDIT]

----------

## Sargonmetal

Done  :Smile: 

Thanks again! :Razz: 

----------

