# [SOLVED] hdd dma is off

## mixs

Hello,

I install Gentoo on my P4 box, but now i have one problem. I have 2 IDE disks, but for both dma is off. How can i get DMA on?

# hdparm /dev/hdc

/dev/hdc:

 multcount     = 16 (on)

 IO_support    =  0 (default 16-bit)

 unmaskirq     =  0 (off)

 using_dma     =  0 (off)

 keepsettings  =  0 (off)

 readonly      =  0 (off)

 readahead     = 256 (on)

 geometry      = 19457/255/63, sectors = 312581808, start = 0

# lspci

00:00.0 Host bridge: Intel Corporation 82845 845 (Brookdale) Chipset Host Bridge (rev 04)

00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset AGP Bridge (rev 04)

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

00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 05)

00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 05)

00:1f.2 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 05)

00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 05)

00:1f.4 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 05)

01:00.0 VGA compatible controller: nVidia Corporation NV28 [GeForce4 Ti 4200 AGP 8x] (rev a1)

02:09.0 Network controller: Compaq Computer Corporation Netelligent 10/100 TX PCI UTP (rev 10)

02:0a.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)

02:0a.1 Input device controller: Creative Labs SB Audigy Game Port (rev 03)

02:0a.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port

# hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   718 MB in  2.00 seconds = 358.58 MB/sec

 Timing buffered disk reads:   12 MB in  3.56 seconds =   3.37 MB/sec

I use kernel 2.6.24-gentoo-r3

I think mybe it is kernel configuration problem, but i cannot find good configuration to solve this problem.  :Embarassed: Last edited by mixs on Sat Mar 22, 2008 7:30 pm; edited 1 time in total

----------

## barbar

Check if your kernel has:

```
Device Drivers-><*> ATA/ATAPI/MFM/RLL support  ---> 

<*>     Include IDE/ATA-2 DISK support 

<*>     Intel PIIXn chipsets support
```

Check with 

```
hdparm -i /dev/hdc
```

which udma modes are supprted

You can manually enable dma with

```
hdparm -d1 -X udma5 /dev/hdc
```

----------

## mixs

hdparm -i /dev/hdc

/dev/hdc:

 Model=WDC WD1600JB-00EVA0, FwRev=15.05R15, SerialNo=WD-WMAEH1964366

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74

 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455

 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

 UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6

 * signifies the current active mode

 ~ # hdparm -d1 -X udma2 /dev/hdc

/dev/hdc:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 setting xfermode to 66 (UltraDMA mode2)

 using_dma     =  0 (off)

 ~ # hdparm /dev/hdc

/dev/hdc:

 multcount     = 16 (on)

 IO_support    =  0 (default 16-bit)

 unmaskirq     =  0 (off)

 using_dma     =  0 (off)

 keepsettings  =  0 (off)

 readonly      =  0 (off)

 readahead     = 256 (on)

 geometry      = 19457/255/63, sectors = 312581808, start = 0

----------

## mixs

Thanks

Now i have dma on.   :Wink: 

I need to compile kernel with this option:

<*>     Intel PIIXn chipsets support

Now it is much better:

/dev/hdc:

 Timing cached reads:   784 MB in  2.00 seconds = 391.64 MB/sec

 Timing buffered disk reads:   82 MB in  3.02 seconds =  27.18 MB/sec

----------

## d2_racing

Nice, know you have some power to compile your Gentoo  :Smile: 

----------

## Skuromis

Hi,

for me it doesn't work that easy.

I have both options in my kernel, but still no dma for my HDD.

 *Quote:*   

> Zwergenland linux # hdparm -i /dev/hda
> 
> /dev/hda:
> 
>  Model=TOSHIBA MK2035GSS, FwRev=DK022A, SerialNo=77AFT0M4T
> ...

 

 *Quote:*   

> 
> 
> Zwergenland linux # hdparm -d1 /dev/hda
> 
> /dev/hda:
> ...

 

Any ideas?

Cheers,

Marc.

----------

## barbar

Do you have the same chipset? Check with lspci.

----------

## d2_racing

Yeah can you post your lspci plz ?

----------

## Skuromis

Hi again,

back to my PC and here my lspci:

 *Quote:*   

> 
> 
> Zwergenland skuromis # lspci
> 
> 00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)
> ...

 

It is not exactly the same chipset, isn't it?

Marc.

----------

## d2_racing

no, you have a ICH8, so you need to have it inside the SATA-PATA section.

You need theses options :

```

(*) SCSI device support

     (*) SCSI Disk Support

     (*) SCSI CDROM Support

     (*) SCSI Generic Support

(*) Serial ATA (prod) and Parallel ATA (experimental) drivers

     (*) AHCI SATA support

     (*) Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

     (*) Intel PATA MPIIX support

```

With that you will be ok.

----------

## Skuromis

Thank you, unfortunately it didn't work either... or did I do something else wrong.

What about this option?

 *Quote:*   

> 
> 
> # CONFIG_BLK_DEV_IDE_SATA is not set
> 
> 

 

Marc.

----------

