# (SOLVED) DMA not working on VIA_8237A chipset (asus m2v mb)

## Dilo

I have just brought an asus m2v motherboard, and I cant get DMA working on it.

I think the kernel doesn't recognize the motherboard chipset, because:

```

# cat /var/log/dmesg |grep DMA

  DMA zone: 2473 pages, LIFO batch:0

  DMA32 zone: 254442 pages, LIFO batch:31

PCI-DMA: Disabling IOMMU.

VP_IDE: Unknown VIA SouthBridge, disabling DMA.

VP_IDE: Unknown VIA SouthBridge, disabling DMA.

```

I am using 2.6.16-gentoo-r13 kernel, and those are the relevant parts of my kernel config

```

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_CMD640 is not set

# CONFIG_BLK_DEV_IDEPNP is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

# CONFIG_BLK_DEV_GENERIC is not set

# CONFIG_BLK_DEV_OPTI621 is not set

# CONFIG_BLK_DEV_RZ1000 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

# CONFIG_BLK_DEV_PIIX is not set

# CONFIG_BLK_DEV_IT821X is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

```

I tryed with CONFIG_BLK_DEV_GENERIC=y too, but it gives the same results.

I have searched the forums, and all I found is that I should include in my kernel support for my chipset (of course), and remove CONFIG_BLK_DEV_IDEDMA_FORCED, which I did.

I am not entirely sure that CONFIG_BLK_DEV_VIA82CXXX is the right option for my chipset, but it's the most likely one:

```
# lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:00.1 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:00.2 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:00.3 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:00.4 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:00.5 PIC: VIA Technologies, Inc. VT3351 I/O APIC Interrupt Controller

00:00.6 Host bridge: VIA Technologies, Inc. Unknown device 6238

00:00.7 Host bridge: VIA Technologies, Inc. VT3351 Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. [K8T890 North / VT8237 South] PCI Bridge

00:02.0 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:03.0 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:03.1 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:03.2 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:03.3 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:0f.0 IDE interface: VIA Technologies, Inc. VT8237A SATA 2-Port Controller (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 07)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237A PCI to ISA Bridge

00:11.7 Host bridge: VIA Technologies, Inc. VT8251 Ultra VLINK Controller

00:13.0 PCI bridge: VIA Technologies, Inc. VT8237A Host Bridge

00:13.1 PCI bridge: VIA Technologies, Inc. VT8237A PCI to PCI Bridge

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

02:00.0 VGA compatible controller: nVidia Corporation GeForce 7300 GS (rev a1)

03:00.0 SATA controller: Marvell Technology Group Ltd. Unknown device 6121 (rev b0)

05:00.0 Ethernet controller: Unknown device 1969:1048 (rev b0)

07:01.0 Audio device: VIA Technologies, Inc. VIA High Definition Audio Controller (rev 10)

08:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

08:08.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)

```

Of course, my hard disk does support DMA:

```

# hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media

        Model Number:       Maxtor 6E040L0

        Serial Number:      E13FMEHN

        Firmware Revision:  NAR61HA0

Standards:

        Supported: 7 6 5 4

        Likely used: 7

Configuration:

        Logical         max     current

        cylinders       16383   16383

        heads           16      16

        sectors/track   63      63

        --

        CHS current addressable sectors:   16514064

        LBA    user addressable sectors:   80293248

        device size with M = 1024*1024:       39205 MBytes

        device size with M = 1000*1000:       41110 MBytes (41 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        Queue depth: 1

        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

           *    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

                frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

```

but it's off and I can't enable it:

```

 # hdparm -d 1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

Do you have any idea about what may be wrong?

Is there a way to know for sure if my chipset is supported?Last edited by Dilo on Sun Jul 23, 2006 7:23 pm; edited 1 time in total

----------

## aidy

there is a way to know your chipset is supported

for starters you could boot the livecd and check with hdparm if dma is enabled.

or you could grab the utmost latestest and greatestest version of the kernel, and use genkernel to build a kernel that should automagically do everything right. then check if dma can be enabled

----------

## dispanser

I have the same problem. I patched my kernel with some via patches (found here: http://forums.viaarena.com/messageview.aspx?catid=28&threadid=71754&enterthread=y), which brought my SATA drive to live. However, my DVD is still on the worst settings possible (no dma / pio, matches the speed of pencil + paper). I tried regular ide harddisk too, but no luck.

the patch removed the "DMA disabled" messages mentioned above, though. Maybe there's some other patch around to fix the dma issue, but i found none.

----------

## Dilo

I tried to recompile with genkernel, but it didn't change anything.

So, after hours of searching I found this page, which solved my problem

http://forums.viaarena.com/messageview.aspx?catid=28&threadid=72836&enterthread=y

Basically, linux does support this chipset, but doesn't know it yet, so you have to tell him to use the VIA_8237A  just like the VIA_8237

This means that to make the chipset work, you have to edit your kernel sources, adding in drivers/ide/pci/via82cxxx.c:

@@ -82,6 +82,7 @@

{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

+ { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

{ "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

{ "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },

{ "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 },

and in include/linux/pci_ids.h

@@ -1281,6 +1281,7 @@

#define PCI_DEVICE_ID_VIA_8378_0 0x3205

#define PCI_DEVICE_ID_VIA_8783_0 0x3208

#define PCI_DEVICE_ID_VIA_8237 0x3227

+#define PCI_DEVICE_ID_VIA_8237A 0x3337

#define PCI_DEVICE_ID_VIA_8251 0x3287

#define PCI_DEVICE_ID_VIA_3296_0 0x0296

#define PCI_DEVICE_ID_VIA_8231 0x8231

Recompile, reboot, and DMA shloud be OK

I am wondering: should I, or some gentoo developper, tell something to the kernel dev team, to make them consider applying this patch to the kernel? and how could I do it?

Or do they probably already know about that and are working on it?Last edited by Dilo on Mon Jul 31, 2006 1:14 pm; edited 1 time in total

----------

## Dilo

 *dispanser wrote:*   

> I have the same problem. I patched my kernel with some via patches (found here: http://forums.viaarena.com/messageview.aspx?catid=28&threadid=71754&enterthread=y), which brought my SATA drive to live. However, my DVD is still on the worst settings possible (no dma / pio, matches the speed of pencil + paper). I tried regular ide harddisk too, but no luck.
> 
> the patch removed the "DMA disabled" messages mentioned above, though. Maybe there's some other patch around to fix the dma issue, but i found none.

 

We both wrote the solution at the same time   :Smile: 

My DVD is working just fine, with DMA enabled. If you think it can help, I can post my whole kernel config.

----------

## dispanser

thank you, now I got DMA working too.

Just one more question: Is sound working for you?

----------

## Dilo

Yes, but I am using a PCI audio card, not the one integrated into the motherboard. I think I will try that one as soon as I have finished reinstalling all my system, I wil let you know.

[EDIT]

By the way, did you manage to get lm_sensors working with those chipsets?

----------

## dispanser

 *Dilo wrote:*   

> Yes, but I am using a PCI audio card, not the one integrated into the motherboard. I think I will try that one as soon as I have finished reinstalling all my system, I wil let you know.

 

Now that you mention it, i have an old pci card too. That should be easy enough to set up, and for the time being, I don't really care about the high definition sound.

 *Quote:*   

> 
> 
> By the way, did you manage to get lm_sensors working with those chipsets?

 

partly. after installing lm_sensors and running sensors-detect, i get the following output from sensors:

 *Quote:*   

> 
> 
> it8712-isa-0d00
> 
> Adapter: ISA adapter
> ...

 

has you can see, some information is useful, and some isn't. the cpu / mobo temp sound reasonable (comparing to those seen under windows), but Temp3 (whatever that is!) is a tad high. the fan rpms are way off (all of them, ok fan two doesn't exist so at least that zero is correct). Also some of the voltages seem way off (+4V instead of -5, +4 instead of -12). So far, I'm happy with the result as the major thing I need is VCore1 and the CPU Temp.

You have to follow the description when sensors-detect is executed, it will generate a few config files for you.  The following modules are needed: 

 *Quote:*   

> 
> 
> it87
> 
> hwmon_vid
> ...

 

My next project is undervolting my shiny cpu, so that it produces less heat and uses less power.

----------

## Dilo

 *dispanser wrote:*   

> 
> 
> You have to follow the description when sensors-detect is executed, it will generate a few config files for you.  The following modules are needed: 
> 
>  *Quote:*   
> ...

 

I didn't have it87 module, I am recompiling my kernel now.

I have CONFIG_I2C_ISA=m in my kernel config, buy it doesn't compile any i2c_isa module, is the name wrong?

 *dispanser wrote:*   

> 
> 
> My next project is undervolting my shiny cpu, so that it produces less heat and uses less power.
> 
> 

 

That's easy, just read

http://gentoo-wiki.com/HOWTO_PowerNow!

if the clock doesn't change, try using the ondemand governor, it worked for me.

----------

## Dilo

Great, I have recompiled my kernel, with the it87 module my sensors are working fine

thanks

----------

## dispanser

 *Dilo wrote:*   

> 
> 
> I didn't have it87 module, I am recompiling my kernel now.
> 
> I have CONFIG_I2C_ISA=m in my kernel config, buy it doesn't compile any i2c_isa module, is the name wrong?
> ...

 

this is copy / paste from the lsmod output (obviously, I removed everything but the first column).

gunzip -dc config.gz | grep ISA tells me that i have such an option, but I don't know how I activated it  :Smile: .

 *Dilo wrote:*   

> 
> 
> That's easy, just read
> 
> http://gentoo-wiki.com/HOWTO_PowerNow!
> ...

 

Hm, after reading the document, I think you misunderstood me. The Cool 'n' Quiet was working out of the box. What I want to do is to reduce the voltage of the cpu core, to further reduce the power / heat. Under Windows, reducing my vcore from 1.3V to 1.15V reduced the cpu temperature from 53C to 47C (at full cpu load), which is quite an achievement considering the fact that ambient temperature in central europe is roughly 30C at the moment, and the performance of the system is exactly the same as it was before.

----------

## Dilo

Yes, seems I misunderstood you   :Very Happy: 

----------

## Slammer64

Could you guys please post exactly which patches you used to get your systems up and running, I have been tearing my hair out trying to get this Asus M2V up and running. Any info would be greatly apprieciated.

----------

## Dilo

It's really not a patch, you have to edit in your kernel sources the files drivers/ide/pci/via82cxxx.c and include/linux/pci_ids.h and add the lines marked above with +

this line in the first file

{ "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 

and that one in the second

#define PCI_DEVICE_ID_VIA_8237A 0x3337 

of course in the right place inside the file, search for the lines I wrote before and after to find it.

Then you recompile the kernel (be sure to enable the VIA chipset in your kernel config, something like CONFIG_BLK_DEV_VIA82CXXX=y ).

Of course this will only solve a chipset related problem, if this is not the case, you should provide more details.Last edited by Dilo on Mon Jul 31, 2006 1:14 pm; edited 1 time in total

----------

## Slammer64

Ok, that sounds fair enough, but how did you get the kernel to recognize sata drives, that's the one that's really got me stumped?

----------

## Dilo

I don't know, because I don't have a sata drive. Maybe dispanser can help you with that.

----------

## Dilo

I managed to get the integrated audio card working. Seems the problem was a bug with the 2.6.16 kernel.

Just upgrade to 2.6.17, use the snd_hda_intel module and audio works fine.

----------

## schorfi

hello,

i tried the 2.6.17 (r4) kernel and was hoping for a working sata drive but it does not work :-S

i have asus M2V too ^^

dma is working with that kernel patch but i dont need dma  :Smile: ... i need my sata drivem as there is my old major linux installation and i need it but i cant even access it  :Sad: 

so everyone who has a solution for my kernel just post it here for the sata stuff

thx  :Smile: 

regards

----------

## schorfi

well, after i realized that i ignored a important fact posted in another thread https://forums.gentoo.org/viewtopic-t-478316-highlight-vt8237a.html

i tried the .16 kernel with the patches and it worked so i was abled to make linux detect the SATA drive, so i wanted to make chroot and installed the same kernel there but i am doing sth wrong as the new kernel doesnt want to start 

after bootloader asks me what to load and i select the new kernel it just shows me a blackscreen not sure if sth is running in the background (i believe it does) so i am wondering what i am doing wrong as i also tried at the end to "copy" the configuration from the old IDE HDD where i have linux running with a .16 kernel which detected the sata HDD

o_O

i am confused but at all that should work...

----------

## schorfi

got it working right now...2.6.16 is working with sata on asus m2v but not 2.6.17 (which doesnt mean it does not work at all ^^ i tried and i failed:)

so i am working on the sound and sensor stuff

i wonder why their provided linux drivers dont even support the stupid realtek ALC660 chip ^^

(i dont need that HD sound btw ^^ i just want some sound)

here i go for the sensors which prints some crazy stuff  :Smile: 

 *Quote:*   

> 
> 
> sensors   
> 
> it8712-isa-0d00
> ...

 

the fan speeds are not correct if u divide them by 2 its better ^^ so this what he displays is a sum of the fans ? (at least the sum of two)

then i have to mention that i doubt that CPU temp is that high if i trust the bios or even the temps shown on windows stuff

u might have to toggle these temps  :Smile:  ^^

the last one is disabled so ignore it it might be the highest value u can get... ^^ all bits are 1  :Smile: 

is there any chance to read out my GPU temp?

regards

schorfi

----------

## Elshar

Hrm, so the sata drives are detected under 2.6.16? Is that the gentoo-sources or the vanilla? I also have the m2v, and am trying to use sata drives on it, but haven't been able to get gentoo to see them with it.

Kind of fustrating, because my sata drives are detected in freebsd and not gentoo. While the video tuner card I have doesn't have a freebsd driver, but there IS one in gentoo. So I'm kinda sol either way.  :Sad: 

Elshar

----------

## schorfi

i did it with gentoo-sources (2.6.16-gentoo-r13)

i tried 2.6.17  with gentoo sources (firtst) too and it didnt work :-S

seems 2.6.16 was closer to vanillia-sources  :Smile: 

as the patches for 2.6.17 failed for me  :Sad: 

any approach to the sound-card problem?

i am not sure with which card i should compile also-drivers 

(i supposed hda-intel to be the correct but it has a missing symbol so i cant load the module)

*maeh* i am stupid  :Sad: 

----------

## schorfi

update: 

sound is working right now more or less looks very buggy at least it behaves in that way  :Smile: 

i cant really fix that as i determined everything empiric

not really exclusive...

i tried alsa implemented in kernel but i failed...try and error ^^

so i re-emerged alsa-driver with ALSA_CARD="hda-intel" in make.conf

then i proceed with the usual way (alsaconf ...etc)

sounds works but somehow it does not the things as expected 

i was forced to use the mic in for streaming sound from tv card...

had to modify some settings for the bmp/xmms alsa-sound driver as it had bad noises in it

etc ^^

however it works but take all my statements with caution ^^

maybe someone can change me a straigh forward way to the target as i am just lurching to it ^^ and yes, i hit many trees  :Very Happy: 

over and out

schorfi

----------

