LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-22-2003, 10:51 AM   #1
valroth
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.2
Posts: 8

Rep: Reputation: 0
enabling DMA on VIA motherboard


I'm having a problem with DMA modes on my hard disk and after having searched google, newsgroups, and forms for the last 12 hours I've decided to post my problem here. My initial problem was that my system would boot very slowly while timing out on DMA modes(dmesg is listed below). I have found that I can turn this off with an append line of ide=nodma in my bootloader.

However, despite the faster bootup times this really kills the performance of my hard drive. The drive in question is a Maxtor 7200RPM 80GB ATA133. My mainboard is a KT333 with builtin ATA133 IDE controller. Below is an hdparm test regardless of whether I disable DMA on bootup.

hdparm -tT /dev/hdc
Timing buffer-cache reads: 1240 MB in 2.00 seconds = 620.00 MB/sec
Timing buffered disk reads: 22 MB in 3.13 seconds = 7.03 MB/sec

I ran hdparm on an old K6 233 that I've got lying around with a 5200RPM 8GB hd and I got 32MB in 3.02 seconds = 10.60 MB/sec on that (It's on mdma2)

I have a second identical Maxtor drive on hdd (I used to have the two in a RAID array). That disk is going to be for my dual boot into windows, at the moment, its just a plain formatted NTFS4 drive. That drive is currently using udma6 (ATA133) and I get speeds of 120 MB in 3.02 seconds = 39.74 MB/sec so over four times as fast.

I tried noautotune, and idebus=100 options for kernel params and no luck there.

I found a good article about using hdparm to change settings once you've booted up at linuxnetmag and followed some of their instructions but I'm still having issues. Per their advice I used tail to keep track of /var/log/messages while changing DMA modes.

To change to udma6 I ran
hdparm -d1 -X72 -i -v -t /dev/hda

This came back with a speed of 20 MB in 3.18 seconds = 6.29 MB/sec, even slower than before. So I checked the messages on my other console and found that it gave me the same errors as I was experiencing at Startup.

Nov 22 09:20:30 hawkwing kernel: hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
Nov 22 09:20:30 hawkwing kernel: hdc: drive_cmd: error=0x04 { DriveStatusError }
Nov 22 09:20:50 hawkwing kernel: hdc: dma_timer_expiry: dma status == 0x61
Nov 22 09:21:00 hawkwing kernel: hdc: error waiting for DMA
Nov 22 09:21:00 hawkwing kernel: hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }

So here are my final questions:
1) Can I/How can I setup this drive to work at udma6? I get the same error when trying dma2!
2) If I specify ide=nodma as part of my boot options won't that affect my cd-r and dvd drives as well? hdparm shows they are using dma.
3) Could this be a problem with my drive? I was using both in a striped windows array with no problems. I just changed this box over to linux earlier this week?




======dmesg======

IDE controller at PCI slot 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8233a (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:DMA
hda: PLEXTOR CD-R PX-W4012A, ATAPI CD/DVD-ROM drive
hdb: IDE DVD-ROM 16X, ATAPI CD/DVD-ROM drive
hdc: MAXTOR 6L080L4, ATA DISK drive
hdd: MAXTOR 6L080L4, ATA DISK drive
blk: queue c0181174, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c01812b0, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: 156355584 sectors (80054 MB) w/1819KiB Cache, CHS=155114/16/63, UDMA(133)
hdd: attached ide-disk driver.
hdd: host protected area => 1
hdd: 156355584 sectors (80054 MB) w/1819KiB Cache, CHS=155114/16/63, UDMA(133)
Partition check:
/dev/ide/host0/bus1/target0/lun0:<4>hdc: dma_timer_expiry: dma status == 0x61
hdc: error waiting for DMA
hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }

blk: queue c0181174, I/O limit 4095Mb (mask 0xffffffff)
hdc: dma_timer_expiry: dma status == 0x61
hdc: error waiting for DMA
hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }

hdc: dma_timer_expiry: dma status == 0x61
hdc: error waiting for DMA
hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }

p1 p2 <<4>hdc: dma_timer_expiry: dma status == 0x61
hdc: error waiting for DMA
hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }



======hdparm -v -i /dev/hdc======

multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 155114/16/63, sectors = 156355584, start = 0

