# Enabling IDE DMA on Gigabyte GA-8I915P-G mainboard [SOLVED]

## TranceTip

Hi,

I have a GA-8I915P-G mainboard (Intel 915P, ICH6 chipset).

What kernel settings are required to enable the use of DMA with IDE drives on

that chipset? Setting DMA for my PATA harddrive or DVD burner tells me "Operation

not permitted". I currently have "Intel PIIXn chipsets support" enabled in the

kernel DMA settings, but that is probably totally wrong.

```

pollux /root# hdparm -i /dev/hdc /dev/hdd

/dev/hdc:

 Model=Maxtor 6Y120P0, FwRev=YAR41BW0, SerialNo=Y43XLXTE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

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

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

 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

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null):

 * signifies the current active mode

/dev/hdd:

 Model=_NEC DVD_RW ND-3500AG, FwRev=2.18, SerialNo=

 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }

 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=unknown, BuffSize=0kB, MaxMultSect=0

 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0

 IORDY=yes, 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

 AdvancedPM=no

 * signifies the current active mode

pollux /root# hdparm -d1 /dev/hdc /dev/hdd

/dev/hdc:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

/dev/hdd:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

pollux /root# hdparm -tT /dev/hdc

/dev/hdc:

 Timing cached reads:   4148 MB in  2.00 seconds = 2074.32 MB/sec

 Timing buffered disk reads:   14 MB in  3.18 seconds =   4.40 MB/sec

```

Any ideas? If more information on my system is required, please tell me.

Greets,

TranceTip.Last edited by TranceTip on Tue May 03, 2005 9:02 pm; edited 6 times in total

----------

## IvanYosifov

Had this problem a long time ago, eventually managed to solve it. Seems to be quite a common one. My thread ( and my solution ) is https://forums.gentoo.org/viewtopic-t-265982-postdays-0-postorder-asc-start-0.html

Not sure if this will apply to your setup. Hope it helps  :Very Happy: .

----------

## TranceTip

@IvanYosifov: Thanks, I'll look at your thread ASAP

In the meanwhile, here are my system/config details:

I'm using gentoo-sources-2.6.11-r6.

I have one SATA drive (sda) with Gentoo on it, one PATA drive (hdc) and one PATA DVD burner (hdd) installed.

My kernel config: http://www.menden.org/gentoo/config.txt

My output of lspci: http://www.menden.org/gentoo/lspci.txt

My output of dmesg: http://www.menden.org/gentoo/dmesg.txt

----------

## TranceTip

Ivan, I looked through your thread.

My BIOS settings for SATA was "auto", I set it to manual, selected the correct channels. Gentoo

boots fine, but it doesn't make any difference concerning DMA.

My dmesg doesn't mention combined mode, btw.Last edited by TranceTip on Wed Apr 27, 2005 9:04 am; edited 1 time in total

----------

## TranceTip

My dmesg shows that sda is processed by a different driver than hdc and hdd:

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

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

ide0: I/O resource 0x1F0-0x1F7 not free.

ide0: ports already in use, skipping probe

Probing IDE interface ide1...

hdc: Maxtor 6Y120P0, ATA DISK drive

hdd: _NEC DVD_RW ND-3500AG, ATAPI CD/DVD-ROM drive

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

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

hdc: max request size: 128KiB

hdc: Host Protected Area detected.

        current capacity is 240119615 sectors (122941 MB)

        native  capacity is 240121728 sectors (122942 MB)

hdc: Host Protected Area disabled.

hdc: 240121728 sectors (122942 MB) w/7936KiB Cache, CHS=65535/16/63

hdc: cache flushes supported

 hdc: hdc1 hdc2 < hdc5 hdc6 >

hdd: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache

Uniform CD-ROM driver Revision: 3.20

libata version 1.10 loaded.

ata_piix version 1.03

ACPI: PCI interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19

ata: 0x170 IDE port busy

PCI: Setting latency timer of device 0000:00:1f.2 to 64

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14

ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4063 85:7c68 86:3e01 87:4063 88:207f

ata1: dev 0 ATA, max UDMA/133, 398294975 sectors: lba48

ata1: dev 0 configured for UDMA/133

scsi0 : ata_piix

  Vendor: ATA       Model: Maxtor 6B200M0    Rev: BANC

  Type:   Direct-Access                      ANSI SCSI revision: 05

SCSI device sda: 398294975 512-byte hdwr sectors (203927 MB)

SCSI device sda: drive cache: write back

SCSI device sda: 398294975 512-byte hdwr sectors (203927 MB)

SCSI device sda: drive cache: write back

 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
```

May this cause the problem? How can it be changed?

The SATA drive works fine, btw:

```
pollux /root# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3996 MB in  2.00 seconds = 1998.30 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  182 MB in  3.01 seconds =  60.43 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
```

Greetings,

TranceTip.

----------

## IvanYosifov

Well... I can't help you any further. I found my solution by pure chance and I never really understood what happend and where the problem was. I am also running different hardware, etc. You may try the lkml ( or any other source of kernel gurus you have around  :Very Happy:  ). Good luck.

EDIT: You may also search the forum. There ( I think ) are many threads about this problem.

----------

## TranceTip

I managed to solve the problem by making changes in the BIOS and by rearranging the order of the drives.

My BIOS offers 5 modes for On-Chip SATA:

1. disabled (no SATA)

2. combined (1 channel for PATA, 1 channel for SATA)

3. non-combined (SATA only)

4. auto (auto detect)

5. enhanced (1 channel for PATA, 2 ports for SATA)

My original setup was SATA drive in port 0, my PATA drives in ports 2/3, mode "auto" or "combined"

My setup now is SATA drive in port 2, PATA drive in ports 0/1, mode "enhanced"

Et voilà, it works.  :Smile: 

The trick is to use the enhanced mode...

----------

## TranceTip

I'm not sure if it is technically impossible to set the DMA mode if the SATA mode

is not "enhanced" (I guess not).

Seems like an unsupported mode or a bug in the Linux driver.

Hopefully this is fixed soon!

----------

