# DMA not working on acer tm 4150

## kamikaze04

Hello everybody,

I have just installed my gentoo on an acer travelmate 4150. Everything works fine, except the fact that i cannnot enable DMA. I have tried everything, and now i copy my tests with hdparm,and kernel config to see if you could help me:

```

Apolo-bis ~ # 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     = 16383/255/63, sectors = 60011642880, start = 0

```

```

Apolo-bis ~ # hdparm -i /dev/hdc

/dev/hdc:

 Model=IC25N060ATMR04-0, FwRev=MO3OAD4A, SerialNo=MRA301KEKZWGVH

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

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

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

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

 IORDY=on/off, tPIO={min:240,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: mode=0xFE (254) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:

 * signifies the current active mode

```

```

hdparm -I /dev/hdc

.....

Capabilities:

        LBA, IORDY(can be disabled)

        bytes avail on r/w long: 4      Queue depth: 1

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

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

        Advanced power management level: 254 (0xfe)

        Recommended acoustic management value: 128, current value: 254

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

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

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

....

```

```

Apolo-bis ~ # hdparm -d1 /dev/hdc

/dev/hdc:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

And here my kernel config, (if you need more, just tell me)

```

  <*> ATA/ATAPI/MFM/RLL support                                                                │ │

  │ │                   <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support                                 

  │ │                   ---     Please see Documentation/ide.txt for help/info on IDE drives                   

  │ │                   [ ]     Support for SATA (deprecated; conflicts with libata SATA driver)                    

  │ │                   [ ]     Use old disk-only driver on primary interface                       

  │ │                   <*>     Include IDE/ATA-2 DISK support                                         

  │ │                   [*]     Use multi-mode by default                                                          

  │ │                   <*>     PCMCIA IDE support                                            

  │ │                   <*>     Include IDE/ATAPI CDROM support                                                

  │ │                   < >     Include IDE/ATAPI TAPE support (EXPERIMENTAL)                        

  │ │                   <*>     SCSI emulation support                                                              

  │ │                   [*]     IDE Taskfile Access                                                                

  │ │                   ---     IDE chipset support/bugfixes                                                        

  │ │                   <*>     generic/default IDE chipset support                                               

  │ │                   [*]     CMD640 chipset bugfix/support                                                     

  │ │                   [ ]       CMD640 enhanced support                                                          

  │ │                   [*]     PCI IDE chipset support                                                           

  │ │                   [*]       Sharing PCI IDE interrupts support                                              

  │ │                   [ ]       Boot off-board chipsets first support                                             

  │ │                   <*>       Generic PCI IDE Chipset Support                                                 

  │ │                   < >       OPTi 82C621 chipset enhanced support (EXPERIMENTAL)                              

  │ │                   < >       RZ1000 chipset bugfix/support                                                   

                           [*]       Generic PCI bus-master DMA support                                                 

  │ │                   [ ]         Force enable legacy 2.0.X HOSTS to use DMA                                    

  │ │                   [*]         Use PCI DMA by default when available                                        

  │ │                   [ ]           Enable DMA only for disks                                                     

  │ │                   < >         AEC62XX chipset support                                                       

```

And here the output from lspci

```

Apolo-bis ~ # lspci

0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)

0000:00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

0000:00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04)

0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 04)

0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 04)

0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 04)

0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 04)

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

0000:00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 04)

0000:00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 04)

0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04)

0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)

0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04)

0000:01:00.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)

0000:01:01.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

0000:01:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

```

Any ideas will be good. Thanks a lot!

----------

## NeddySeagoon

kamikaze04,

Further down the menu from 

```
[*]     PCI IDE chipset support 
```

You need to turn on the PXII Chipset Support then rebuild your kernel. It must be built in, not a module.

----------

## kamikaze04

thanks NeddySeagoon,

but... :Embarassed:  ...sorry, i forgot to copy/paste that line too...

I have tried with and without the pxiin support, but still having the same result, no DMA.

Any one could point me about my missconfiguration? 

Thanks a los.

----------

## NeddySeagoon

kamikaze04,

That chip can be dificult to set up for DMA. If you look in lspci you will see its listed as a SATA driver but it controls your CD-ROM as /dev/hdc.

It has two configuration settings in the kernel and posiibly your BIOs too. Try adding in SCSI support, SCSI Disk Support and under Low Level SCSI Drivers, SATA  and PIIX.

----------

## Winamp

Have the same problem  :Sad: ((

Added all of that NeddySeagoon said, but still no result (now ata can't find any devices)  :Sad: 

----------

## NeddySeagoon

Winamp,

Please post your lspci output.

Lines that mention SATA and/or IDE will be enough.

----------

## Winamp

Here is my lspci output:

```

0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)

0000:00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

0000:00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04)

0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 04)

0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 04)

0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 04)

0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 04)

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

0000:00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 04)

0000:00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 04)

0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04)

0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)

0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04)

0000:01:00.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)

0000:01:01.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

0000:01:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

0000:01:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)

0000:01:04.1 FLASH memory: ENE Technology Inc: Unknown device 0530 (rev 01)

0000:01:04.2 Class 0805: ENE Technology Inc: Unknown device 0550 (rev 01)

0000:01:04.3 FLASH memory: ENE Technology Inc: Unknown device 0520 (rev 01)

0000:01:04.4 FLASH memory: ENE Technology Inc: Unknown device 0551 (rev 01)

```

With this kernel configuration (ide & scsi only):

```

#

# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_BLK_DEV_IDECD=y

CONFIG_BLK_DEV_IDESCSI=m

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_IDEPNP=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_GENERIC=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_IDEDMA_FORCED=y

CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_BLK_DEV_PIIX=y

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_IDEDMA_AUTO=y

#

# SCSI device support

#

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=y

CONFIG_BLK_DEV_SR=y

CONFIG_CHR_DEV_SG=y

#

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

#

# CONFIG_SCSI_MULTI_LUN is not set

CONFIG_SCSI_CONSTANTS=y

CONFIG_SCSI_LOGGING=y

#

# SCSI Transport Attributes

#

CONFIG_SCSI_FC_ATTRS=y

#

# SCSI low-level drivers

#

CONFIG_SCSI_SATA=y

CONFIG_SCSI_ATA_PIIX=y

CONFIG_SCSI_QLA2XXX=y

CONFIG_SCSI_QLA22XX=y

```

I get /dev/hdc as my HDD and /dev/hdd as my optical drive... so I cannot turn on dma for them...

But when I turn select ide section in kernel configuration as module, I get the following - http://www.carbotec.ru/img/acer_nb.jpg

Thank you in advance

----------

## Winamp

So no ideas at all???  :Sad: ((

----------

## gama

I have the same notebook tm 4152lmi and  searching in the net i try to change the libata.h file but i didin't enable dma for the disk and the dvd.

Anyone had found the solution please

----------

## schlummerkissen

i own a travelmate 4101 wlmi and after some kernel changes i got dma running here is my config

 *Quote:*   

> 
> 
> # ATA/ATAPI/MFM/RLL support
> 
> #
> ...

 

maybe you need some more changes but here it works, and i dont think that your notebook has much differences.

----------

## gama

Thank you in advance schlummerkissen, now I try your kernel configuration, but first only one question: did you enable some scsi support in your kernel? The hard disk e dvd are always hdc and hdd?

----------

## schlummerkissen

my hard disk is /dev/hda

and my dvd is /dev/cdrom

i have compiled some scsi-stuff, but only as modules and not loaded.

It should work without.

----------

## gama

Thank you schlummerkissen, but yours kernel configuration don't work for me. I can't enable dma for the disk and dvd so my notebook it's very slow and I can't burn anythings in my dvd-rw. For information my disc it's /dev/hdc and the dvd it's /dev/hdd. I tried to disable in the kernel all ide drivers as suggested in this thread: https://forums.gentoo.org/viewtopic-t-356273-start-0-postdays-0-postorder-asc-highlight-.html

but I can't boot y gentoo due to kernel panic.

Any suggsuggestion?

----------

## 13Homer

I had similar problem with my Acer Aspire 5012. The solution was enabling (built-in into kernel) ATI IXP chipset (AIR the only not compiled in by default!).

I didn't change other settings. And it started working.

Maybe try enable all chipsets?

Uh! And sorry for my english

----------

## schlummerkissen

maybe you try first to run a live-cd like kanotix and test if dma mode runs there.

Then you could compare the config of the life-cd and the loaded modules etc. with your gentoo-kernel.

May be it could help you.

----------

## gama

I tried enable all the ide chipset but nothing all the same; then I booted knoppix live cd but also this linux distribution don't enable dma; i tried Mandriva 10.1 the same things; at the end I tried Ubuntu 5.04 but was impossible to boot the live-cd because the distribution didn't see the cdrom (dvdrom). Now I'm downloading kanotix and ......

----------

## gama

Finally I apply manually this patch: http://marc.theaimsgroup.com/?l=linux-ide&m=112032992832526&w=2 at the gentoo-sources kernel (adding manually the four line in the piix.c file because the command patch -p0 < ...... didn't work for me), recompiling the kernel without any SCSI and PATA drivers and now dma is working.

Thanks to all.

----------

## Mos

worked for me too, on my acer tm 4150.   :Smile:   :Smile:   :Smile:   :Smile:   :Smile: 

Thanks alot gama !!

----------

## gentleman

Hm, I'm just too stupid to understand what I have to do here. Can s.o. explain what four lines have to be cpoied to which file? I get a little bit confused by page behind this link =).

Thanks a lot.

----------

## gama

Now, with the new gentoo kernel is not necessary to apply that patch.

In the kernel 2.6.15-r7 and newer it's sufficient enable SCSI disk support - SCSI generic support - Serial ATA (SATA) support - AHCI SATA support - Intel PIIX/ICH SATA support. In this way the hard disk will be SDA  and the cdrom SR0 and the DMA is always on. Remember to change the fstab before rebooting.

----------

## djedy

hi,i compiled the kernel with that options & without IDE,but iafter boot it hangs in grub,with a mesage about error 17

can anybody help m?

----------

## gama

I don't use grub so I don't know the error 17 but are you sure you changed the file etc/grub.conf with the new disk? 

Remember that now the hard disk is recognize as SCSI disk

----------

## kamikaze04

I also did the same. I applied the patch and dma is now on.

The patch is

```

