DMA and UDMA issues with intrepid

Bug #292142 reported by John Talbot
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned
Nominated for Karmic by Steve Murphy

Bug Description

DMA is disabled on Intrepid

Managed to turn it on using the following...

edit /etc/initramfs-tools/modules and add to the end of this file
pata_ali atapi_dma=1

Then, update the initramfs

sudo update-initramfs -u

Then reseting machine

But now the UDMA is set wrong...

sudo dmesg | grep ata

[ 2.138584] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00 irq 14
[ 2.138588] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xff08 irq 15
[ 2.301768] ata1.00: ATAPI: PIONEER DVD-RW DVR-110D, 1.17, max UDMA/66
[ 2.317734] ata1.00: configured for UDMA/66
[ 3.060704] ata3: SATA max UDMA/133 abar m1024@0xdbfef400 port 0xdbfef500 irq 21
[ 3.060708] ata4: SATA max UDMA/133 abar m1024@0xdbfef400 port 0xdbfef580 irq 21
[ 3.060711] ata5: SATA max UDMA/133 abar m1024@0xdbfef400 port 0xdbfef600 irq 21
[ 3.060715] ata6: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 21
[ 3.416582] ata3: SATA link down (SStatus 0 SControl 300)
[ 3.748026] ata4: SATA link down (SStatus 0 SControl 300)
[ 4.084028] ata5: SATA link down (SStatus 0 SControl 300)
[ 4.988022] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4.992888] ata6.00: ATA-7: SAMSUNG HD160JJ/P, ZM100-38, max UDMA7
[ 4.992892] ata6.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 31/32)
[ 4.997808] ata6.00: configured for UDMA/133

Beyond this I'm not sure what to do??

Thanks
John

Revision history for this message
Dokan (dokan) wrote :

i'm having the same nasty issue, which must be chipset related.
(my mb is a k8 combo-z, using uli(ali) m1689 chip :: http://www.asrock.com/mb/overview.asp?Model=K8%20Combo-Z&s=939)

since intrepid beta (and now using the final release) i tried pretty much everything i read here and there, but no luck so far..btw this regression comes from the newest linux kernels - not only ubuntu intrepid users are having this problem.

i hope a workaround will be found or that a new kernel will fix this embarassing issue!

cheers =)

Revision history for this message
John Talbot (jwtalbot) wrote :
Download full text (4.7 KiB)

Also getting the same problem on my laptop...

sudo dmesg | grep ata

[ 0.000000] BIOS-e820: 000000003f7d0000 - 000000003f7de000 (ACPI data)
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] PERCPU: Allocating 41628 bytes of per cpu data
[ 0.004000] Memory: 1016552k/1040192k available (2572k kernel code, 22940k reserved, 1160k data, 424k init, 122688k highmem)
[ 0.004000] .data : 0xc03832aa - 0xc04a5680 (1160 kB)
[ 0.567314] ACPI: EC: GPE = 0x1d, I/O: command/status = 0x66, data = 0x62
[ 2.005137] Write protecting the kernel read-only data: 936k
[ 3.527615] libata version 3.00 loaded.
[ 4.070269] pata_acpi 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 4.070306] pata_acpi 0000:00:1f.2: setting latency timer to 64
[ 4.070323] pata_acpi 0000:00:1f.2: PCI INT B disabled
[ 4.082955] ata_piix 0000:00:1f.2: version 2.12
[ 4.082971] ata_piix 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 4.082977] ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
[ 4.083026] ata_piix 0000:00:1f.2: setting latency timer to 64
[ 4.083737] scsi0 : ata_piix
[ 4.083885] scsi1 : ata_piix
[ 4.086264] ata1: SATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14
[ 4.086269] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
[ 4.248415] ata1.00: ATA-7: FUJITSU MHV2060BH PL, 00000029, max UDMA/100
[ 4.248421] ata1.00: 117210240 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 4.264409] ata1.00: configured for UDMA/100
[ 4.444392] ata2.00: ATAPI: TSSTcorpCD/DVDW TS-L632D, TIR0, max UDMA/33
[ 4.476307] ata2.00: configured for UDMA/33
[ 4.989627] EXT3-fs: mounted filesystem with ordered data mode.
[ 20.055083] EXT3-fs: mounted filesystem with ordered data mode.
[ 119.988059] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 119.988077] ata2.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 119.988086] ata2.00: status: { DRDY }
[ 125.028044] ata2: link is slow to respond, please be patient (ready=0)
[ 130.020029] ata2: device not ready (errno=-16), forcing hardreset
[ 130.020045] ata2: soft resetting link
[ 130.232355] ata2.00: configured for UDMA/33
[ 130.232383] ata2: EH complete
[ 268.908069] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 268.908088] ata2.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 268.908097] ata2.00: status: { DRDY }
[ 273.948028] ata2: link is slow to respond, please be patient (ready=0)
[ 278.932029] ata2: device not ready (errno=-16), forcing hardreset
[ 278.932045] ata2: soft resetting link
[ 279.144338] ata2.00: configured for UDMA/33
[ 279.144361] ata2: EH complete
[ 552.932174] ata2.00: qc timeout (cmd 0xa0)
[ 552.932195] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 552.932207] ata2.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 552.932216] ata2.00: status: { DRDY ERR }
[ 557.972030] ata2: link is slow to respond, please be patient (ready=0)
[ 562.956030] ata2: device not ready (errno=-16), forcing hardreset
[ 562.956048] ata2: soft resetting link
[ 563.168327] ata2.00: configured for UDMA/3...

