Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88977 - No DMA alim15x3.c driver - Kernel: 2.6.11-gentoo-r5
Summary: No DMA alim15x3.c driver - Kernel: 2.6.11-gentoo-r5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-04-13 09:24 UTC by Lanny Trager
Modified: 2005-05-09 11:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lanny Trager 2005-04-13 09:24:28 UTC
I'm running an ASUS A7A266 motherboard with an Athlon XP1700+ CPU and the linux-2.6.11-gentoo-r5 kernel though I have had the same problem with linux-2.6.10-gentoo-r6 linux-2.6.11-gentoo-r4 kernels. hda: Maxtor 6B200P0, ATA DISK drive 200 gb.

The problem is that I cannot get DMA to work either during boot or after using hdparm. I'll place my dmesg and relevant .config lines in a moment. You will see that I do have the correct chipset selected and that it is built in, not a module. When I try hdparm it says that it has turned on dma however hdparm -t /dev/hda gives me results that are anywhere between 1/10 and 1/20 of the speed that I can attain with dma on this disk. If I run hdparm /dev/hda after running hdparm -t /dev/hda it tells me that DMA is no longer turned on.

I tried to boot Knoppix (v3.7) from the CD, it booted into the 2.4 kernel and ran DMA without a problem, however when I tried to boot into 2.6 it just hung. I could see the hard drive L.E.D.S lit up but it would not boot 2.6

I have googled this problem to death and found alot of people having this same problem on various kernels going back to 1999 but not one solution for me.

In searching through these forums I thought I had found the solution here :

http://forums.gentoo.org/viewtopic-t-301098-highlight-m5229+dma.html

"...hack drivers/ide/pci/alim15x3.c in order to bypass the checks for buggy revisions" despite the warnings about the possibility of losing my data I plowed ahead with the suggested hack. It didn't work, so I commented out the entire section, still no luck.

Here's the relevant line from lspci

Relevant line from lspci:

0000:00:04.0 IDE interface: ALi Corporation M5229 IDE (rev c4)


The output of hdparm -I /dev/hda


  hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
        Model Number:       Maxtor 6B200P0
        Serial Number:      B40WJMYH
        Firmware Revision:  BAH41B70
