# cannot change to udma 5 using hdparm

## dayul

Hi,

I am currently using gentoo-dev-sources-2.6.5-r1, and have a 20GB Ultra ATA/100 HD that is currently in use.

my problem is that it seems to be stuck at udma 2 (when i check using hdparm -i /dev/hda).

when i try to set it to udma 5 using hdparm -d1 -X69 /dev/hda, it says that it has set it and does not give any errors, however, when i check it is still udma 2.

also when i check in dmesg, it gives me the following:

```
hda: 39070080 sectors (20003 MB) w/1768KiB Cache, CHS=38760/16/63, UDMA(33)
```

whereas i think the disk should be UDMA(100).

i have checked for settings in the bios, but could not find any.

i am also using the correct chipset in the kernel (SIS5513).

does anyone have any suggestions how i could fix this, or if i am missing something?

thanks,

d

----------

## NeddySeagoon

dayul,

All three parts of the system have to support the higher UDMA speeds before you can use them. Thats the chip set, the drive and the cable. An 80 conductor ribbon cable is a must have and if you only have one drive connected, it must be at the end of the cable.

Some motherboards to not detect the 80 conductor cable properly, so you need a kernel parameter to force it. (I'll need to look it up). If you try to force UDMA5 on a 40 way ribbon, you will just trash the data on the drive.

To check, take the lid off your box and compare the conductor spacing on the floppy and hdd cables. If they are the same, you have a 40 conductor IDE ribbon - get a new cable. The difference is obvious. Its a factor of 2:1.

----------

## dayul

thanks for the reply, 

i will check the cable, although i forgot to add that i am using a laptop, and all of the hardware (including the drive) came as one, i dont know if that will make a difference.

----------

## NeddySeagoon

dayul,

In a laptop, you normally have a flexible printed circuit, not a cable. It will be tracked to work like an 80 conductor cable.

Look in /usr/src/<kernel>/Documentation/kernel-parameters.txt if you want to know how to tell the kernel it can use the higher UDMA modes.

----------

## dayul

ok, will do, thanks for all your help NeddySeagoon

----------

## teutzz

usually the bios sets the maximum possible settings at boot time, so when setting up hdparm the X setting, in your case X68 (aka ATA100, as you say)

----------

## dayul

i was wondering that, but when i read some documentation it said that Ultra ATA/100 drives could do udma 5, also when i do hdparm -I i get:

```

Used: ATA/ATAPI-5 T13 1321D revision 3

        Supported: 5 4 3 2 & some of 6

```

which led me to think that udma 5 was possible

----------

## teutzz

from that message i see that you already use mode ata mode 5, so what's your point?

----------

## dayul

well that just tells me that they are supported, further down it says:

```
DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5
```

which tells me that i am using udma2 as far as im aware

----------

## dayul

ok, so now i added ide0=ata66 (the only option i could see which i thought could help)

when i do a dmesg it now shows correctly as UDMA(100), and also in hdparm *udma 5

however, now when booting in dmesg i get lines that say 

```

hda: dma_timer_expiry: dma status == 0x20

hda: DMA timeout retry

hda: timeout waiting for DMA

```

and the actual performance of the hd when i do hdparm -tT is the same

----------

## dayul

added the ide0=autotune kernel parameter and it appears to work fine now with no errors,

thanks for the point in the right direction NeddySeagoon, and also for your help  teutzz

d

----------

## gentood

where did you add ide0=autotune? kernel parameter? where can i find that?

----------

## NeddySeagoon

gentood,

You can find the information in /usr/src/linux/Documentation.

Look in ide.txt for that particular parameter and kernel-parameters.txt for many others. That whole directory is good reading.

To use any kernel parameters, you add them to the kernel line in grub.conf. You should have "root=" there already and may have others too.

----------

## dayul

as NeddySeagoon mentioned, you just add to grub.conf, 

for example mine is as follows:

kernel (hd0,5)/boot/kernel-2.6.5-gentoo-r1 root=/dev/hda6 ide0=ata66 ide0=autotune

hope this helps,

dale

----------

## tuxamd

Thanks for everyone's posts here, this helped me very much. I also have a laptop and I just passed the kernel parameter to use udma5 and it works perfectly. Hdparm results show a slight increase in speed too. I wasn't aware that all 3 components are required to support it and that laptop have those flexible printed circuits, now I know and everything works great  :Smile: 

----------

