# Problems with udma6 and hdparm. [SOLVED]

## Sith_Happens

I just got a brand spanking new Maxtor Ultra-ATA 133 drive, and I was dissapointed to find when I ran hdparm -Tt on my drive, the drive was slow as hell.  My other drive (ATA-133) now shows half the transfer that it used to before I installed the drive (from 50 mb/s to around 27), and my Ultra-ATA 133 drive shows the exact same transfer rate.  I have an Intel 82801EB IDE controller, which I'm fairly sure supports Ultra-ATA, and I'm using the cable that came with the new drive.  I tried to set udma mode 6 (133) for my Ultra-ATA drive using, but it is stuck in udma mode 2.  I think if I can set my new drive to udma6, then my problem will be solved, but hdparm can't seem to do it.  Does anybody know what the problem is?

----------

## mkw22468

the problem with your drive is in the cable. with most drives, the box comes with a 40-pin ide cable. this only allows modes of up to udma2. if you want your drive to be able to use up to udma6, you will need a 80-pin ide cable.

----------

## Sith_Happens

Like I said, I'm using the cable that came with the Ultra-ATA drive, it's an 80 pin cable.

----------

## Sith_Happens

For the hell of it here is the output of hdparm -I, and as you can see the udma mode is set to 2, despite my efforts to change it.  By the way I checked the specs on the Intel 82801EB controller, and it is supposed to be able to handle Ultra-ATA transfer rates of up to 100 mb/s, so 27 mb/s from an Ultra-ATA 133 is ridiculous.  Since it only supports 100 mb/s though, I guess I should be setting the dma mode to udma5 (100 mb/s), although even that setting doesn't work.  The output for /dev/hda shows the same possible udma modes, but also at udma2.

```
/dev/hdb:

ATA device, with non-removable media

        Model Number:       Maxtor 6B250R0                          

        Serial Number:      B60P8ZHH            

        Firmware Revision:  BAH41B70

Standards:

        Supported: 7 6 5 4 

        Likely used: 7

Configuration:

        Logical         max     current

        cylinders       16383   65535

        heads           16      1

        sectors/track   63      63

        --

        CHS current addressable sectors:    4128705

        LBA    user addressable sectors:  268435455

        LBA48  user addressable sectors:  490234752

        device size with M = 1024*1024:      239372 MBytes

        device size with M = 1000*1000:      251000 MBytes (251 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        Queue depth: 32

        Standby timer values: spec'd by Standard, no device specific minimum

        R/W multiple sector transfer: Max = 16  Current = 16

        Advanced power management level: unknown setting (0x0000)

        Recommended acoustic management value: 192, current value: 254

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

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4 

             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    NOP cmd

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

           *    SMART feature set

           *    FLUSH CACHE EXT command

           *    Mandatory FLUSH CACHE command 

           *    Device Configuration Overlay feature set 

           *    48-bit Address feature set 

           *    Automatic Acoustic Management feature set 

                SET MAX security extension

                Advanced Power Management feature set

           *    DOWNLOAD MICROCODE cmd

           *    SMART self-test 

           *    SMART error logging 

Security: 

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 1 determined by CSEL

Checksum: correct

```

----------

## Sachankara

You shouldn't put both harddrives on the same cable. IDE just plain su*ks for that.

----------

## Sith_Happens

I checked the output of dmesg after I try setting udma5 on my second hard drive using hdparm, and it shows the line 

```
ide0: Speed warnings UDMA 3/4/5 is not functional.
```

I googled this and came up with little answers.  Most seemed to link the problem to lack of kernel support for the ide controller.  Problem is I have support for Intel PIIx (ICH5) built into my kernel, as well as dma support.  Is there any other kernel support that I would need for udma 5?  I'm really perplexed here, and I'm not sure what to do.

----------

## Sith_Happens

I added the following as command line options for the kernel in my grub.conf

```
hda=ata69 hdb=ata69
```

For some reason when I tried ide0=ata69, it didn't work.  Now both drives are running with udma5, which I beleve is the fastest that my controller can handle.  I guess I managed to solve my own problem, so I suppose this post can help others who might run into this difficulty

----------

## csheppar

I'm having the exact same problem but your kernel parameters aren't working for me. I get BAD OPTION in dmesg. Could you verify the info in your post please?

----------

## csheppar

Hmm, ide0=ata66 is what worked for me. Only went from 25 MB/sec to 35 though although I'm not sure what I should be expecting. Thanks for your post, it got me on the right track.

----------

## phsdv

 *csheppar wrote:*   

> Hmm, ide0=ata66 is what worked for me. Only went from 25 MB/sec to 35 though although I'm not sure what I should be expecting.

 

Did you get any faster transfer rates by now? I have the exact same hard drive and get:

```
# hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   648 MB in  2.00 seconds = 324.00 MB/sec

 Timing buffered disk reads:  160 MB in  3.04 seconds =  52.63 MB/sec

```

```
# hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6B250R0, FwRev=BAH41B70, SerialNo=B60N385H

 Config={ Fixed }

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

 BuffType=DualPortCache, BuffSize=16384kB, 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 udma6 

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null): 

 * signifies the current active mode

```

So I think some you should be able to get more, especially their your IDE controller can do ATA100. My mobo (yes its is old, I know) only supports ATA66:

```
# lspci

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8605 [ProSavage PM133] (rev 81)

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8605 [PM133 AGP]

0000:00:04.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)

0000:00:04.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)

0000:00:04.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)
```

From dmesg:

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

VP_IDE: IDE controller at PCI slot 00:04.1

VP_IDE: chipset revision 16

VP_IDE: not 100% native mode: will probe irqs later

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

VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci00:04.1

    ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:pio

hda: Maxtor 6B250R0, ATA DISK drive

blk: queue c043de40, I/O limit 4095Mb (mask 0xffffffff)

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hda: attached ide-disk driver.

hda: host protected area => 1

hda: 490234752 sectors (251000 MB) w/16384KiB Cache, CHS=30515/255/63, UDMA(66)

```

If you have not solved your transfer problem yet, can you post your /usr/src/linux/.config? Maybe you have some conflicting drivers compiled in? 

Also I am interested to know what the disk capabilities are to check if I need to update my IDE controller for max through put?

----------

## Sith_Happens

We'll. 

1) Find the specs for your controller online and make sure it can handle burst transfers abouve udma3.

2) Make sure that you are using a cable that can handle transfers above udma3 (80 pin as opposed to 40 pin)

3) run 

```
cat /usr/src/linux/.config | grep BLK_DEV_VIA82CXX
```

 To make sure your kernel is configured correctly for your chipset.

Check those and then get back to me.

----------

## phsdv

Thanks for replying, Sith_Happens. But I do not have a real transfer problem. I know my controller can only do UDMA66, the question is, is this UDMA133 disk limited by the, known slower, controller?

The 52Mbyte/s I get,  is close to the limits of the controller, if you include overhead it might be the case. I just do not know if it is true.

As you have the same disk I wanted to see if you have a better transfer rate by now.

----------

## Sith_Happens

We'll, my transfer rate is about the same, however I've got two drives on the same cable.  It looks like everything is working fine.

----------