Read more...

Revision history for this message
Montblanc (montblanc) wrote :

I can confirm this with Ali chipset. Drive speed is set to a quarter, my CPU suffers while burning a dvd or while copying files to an ATAPI hard drive and this makes my system HANG; the little workaround sets drive speed to half, but it works just for a while, it still hangs if I try to burn another dvd. I can't flip back from /dev/scd0 to /dev/hda, cause alim15x3.ko module is missing. If you look at the related bug report https://bugs.launchpad.net/ubuntu/+source/linux/+bug/213639 you'll see someone has compiled modules from 2.6.24-12 kernel (which cannot be found anymore) against intrepid kernels, but just for AMD and Via chipsets. I tried to build alim15x3 module from alim15x3.c I took from the latest kernel source, but it couldn't build any modules (MODPOST 0 modules). I just want my drives to work as expected, I'm not asking that much. It's too early to switch to libata, in my opinion. Some hardware still requires DMA.

Revision history for this message
Carl Englund (englundc) wrote :

I can confirm having this problem with two computers with the Asrock 939Dual-SATA2 motherboard. (http://www.asrock.com/mb/overview.asp?Model=939Dual-SATA2). The motherboard has the ULi 1695 chipset.

CD-burning _seems_ to work at first but at the end of the burning process I am informed that my system is too slow and the burn has failed.

Getting this in dmesg:

[ 21.132344] ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-4167B, DL13, max UDMA/33
[ 21.132356] ata4.00: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 21.132359] ata4.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
[ 21.148270] ata4.00: configured for UDMA/33

Upgrading the firware on the burner didn't help.

Revision history for this message
mcyzyk (mcyzyk) wrote :

Likewise here. My DVD drive is bascially unusable. dmesg here:

ubuntu@ubuntu-laptop:~$ dmesg | grep ata
[ 0.000000] BIOS-e820: 0000000017ff0000 - 0000000017fff000 (ACPI data)
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] PERCPU: Allocating 41628 bytes of per cpu data
[ 0.004000] Memory: 375688k/393152k available (2576k kernel code, 16832k reserved, 1165k data, 424k init, 0k highmem)
[ 0.004000] .data : 0xc03840da - 0xc04a7680 (1165 kB)
[ 0.882854] ACPI: EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62
[ 3.511665] Write protecting the kernel read-only data: 940k
[ 7.243356] libata version 3.00 loaded.
[ 7.332545] pata_acpi 0000:00:0f.0: can't derive routing for PCI INT A
[ 7.332749] pata_acpi 0000:00:0f.0: can't derive routing for PCI INT A
[ 7.351820] pata_ali 0000:00:0f.0: can't derive routing for PCI INT A
[ 7.353586] scsi0 : pata_ali
[ 7.354183] scsi1 : pata_ali
[ 7.354290] ata1: PATA max UDMA/66 cmd 0x1f0 ctl 0x3f6 bmdma 0x1000 irq 14
[ 7.354299] ata2: PATA max UDMA/66 cmd 0x170 ctl 0x376 bmdma 0x1008 irq 15
[ 8.132789] ata1.00: ATA-5: IBM-DJSA-220, JS4OAC3A, max UDMA/66
[ 8.132804] ata1.00: 39070080 sectors, multi 16: LBA
[ 8.148734] ata1.00: configured for UDMA/66
[ 8.328636] ata2.00: ATAPI: TOSHIBA DVD-ROM SD-C2502, 1011, max UDMA/33
[ 8.328677] ata2.00: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 8.328685] ata2.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
[ 8.328699] ata2.00: simplex DMA is claimed by other device, disabling DMA
[ 8.344604] ata2.00: configured for PIO4
[ 11.118232] EXT3-fs: mounted filesystem with ordered data mode.
ubuntu@ubuntu-laptop:~$