diff -Naurp linux-2.6.16.orig/drivers/ide/pci/piix.c linux-2.6.16/drivers/ide/pci/piix.c

--- linux-2.6.16.orig/drivers/ide/pci/piix.c   2006-03-20 06:53:29.000000000 +0100

+++ linux-2.6.16/drivers/ide/pci/piix.c   2006-03-24 00:29:34.000000000 +0100

@@ -132,6 +132,7 @@ static u8 piix_ratemask (ide_drive_t *dr

       case PCI_DEVICE_ID_INTEL_82801DB_11:

       case PCI_DEVICE_ID_INTEL_82801EB_11:

       case PCI_DEVICE_ID_INTEL_ESB_2:

+      case PCI_DEVICE_ID_INTEL_ICH6_5:

       case PCI_DEVICE_ID_INTEL_ICH6_19:

       case PCI_DEVICE_ID_INTEL_ICH7_21:

       case PCI_DEVICE_ID_INTEL_ESB2_18:

@@ -447,6 +448,7 @@ static unsigned int __devinit init_chips

       case PCI_DEVICE_ID_INTEL_82801EB_11:

       case PCI_DEVICE_ID_INTEL_82801E_11:

       case PCI_DEVICE_ID_INTEL_ESB_2:

+      case PCI_DEVICE_ID_INTEL_ICH6_5:

       case PCI_DEVICE_ID_INTEL_ICH6_19:

       case PCI_DEVICE_ID_INTEL_ICH7_21:

       case PCI_DEVICE_ID_INTEL_ESB2_18:

@@ -578,6 +580,7 @@ static ide_pci_device_t piix_pci_info[] 

    /* 22 */ DECLARE_PIIX_DEV("ICH4"),

    /* 23 */ DECLARE_PIIX_DEV("ESB2"),

    /* 24 */ DECLARE_PIIX_DEV("ICH8M"),

+   /* 25 */ DECLARE_PIIX_DEV("ICH6M"),

 };

 

 /**

@@ -655,6 +658,7 @@ static struct pci_device_id piix_pci_tbl

    { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 22},

    { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 23},

    { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 24},

+   { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 25},

    { 0, },

 };

 MODULE_DEVICE_TABLE(pci, piix_pci_tbl);

diff -Naurp linux-2.6.16.orig/include/linux/pci_ids.h linux-2.6.16/include/linux/pci_ids.h

--- linux-2.6.16.orig/include/linux/pci_ids.h   2006-03-20 06:53:29.000000000 +0100

+++ linux-2.6.16/include/linux/pci_ids.h   2006-03-24 00:28:35.000000000 +0100

@@ -2092,6 +2092,7 @@

 #define PCI_DEVICE_ID_INTEL_ICH6_0   0x2640

 #define PCI_DEVICE_ID_INTEL_ICH6_1   0x2641

 #define PCI_DEVICE_ID_INTEL_ICH6_2   0x2642

+#define PCI_DEVICE_ID_INTEL_ICH6_5   0x2653

 #define PCI_DEVICE_ID_INTEL_ICH6_16   0x266a

 #define PCI_DEVICE_ID_INTEL_ICH6_17   0x266d

 #define PCI_DEVICE_ID_INTEL_ICH6_18   0x266e

```

Good luck

----------

## blue_american

I tried your patch (also downloaded 2.6.16 kernel) and I got:

dunkelheit ~ # patch -p0 < piix.patch

patching file linux-2.6.16/drivers/ide/pci/piix.c

Hunk #1 FAILED at 132.

Hunk #2 FAILED at 448.

Hunk #3 FAILED at 580.

Hunk #4 FAILED at 658.

4 out of 4 hunks FAILED -- saving rejects to file linux-2.6.16/drivers/ide/pci/piix.c.rej

dunkelheit ~ # patch -p0 < pci_ids.patch

patching file linux-2.6.16/include/linux/pci_ids.h

Hunk #1 FAILED at 2092.

1 out of 1 hunk FAILED -- saving rejects to file linux-2.6.16/include/linux/pci_ids.h.rej

Any ideias?

----------