Standards:
        Supported: 7 6 5 4
        Likely used: 7
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:  398297088
        device size with M = 1024*1024:      194481 MBytes
        device size with M = 1000*1000:      203928 MBytes (203 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 (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
           *    48-bit Address 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
        not     frozen
        not     expired: security count
        not     supported: enhanced erase
HW reset results:
        CBLID- above Vih
        Device num = 0 determined by the jumper
Checksum: correct



The relevant lines form my .config file:

Code:
CONFIG_GENERIC_ISA_DMA=y

# IDE chipset support/bugfixes
#
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_ALI15X3=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y


Probably more of my dmesg than you need:
(Better Safe Than Sorry)
Code:

PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using ALI IRQ Router
PCI: Using IRQ router ALI [10b9/1533] at 0000:00:07.0
Machine check exception polling timer started.
highmem bounce pool size: 64 pages
inotify device minor=63
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Initializing Cryptographic API
Limiting direct PCI/PCI transfers.
Activating ISA DMA hang workarounds.
lp: driver loaded but no devices found
Linux agpgart interface v0.100 (c) Dave Jones
[drm] Initialized drm 1.0.0 20040925
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
input: ImPS/2 Generic Wheel Mouse on isa0060/serio1
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected
lp0: using parport0 (polling).
io scheduler noop registered
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ALI15X3: IDE controller at PCI slot 0000:00:04.0
ALI15X3: chipset revision 196
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xd400-0xd407, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xd408-0xd40f, BIOS settings: hdc:DMA, hdd:DMA
Probing IDE interface ide0...
hda: Maxtor 6B200P0, ATA DISK drive
hdb: WDC WD1000BB-32CCB0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: DVD-ROM DDU1621, ATAPI CD/DVD-ROM drive
hdd: SONY CD-RW CRX175A1, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: cannot use LBA48 DMA - PIO mode will be used for accessing sectors > 268435456
hda: 398297088 sectors (203928 MB) w/8192KiB Cache, CHS=24792/255/63, UDMA(100)
hda: cache flushes supported
 /dev/ide/host0/bus0/target0/lun0:<4>hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

ide: failed opcode was: unknown
 p1 p2 p3
hdb: max request size: 128KiB
hdb: 195371568 sectors (100030 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
hdb: cache flushes not supported
 /dev/ide/host0/bus0/target1/lun0: p1
hdc: ATAPI 40X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdd: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
ide-floppy driver 0.99.newide
libata version 1.10 loaded.
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.8 (Thu Jan 13 09:39:32 2005 UTC).
ALSA device list:
  No soundcards found.
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP established hash table entries: 262144 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
ip_conntrack version 2.1 (8191 buckets, 65528 max) - 212 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
NET: Registered protocol family 1
NET: Registered protocol family 17
hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

ide: failed opcode was: unknown
hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

ide: failed opcode was: unknown
hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

ide: failed opcode was: unknown
ReiserFS: hda3: found reiserfs format "3.6" with standard journal
ReiserFS: hda3: using ordered data mode
ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda3: checking transaction log (hda3)
ReiserFS: hda3: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 160k freed
Adding 1004052k swap on /dev/hda2.  Priority:-1 extents:1
ReiserFS: hda1: found reiserfs format "3.6" with standard journal
ReiserFS: hda1: using ordered data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda1: checking transaction log (hda1)
ReiserFS: hda1: Using r5 hash to sort names
agpgart: Detected ALi M1647 chipset
agpgart: Maximum main memory to use for agp memory: 941M
agpgart: AGP aperture is 128M @ 0xf0000000
PCI: Found IRQ 10 for device 0000:00:0a.0
ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>
PCI: Found IRQ 5 for device 0000:00:0a.2
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[5]  MMIO=[e3800000-e38007ff]  Max Packet=[2048]
PCI: Found IRQ 9 for device 0000:00:0d.0
PCI: Sharing IRQ 9 with 0000:00:05.0
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
0000:00:0d.0: 3Com PCI 3c905C Tornado at 0xa800. Vers LK1.1.19
PCI: Found IRQ 9 for device 0000:00:0d.0
PCI: Sharing IRQ 9 with 0000:00:05.0
nvidia: module license 'NVIDIA' taints kernel.
PCI: Found IRQ 11 for device 0000:01:00.0
NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-7174  Tue Mar 22 06:44:39 PST 2005
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023c0020003e34]
spurious 8259A interrupt: IRQ7.
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
Losing too many ticks!
TSC cannot be used as a timesource. 
Possible reasons for this are:
  You're running with Speedstep,
  You don't have DMA enabled for your hard disk (see hdparm),
  Incorrect TSC synchronization on an SMP system (see dmesg).
Falling back to a sane timesource now.


I think that I have been pretty thorough and tried everything but have not had any success. Any help would be greatly appreciated.


Reproducible: Always
Steps to Reproduce:
This happens everytime that I boot with the settup described above
Actual Results:  
Several DMA expiry messages during boot
No DMA after boot even when trying to set it with hdparm
hdparm will say it is set after turning it on with hdparm -d1 /dev/hda but after
running hdparm -t /dev.hda and then running hdparm /dev/hda it tells me that dma
is off

Expected Results:  
Faster boot time becasue I don't get timeout messages
DMA to be working after I have booted
hdparm to be able to turn dma on

I think that I have been thorough but am open to the fact that I may have left
out something crucial and of course would be happy to provide any information
that would help to solve this problem.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2005-04-14 10:11:30 UTC
Please test 2.6.12-rc2
Comment 2 Lanny Trager 2005-04-15 18:01:11 UTC
I tried the 2.6.12-rc2 vanilla-sources and I can't even get them to boot - They give me a can't mount root error - I don't remember the exact error.
Comment 3 Lanny Trager 2005-04-17 15:35:46 UTC
I tried applying this patch to ide-disk.c - http://www.mail-archive.com/linux-ide@vger.kernel.org/msg00744.html

If you go back one message in the thread to: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg00704.html

The guy seems to be having the same problem as me.  After applying the patch on the 2.6.11-gentoo-r6 I could no longer boot into that kernel.  It was worth a try though.
Comment 4 Lanny Trager 2005-04-26 17:20:31 UTC
S O L V E D

The patch that I applied and reported below was supposed to be an improved version of this patch:  http://www.mail-archive.com/linux-ide@vger.kernel.org/msg00704.html

I am not sure why but the imporved one didn't work for me however after receiving a response to a forum posting that suggested teh original as opposed to the imporved patch I tried the original and it worked.  I now have DMA.  Can this be included in futre versions of the Gentoo-Sources?

Thanks fo your help
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2005-04-28 10:12:12 UTC
Thats strange, as I think the patches should be functionally identical. Could you please try vanilla-sources-2.6.12_rc3 without patching it at all. If the issue is definately definately still there or you can't boot at all then I'll get in contact with the IDE maintainer.
Comment 6 Lanny Trager 2005-05-02 12:04:07 UTC
I have applied the cleaned up version of the patch to 2.6.11-gentoo-r7 and it worked.  The only difference that I can find is that the original when run gives an error message that a line unexpectedly ended.  The cleaned up version has no error messages, it just works.

I can only guess that when I ran this patch originally I did something wrong - I have no idea though what that mistake was though.

I will try the vanilla-sources-2.6.12_rc3 this week for sure and report back.

Thanks,

Lanny
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2005-05-09 10:08:53 UTC
Included in gentoo-sources-2.6.11-r8
Comment 8 Lanny Trager 2005-05-09 11:22:45 UTC
Daniel,

Thank you very much.  I appreciate your efforts.  Its because of guys like you that I moved to Gentoo.

Lanny