Revision history for this message
Dokan (dokan) wrote :

some very pointless post, just to say that i gave up and replaced my motherboard. after having searched as well as i could i found that this one should be 100% working:
http://www.asrock.com/mb/overview.asp?Model=ConRoe1333-DVI/H%20R2.0
very cheap, and indeed working nicely with intrepid.
sorry for this off-topic post. this issue is kernel related, not ubuntu specific - hopefully some new kernel will fix this regression with some chipsets, although i'm too confident anymore. "ATAPI DMA disabled for reliablity issues" -- i don't get it, it was just fine with hardy!
cheers!

Revision history for this message
Montblanc (montblanc) wrote : Re: [Bug 292142] Re: DMA and UDMA issues with intrepid

I perfectly agree with you, Dokan... unfortunately I can't change my
motherboard and I'm still unhappy of the only workaround I found
(adding "pata_ali atapi_dma=1" to "/etc/initramfs-tools/modules")... I
really hope new kernels will fix this.

2009/2/13 Dokan <email address hidden>:
> some very pointless post, just to say that i gave up and replaced my motherboard. after having searched as well as i could i found that this one should be 100% working:
> http://www.asrock.com/mb/overview.asp?Model=ConRoe1333-DVI/H%20R2.0
> very cheap, and indeed working nicely with intrepid.
> sorry for this off-topic post. this issue is kernel related, not ubuntu specific - hopefully some new kernel will fix this regression with some chipsets, although i'm too confident anymore. "ATAPI DMA disabled for reliablity issues" -- i don't get it, it was just fine with hardy!
> cheers!
>
> --
> DMA and UDMA issues with intrepid
> https://bugs.launchpad.net/bugs/292142
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Dokan (dokan) wrote :

to TotoKid: actually with my ex k8 combo-z the issues i was having were a little bit different of yours. 1. no problem with one of my hdd which is atapi - i remember my cpu was also suffering while copying files on/from it, but this did happen with intrepid alpha, not anymore with the stable release actually. so my only problem was dvd related. 2. with the workaround you found (i tried all of the known ones btw) my dvd drive always had access denied or something like that, so this trick was completely useless for me. and without using any workaround my drive was so slow (which is of course normal with dma mode off), and also most of my attempts to burn a full disc turned into failures. our issues are a little bit different, just a little, and the causes are most likely the same, aka linux (newest) kernel related. since it doesn't seem like there is some way to fix this bug and i really dislike some other os and the way it works i bought a new mb. i really hope for you that some kernel update will FINALLY fix that issue!! well there must be a way to fix it by ourself, but it doesn't seems that easy (especially for me ;) cheers mate!

Revision history for this message
cabernet54 (alessandro-martorana3) wrote :

I have solved this problem in Intrepid (but not in Jaunty) with added in terminal:

modprobe pata_ali atapi_dma=1

How you can see in the last topic here:

http://forum.ubuntu-it.org/index.php/topic,266040.0.html

^_^

Revision history for this message
John Talbot (jwtalbot) wrote :

Tried...

modprobe pata_ali atapi_dma=1

but still no change! :(

Revision history for this message
Montblanc (montblanc) wrote :

I've set this long ago, it just doesn't freeze but it's slow as before.

2009/3/5 Baron Flopsy, the Candy king <email address hidden>:
> Tried...
>
> modprobe pata_ali atapi_dma=1
>
> but still no change! :(
>
> --
> DMA and UDMA issues with intrepid
> https://bugs.launchpad.net/bugs/292142
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Dimitris Kalamaras (dimitris-kalamaras) wrote :

I am adding my success story here, in case it helps somebody...

I had the same speed problems with my 2 x ATAPI LG DVD Drives on Ubuntu Jaunty development. My mainboard is an ASUS A8R32-MVP Deluxe with the ULi M1575 Southbridge.

I mean dvd writing was extremely slow and I couldn't get a decent DVD movie playback (too many lags).

Here is the dmesg message I was getting:
 [ 7.684439] ata8.01: ATAPI: HL-DT-ST DVDRAM GSA-4167B, DL10, max UDMA/33
[ 7.684457] ata8.01: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 7.684459] ata8.01: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.

I followed these workarounds:
Added
1) "options pata_ali atapi_dma=1" in /etc/modprobe.d/options (new file for me!)
2) "echo 1 > /sys/module/pata_ali/parameters/atapi_dma" in /etc/rc.local