Model=MAXTOR 6L080L4, FwRev=A93.0500, SerialNo=664213752682
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=32256, SectSize=21298, ECCbytes=4
BuffType=DualPortCache, BuffSize=1819kB, MaxMultSect=16, MultSect=16
CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=156355584
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
AdvancedPM=no WriteCache=enabled
Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1:
* signifies the current active mode


(Note: The windows drive shows using_dma = 1 and udma modes 3 through 6 with 6 selected)

System is running Mandrake 9.2 kernel 2.4.22-10
AMD XP2200+, KT333, 512MB DDR333, 2x 80GB 7200rpm ATA133. (so far it ran a lot faster in windows :( I hope to remedy this soon)

Edit:
Forgot lspci (doh), here's the relevant lines:

00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)

Last edited by valroth; 11-23-2003 at 05:32 AM.
 
Old 11-22-2003, 12:16 PM   #2
valroth
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.2
Posts: 8

Original Poster
Rep: Reputation: 0
Okay, looks like the problem is in my IDE controller, I didn't think so at first due to the other drive showing up alright. More searching shows this should be resolve by adding the Alan Cox patches and possibly a patch by Vojtech Pavlik if that's not already in the -ac patches. Now I just have to figure out how to do that.
 
Old 11-22-2003, 02:20 PM   #3
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The idebus is 33 for your type of hardware.

I never see
blk: queue c0181174, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c01812b0, I/O limit 4095Mb (mask 0xffffffff)
in my dmesg logs. This could be new in kernel version 2.4.22 .

Your version of Mandrake could be corrupted during downloading and burning the image on a CD.

Try another cable because putting kinks in the cable decreases high frequency transmission. Use round cable with shielding if you can. This could be 90% of your problem.

You need to download the kernel from kernel.org to apply the patches because you can not use your Mandrake kernel. justlinux.com has a good howto for patching and compiling kernels.
 
Old 11-24-2003, 01:43 AM   #4
valroth
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.2
Posts: 8

Original Poster
Rep: Reputation: 0
So I've done some more research and tried quite a few things but am still having problems.

First the quick stuff:
I swapped cables just in case, this was a good round shielded "ATA133" cable. no dice
I updated my BIOS, tried every possible option. no dice

So I downloaded the latest stable kernel, 2.4.22 from kernels.org and applied the correct -ac patch, 2.4.22-ac4 to the kernel and rebuilt per instructions I could find on justlinux (thanks for the advice). I am still having this problem and believe I may have done something wrong in building the kernel.

When I rebuilt, I used the make .oldconfig option and wonder if this may have been part of the problem. I wasn't prompted for any options that seemed related to my IDE controller. Could the needed driver not have been included because of this? Also after rebooting with the new kernel I had some hardware/software that wasn't working correctly. I figured I'd have to add my audio and nvidia drivers again but it seems like I may have really messed up my configuration with the new kernel. This was my first time building a kernel and while all the steps went fine, I didn't quite get what I wanted.

I decided to check and see what was different from the kernel I downloaded and the src that mandrake provided, there were two man differences.
First, there was no object file for my driver in the mandrake source, I assume this is because I just never compiled mandrake's source.

/usr/src/linux-2.4.22-10mdk/drivers/ide/pci/via82cxxx.o <--Non existant

I did a diff on the via82cxxx.c files and got this:

diff via82cxxx.c /usr/src/linux-2.4.22-10mdk/drivers/ide/pci/via82cxxx.c
136a137,139
> #ifdef CONFIG_BOOT_KERNEL
> return 0;
> #else
274a278
> #endif
670,671d673
< MODULE_DEVICE_TABLE(pci, via_pci_tbl);

Any good advice on how to figure out the config options before building the kernel? Can/should I use the mandrake provided source or is that a stupid thing to do?
I'd like to get this thing patched and working without having to re-setup everything else on my box
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling DMA - tried everything? imranakbar Linux - Hardware 2 01-18-2005 02:49 AM
Enabling DMA DeadlyMuffin Slackware 4 07-19-2004 09:24 PM
Maxtor 80 GB Won't Use DMA kojima Linux - Hardware 3 03-16-2004 12:57 PM
dma timeout expiry - slack 9.1, via vt8235 on abit kd7, maxtor udma skarim Linux - Hardware 1 10-11-2003 10:34 AM
Enabling DMA bizzikid Linux - Newbie 4 08-06-2003 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration