[Bugme-new] [Bug 4511] New: No DMA alim15x3.c driver - Kernel: 2.6.11-gentoo-r5 and others

bugme-daemon at osdl.org bugme-daemon at osdl.org
Sun Apr 17 17:27:36 PDT 2005


http://bugme.osdl.org/show_bug.cgi?id=4511

           Summary: No DMA alim15x3.c driver - Kernel: 2.6.11-gentoo-r5 and
                    others
    Kernel Version: 2.6.10, 2.6.11. 2.6.12-rc2 so far
            Status: NEW
          Severity: normal
             Owner: bzolnier at elka.pw.edu.pl
         Submitter: ltrager at gmail.com


Distribution:Gentoo - I've worked with the Gentoo Kernel team by filing a bug
and also on IRC and determined that this is a kernel bug as opposed to a
specific distribution's kernel bug
Hardware Environment:

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, on both drives and both my cdrom and dvd
drives,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 - with version 3.8.1 of Knoppix I
can boot into 2.6.11 but cannot get dma to work - if I try to turn it on with
hdparm the machine just hangs with the hard drive lites lit

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.


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 at atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir at 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 at 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 at 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.



Software Environment:

Running Gentoo Linux Kernel 2.6.11-r6 problem also on linux-2.6.11-gentoo-r5
-linux-2.6.10-gentoo-r6 - linux-2.6.11-gentoo-r4 also tried vanilla sources with
2.6.11-r6 and 2.6.12-rc2 couldn't boot into 2.6.12-rc2 at all

Also tried this patch written by Bram Verweij and cleaned up by Bartlomiej
Zolnierkiewicz http://www.mail-archive.com/linux-ide@vger.kernel.org/msg00744.html

Once the patch was applied I could no longer boot into the kernel to which it
was applied.

In searching through the Gentoo 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.

Problem Description:

During boot I get dma expiry and timeout messages - booting takes an inordinate
amount of time (I know its becasue I'm waiting for the timeouts) when I finally
have booted I do not have DMA on hda although I do have it on hdb, hdc, and hdd. 

As stated above this problem is specific to the 2.6 kernels - dma works fine
when I boot with a 2.4 kernel.

Steps to reproduce:

Happens everytime I boot.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Bugme-new mailing list