and finally I added
 "pata_ali atapi_dma=1" to "/etc/initramfs-tools/modules"

All these to be sure! :)

After the reboot (the dmesg messages still appear!) the problem was finally solved.
Now I can watch and write DVDs at full speed.

Is there a Jaunty specific bug for this?

Revision history for this message
cabernet54 (alessandro-martorana3) wrote :

Thanks Dimitris, I solved too, and same to You I still have

alex@alex-desktop:~$ dmesg | grep ata
........................................................................
[ 3.632348] ata4.00: ATAPI: _NEC DVD_RW ND-3520AW, 2.U5, max UDMA/33
[ 3.632363] ata4.00: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 3.632365] ata4.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
[ 3.632374] ata4.01: ATAPI: HL-DT-STDVD-RAM GSA-H55N, 1.04, max UDMA/66
[ 3.632388] ata4.01: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 3.632390] ata4.01: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
......................................................................

but now I can burn CD and DVD at full sped in Jaunty ^_^

Revision history for this message
Montblanc (montblanc) wrote :

@cabernet54: I'm glad you finally got it working! :) I saw you haven't
enabled DMA, while I did. I tried this workaround very long time ago
and I still can't burn cds at full speed, but my system doesn't hang
anymore, at least. If you tell me you're really burning at MAX speed,
I'm going to disable it. I've got a NEC ND4550A 1.09. Look how's my
dmesg |grep ata1:

[ 1.822497] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00 irq 14
[ 1.984748] ata1.00: ATAPI: _NEC DVD_RW ND-4550A, 1.09, max UDMA/33
[ 2.000578] ata1.00: configured for UDMA/33

Greetings,
Montblanc

2009/4/14 cabernet54 <email address hidden>:
> Thanks Dimitris, I solved too, and same to You I still have
>
> alex@alex-desktop:~$ dmesg | grep ata
> ........................................................................
> [    3.632348] ata4.00: ATAPI: _NEC DVD_RW ND-3520AW, 2.U5, max UDMA/33
> [    3.632363] ata4.00: WARNING: ATAPI DMA disabled for reliablity issues.  It can be enabled
> [    3.632365] ata4.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
> [    3.632374] ata4.01: ATAPI: HL-DT-STDVD-RAM GSA-H55N, 1.04, max UDMA/66
> [    3.632388] ata4.01: WARNING: ATAPI DMA disabled for reliablity issues.  It can be enabled
> [    3.632390] ata4.01: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
> ......................................................................
>
> but now I can burn CD and DVD at full sped in Jaunty ^_^
>
> --
> DMA and UDMA issues with intrepid
> https://bugs.launchpad.net/bugs/292142
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Vanessa Dannenberg (vanessadannenberg) wrote :

Using a Gigabyte K8U-939 board (which uses an ALI/ULI chipset) with a Memorex 530L burner here. My drive refused to do better than 2.1x while burning normal single-layer DVD-R media, despite the media being capable of 16x and the drive being capable of 20x. Similarly to others, playing pressed DVD's was jerky as well - the system wasn't too pleased with the idea.

The system in question steadfastly refused to let me change /sys/module/pata_ali/parameters/atapi_dma - it kept telling me 'permission denied', despite me being root.

I added " pata_ali.atapi_dma=1" to the end of the appropriate 'kernel' line in my /boot/grub/menu.lst and rebooted, and now the problem seems to be solved. To test, I burned a 4.2GB ISO. K3B set it to 16x mode, and started out at about 6.9x. By the end of the disk, it was cooking along at 15.7x. The buffers were nearly full the entire time, compared to nearly empty when it only managed 2.1x.

This is consistent with this drive's performance under Hardy, so the kernel parameter fixed the DMA issue for me. As for the purported "reliability issues", I can't say one way or another after only one test, but it never gave me any issues under Hardy, and this particular burn (and subsequent read-back) went fine.

Revision history for this message
Steve Murphy (stevemurphy) wrote :

This issue still occurs on Karmic alpha 2 on a hp pavilion ze4365us laptop

[ 1.368370] ata2.00: ATAPI: TOSHIBA DVD-ROM SD-R2312, 1905, max MWDMA2
[ 1.368396] ata2.00: WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled
[ 1.368400] ata2.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
[ 1.384278] ata2.00: configured for MWDMA2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.