# [solved] EeePC 1000H problem with HDD - DMA or wrong driver?

## emc

Hi,

During compiling kernel (install from 2008.0 LiveCD) i got:

 *Quote:*   

> end_request: I/O error, dev hda, sector 82054575 
> 
> hda: no DRQ after issuing MULTWRITE_EXT 
> 
> hda: status error: status=0x58 { DriveReady SeekComplete DataRequest } 
> ...

 

And e2fsck /dev/hda6 was busy fixing tons of problems!

I notice one thing during booting from LiveCD:

```
* Running hdparm on /dev/hda ...

HDIO_SET_DMA failed: Operation not permitted
```

So for some reason DMA can't be turn on. Definatlly it's true because read speed (much tu lower):

```
# hdparam -tT /dev/hda6

/dev/hda6:

 Timing cached reads:   1320 MB in  2.00 seconds = 659.72 MB/sec

 Timing buffered disk reads:    6 MB in  3.91 seconds =   1.53 MB/sec
```

I tried turn in on manually:

```
# hdparm -d1 /dev/hda6

/dev/hda6:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Invalid argument

 using_dma     =  0 (off)
```

I've check HDD parameters:

```
# hdparm -iI /dev/hda6

/dev/hda6:

 HDIO_SET_DMA failed: Invalid argument

 

ATA device, with non-removable media

   Model Number:       ST9160310AS                             

   Serial Number:      5SV0Z1KX

   Firmware Revision:  0303    

   Transport:          Serial

Standards:

   Supported: 8 7 6 5 

   Likely used: 8

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:  312581808

   device size with M = 1024*1024:      152627 MBytes

   device size with M = 1000*1000:      160041 MBytes (160 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 (0x8080)

   Recommended acoustic management value: 254, current value: 0

   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:

      *   SMART feature set

          Security Mode feature set

      *   Power Management feature set

      *   Write cache

      *   Look-ahead

      *   Host Protected Area feature set

      *   WRITE_BUFFER command

      *   READ_BUFFER command

      *   DOWNLOAD_MICROCODE

      *   Advanced Power Management feature set

          SET_MAX security extension

      *   48-bit Address feature set

      *   Device Configuration Overlay feature set

      *   Mandatory FLUSH_CACHE

      *   FLUSH_CACHE_EXT

      *   SMART error logging

      *   SMART self-test

      *   General Purpose Logging feature set

      *   WRITE_{DMA|MULTIPLE}_FUA_EXT

      *   WRITE_DMA_QUEUED_FUA_EXT

      *   64-bit World wide name

      *   IDLE_IMMEDIATE with UNLOAD

      *   Write-Read-Verify feature set

      *   WRITE_UNCORRECTABLE command

      *   {READ,WRITE}_DMA_EXT_GPL commands

      *   SATA-I signaling speed (1.5Gb/s)

      *   SATA-II signaling speed (3.0Gb/s)

      *   Native Command Queueing (NCQ)

      *   Phy event counters

          DMA Setup Auto-Activate optimization

          Device-initiated interface power management

          Software settings preservation

      *   SMART Command Transport (SCT) feature set

      *   SCT Long Sector Access (AC1)

      *   SCT LBA Segment Access (AC2)

      *   SCT Error Recovery Control (AC3)

      *   SCT Features Control (AC4)

      *   SCT Data Tables (AC5)

          unknown 206[12]

Security: 

   Master password revision code = 65534

      supported

   not   enabled

   not   locked

      frozen

   not   expired: security count

      supported: enhanced erase

   54min for SECURITY ERASE UNIT. 54min for ENHANCED SECURITY ERASE UNIT.

Checksum: correct
```

Notice first error message:

```
# hdparm -i /dev/hda6

/dev/hda6:

 HDIO_SET_DMA failed: Invalid argument
```

I found two post:

http://www.linuxquestions.org/questions/linux-hardware-18/hdparm-d1-devhda-gives-me-hdiosetdma-failed-operation-not-permitted-260894/

http://www.linuxquestions.org/questions/slackware-14/hdiosetdma-failed-operation-not-permitted-397378/

It looks like, I have wrong drivers, but on the other hand follow wiki http://www.gentoo-wiki.info/Asus_EEE_PC_1000. I have the same:

```
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)

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

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
```

I use correct ata_piix:

```
Module                  Size  Used by

dock                   18448  0 

fan                    12804  0 

battery                16640  0 

video                  26640  0 

backlight              13188  1 video

output                 11776  1 video

ac                     12544  0 

thermal                24092  0 

button                 16528  0 

processor              39656  3 thermal

rtc                    20768  0 

tg3                   111748  0 

e1000                 119616  0 

jfs                   169836  0 

raid10                 30080  0 

raid456               129296  0 

async_memcpy           10880  1 raid456

async_xor              12160  1 raid456

xor                    21896  2 raid456,async_xor

async_tx               15948  3 raid456,async_memcpy,async_xor

raid1                  30080  0 

raid0                  15872  0 

dm_bbr                 20128  0 

dm_snapshot            24996  0 

dm_mirror              29440  0 

dm_mod                 63428  3 dm_bbr,dm_snapshot,dm_mirror

sbp2                   29960  0 

ohci1394               38192  0 

ieee1394               92600  2 sbp2,ohci1394

sl811_hcd              19968  0 

usbhid                 35712  0 

ohci_hcd               29700  0 

uhci_hcd               30988  0 

usb_storage           120608  2 

ehci_hcd               39948  0 

usbcore               133484  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd

lpfc                  216016  0 

qla2xxx               168548  0 

firmware_class         17408  1 qla2xxx

megaraid_sas           35504  0 

megaraid_mbox          38160  0 

megaraid_mm            18464  1 megaraid_mbox

megaraid               44360  0 

aacraid                68996  0 

sx8                    25484  0 

DAC960                 73032  0 

cciss                  41220  0 

cpqarray               28004  0 

3w_9xxx                39300  0 

3w_xxxx                32928  0 

mptsas                 43144  0 

scsi_transport_sas     37120  1 mptsas

mptfc                  25988  0 

scsi_transport_fc      49028  3 lpfc,qla2xxx,mptfc

scsi_tgt               22344  1 scsi_transport_fc

mptspi                 28296  0 

mptscsih               41344  3 mptsas,mptfc,mptspi

mptbase                78308  4 mptsas,mptfc,mptspi,mptscsih

atp870u                36352  0 

dc395x                 39052  0 

sim710                 13188  0 

53c700                 33444  1 sim710

qla1280               123660  0 

dmx3191d               20096  0 

sym53c8xx              77588  0 

qlogicfas408           15104  0 

aha152x                42512  0 

aha1740                15872  0 

advansys               85248  0 

initio                 24900  0 

BusLogic               72948  0 

arcmsr                 29952  0 

aic7xxx               168760  0 

aic79xx               241624  0 

scsi_transport_spi     30848  7 mptspi,53c700,dmx3191d,sym53c8xx,aha152x,aic7xxx,aic79xx

sg                     41360  0 

pdc_adma               17668  0 

sata_inic162x          20228  0 

sata_mv                28936  0 

ata_piix               26372  0 

ahci                   34180  0 

sata_qstor             17924  0 

sata_vsc               16516  0 

sata_uli               15620  0 

sata_sis               16772  0 

sata_sx4               20484  0 

sata_nv                33160  0 

sata_via               19588  0 

sata_svw               15748  0 

sata_sil24             24068  0 

sata_sil               19080  0 

sata_promise           20996  0 

scsi_wait_scan          9472  0 

pata_sis               21892  1 sata_sis

libata                152248  17 pdc_adma,sata_inic162x,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise,pata_sis
```

Then I use my gparted LiveUSB, and here my HDD looks much better, take a look:

```
# hdparm -iI /dev/sda6

/dev/sda6:

 Model=ST9160310AS                             , FwRev=0303    , SerialNo=            5SV0Z1KX

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

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

 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?

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

 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: unknown setting WriteCache=enabled

 Drive conforms to: unknown:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode

ATA device, with non-removable media

   Model Number:       ST9160310AS                             

   Serial Number:      5SV0Z1KX

   Firmware Revision:  0303    

   Transport:          Serial

Standards:

   Used: unknown (minor revision code 0x0029) 

   Supported: 8 7 6 5 

   Likely used: 8

Configuration:

   Logical      max   current

   cylinders   16383   16383

   heads      16   16

   sectors/track   63   63

   --

   CHS current addressable sectors:   16514064

   LBA    user addressable sectors:  268435455

   LBA48  user addressable sectors:  312581808

   device size with M = 1024*1024:      152627 MBytes

   device size with M = 1000*1000:      160041 MBytes (160 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: 128

   Recommended acoustic management value: 254, current value: 0

   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:

      *   SMART feature set

          Security Mode feature set

      *   Power Management feature set

      *   Write cache

      *   Look-ahead

      *   Host Protected Area feature set

      *   WRITE_BUFFER command

      *   READ_BUFFER command

      *   DOWNLOAD_MICROCODE

      *   Advanced Power Management feature set

          SET_MAX security extension

      *   48-bit Address feature set

      *   Device Configuration Overlay feature set

      *   Mandatory FLUSH_CACHE

      *   FLUSH_CACHE_EXT

      *   SMART error logging

      *   SMART self-test

      *   General Purpose Logging feature set

      *   WRITE_{DMA|MULTIPLE}_FUA_EXT

      *   WRITE_DMA_QUEUED_FUA_EXT

      *   64-bit World wide name

      *   IDLE_IMMEDIATE with UNLOAD

      *   Write-Read-Verify feature set

      *   WRITE_UNCORRECTABLE_EXT command

      *   {READ,WRITE}_DMA_EXT_GPL commands

      *   SATA-I signaling speed (1.5Gb/s)

      *   SATA-II signaling speed (3.0Gb/s)

      *   Native Command Queueing (NCQ)

      *   Phy event counters

          DMA Setup Auto-Activate optimization

          Device-initiated interface power management

          Software settings preservation

      *   SMART Command Transport (SCT) feature set

      *   SCT Long Sector Access (AC1)

      *   SCT LBA Segment Access (AC2)

      *   SCT Error Recovery Control (AC3)

      *   SCT Features Control (AC4)

      *   SCT Data Tables (AC5)

          unknown 206[12] (vendor specific)

Security: 

   Master password revision code = 65534

      supported

   not   enabled

   not   locked

      frozen

   not   expired: security count

      supported: enhanced erase

   54min for SECURITY ERASE UNIT. 54min for ENHANCED SECURITY ERASE UNIT.

Logical Unit WWN Device Identifier: 5000c50011658dab

   NAA      : 5

   IEEE OUI   : c50

   Unique ID   : 011658dab

Checksum: correct
```

```
#lsmod

Module                  Size  Used by

i915                   25216  1 

drm                    64672  2 i915

dm_crypt               11012  0 

crypto_blkcipher       14724  1 dm_crypt

dm_mod                 45384  1 dm_crypt

jfs                   148060  0 

xfs                   446836  0 

fuse                   41116  1 

rng_core                3972  0 

psmouse                32016  0 

serio_raw               4740  0 

iTCO_wdt                9248  0 

pcspkr                  2304  0 

video                  16272  0 

output                  2816  1 video

battery                10116  0 

ac                      4228  0 

eeepc_laptop            7440  0 

button                  6032  0 

intel_agp              22204  1 

agpgart                28336  3 drm,intel_agp

evdev                   7808  6 

squashfs               35976  1 

zlib_inflate           14080  1 squashfs

loop                   12428  2 

aufs                  108304  1 

exportfs                3712  1 aufs

nls_cp437               5504  1 

vfat                    8960  1 

fat                    40220  1 vfat

sg                     27440  0 

sr_mod                 13092  0 

cdrom                  30240  1 sr_mod

ext3                  103688  0 

jbd                    35092  1 ext3

ext2                   52744  0 

mbcache                 6656  2 ext3,ext2

nls_utf8                1792  1 

ntfs                  180416  0 

nls_base                6528  6 jfs,nls_cp437,vfat,fat,nls_utf8,ntfs

ide_generic             2432  0 [permanent]

sd_mod                 22032  2 

ide_pci_generic         3844  0 [permanent]

ide_core               95144  2 ide_generic,ide_pci_generic

usb_storage            75712  1 

ata_piix               14212  0 

ata_generic             4612  0 

libata                141088  2 ata_piix,ata_generic

scsi_mod              129804  5 sg,sr_mod,sd_mod,usb_storage,libata

ehci_hcd               28300  0 

uhci_hcd               18448  0 

dock                    8076  1 libata

usbcore               117616  4 usb_storage,ehci_hcd,uhci_hcd

atl1e                  27156  0 

thermal                15132  0 

processor              28080  2 thermal

fan                     4100  0 

thermal_sys            10784  4 video,thermal,processor,fan
```

Interesting it that, now I have (in gpatred) /dev/sda6 instead of (in gentoo) /dev/hda6!

Finally i found:

http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux#No_DMA_on_system_hard_disk

 *Quote:*   

> - ata_piix: the disk shows as /dev/sda and DMA is enabled.
> 
> - Generic IDE driver (ide-disk): the disk shows as /dev/hda and DMA is disabled.
> 
> The simplest way to enable DMA is to force the IDE driver to ignore the system hard disk by passing the hda=noprobe and hda=none kernel argument. The driver will then be handled by the ata_piix driver. Note that this will change its device name to /dev/sda (which may require changes in /etc/fstab and the boot loader) and may cause other problems as listed above.

 

So what should I do? I'm lost! What's about drivers/modules? Why gentoo discovery my HDD as hda instead of sda? I want install gentoo on my EeePC! How to pass kernel arguments (described in last web page). How I can move forward to set up gentoo in my box.

I found some info regarding libata, but it say much to me:

http://linux-ata.org/faq.html

Thx in advance!Last edited by emc on Thu Feb 26, 2009 8:18 pm; edited 1 time in total

----------

## gringo

 *Quote:*   

> Why gentoo discovery my HDD as hda instead of sda?

 

There are two alternatives nowadays in the linux kernel : the old pata/ide driver where your harddrive is detected as hdX and the new libata driver where the harddrives are detected as scsi drives, so sdX. The libata driver enables dma by default. 

There are of course generic drivers but try to avoid them because performance will suck.

Check that your hardware does work fine using any other livecd, like this one f.ex but any other live cds should do the job, and use that livecd for the installation. If you don´t see any errors there i´d say it´s gentoo´s livecd fault, maybe it´s just too old for the hardware that ships with the eeepc1000.

hope this helps.

cheers

----------

## emc

Yes, SystemRescueCD working perfect. Right now I'm compling kernel on my /dev/sda6  :Laughing: 

----------

