IDE/PIIX: Trouble with DMA - OOPS without

From: Lorenzo Marcantonio (lomarcan@tin.it)
Date: Mon Apr 24 2000 - 14:11:50 EST


My Toshiba laptop STILL has problems with his hdd. I can't get it
working - with or without DMA. I've already detailed the situations a
few weeks ago but I'll repeat here:

Trying with the latest - 2.3.99-pre6-5, no modules built

At bootup (starting in single user mode):

Apr 24 19:51:06 (none) syslogd 1.3-3#31: restart.
Apr 24 19:51:06 (none) kernel: klogd 1.3-3#31, log source = /proc/kmsg started.
Apr 24 19:51:06 (none) kernel: Inspecting /boot/System.map
Apr 24 19:51:06 (none) kernel: Loaded 12435 symbols from /boot/System.map.
Apr 24 19:51:06 (none) kernel: Symbols match kernel version 2.3.99.
Apr 24 19:51:06 (none) kernel: No module symbols loaded.
Apr 24 19:51:06 (none) kernel: Linux version 2.3.99-pre6 (root@daisy) (gcc version 2.95.2 19991024 (release)) #1 Mon Apr 24 18:12:34 CEST 2000
Apr 24 19:51:06 (none) kernel: e820: 0009fc00 @ 00000000 (usable)
Apr 24 19:51:06 (none) kernel: e820: 00000400 @ 0009fc00 (reserved)
Apr 24 19:51:06 (none) kernel: e820: 00004000 @ 000e8000 (usable)
Apr 24 19:51:06 (none) kernel: e820: 00010000 @ 000f0000 (reserved)
Apr 24 19:51:06 (none) kernel: e820: 03ee0000 @ 00100000 (usable)
Apr 24 19:51:06 (none) kernel: e820: 00010000 @ 03fe0000 (ACPI data)
Apr 24 19:51:06 (none) kernel: e820: 00010000 @ 03ff0000 (reserved)
Apr 24 19:51:06 (none) kernel: e820: 00016e00 @ 100a0000 (reserved)
Apr 24 19:51:06 (none) kernel: e820: 00000200 @ 100b6e00 (ACPI NVS)
Apr 24 19:51:06 (none) kernel: e820: 00049000 @ 100b7000 (reserved)
Apr 24 19:51:06 (none) kernel: e820: 00080000 @ fff80000 (reserved)
Apr 24 19:51:06 (none) kernel: Scan SMP from c0000000 for 1024 bytes.
Apr 24 19:51:06 (none) kernel: Scan SMP from c009fc00 for 1024 bytes.
Apr 24 19:51:06 (none) kernel: Scan SMP from c00f0000 for 65536 bytes.
Apr 24 19:51:06 (none) kernel: Scan SMP from c009fc00 for 4096 bytes.
Apr 24 19:51:06 (none) kernel: On node 0 totalpages: 16352
Apr 24 19:51:06 (none) kernel: zone(0): 4096 pages.
Apr 24 19:51:06 (none) kernel: zone(1): 12256 pages.
Apr 24 19:51:06 (none) kernel: zone(2): 0 pages.
Apr 24 19:51:06 (none) kernel: mapped APIC to ffffe000 (01121000)
Apr 24 19:51:06 (none) kernel: Initializing CPU#0
Apr 24 19:51:06 (none) kernel: Detected 463557047 Hz processor.
Apr 24 19:51:06 (none) kernel: Console: colour dummy device 80x25
Apr 24 19:51:06 (none) kernel: Calibrating delay loop... 924.06 BogoMIPS
Apr 24 19:51:06 (none) kernel: Memory: 62156k/65408k available (984k kernel code, 2880k reserved, 83k data, 188k init, 0k highmem)
Apr 24 19:51:06 (none) kernel: Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Apr 24 19:51:06 (none) kernel: Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
Apr 24 19:51:06 (none) kernel: CPU: Intel Celeron (Mendocino) stepping 0a
Apr 24 19:51:06 (none) kernel: Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Apr 24 19:51:06 (none) kernel: Checking 'hlt' instruction... OK.
Apr 24 19:51:06 (none) kernel: POSIX conformance testing by UNIFIX
Apr 24 19:51:06 (none) kernel: mtrr: v1.36 (20000221) Richard Gooch (rgooch@atnf.csiro.au)
Apr 24 19:51:06 (none) kernel: PCI: Using configuration type 1
Apr 24 19:51:06 (none) kernel: PCI: Probing PCI hardware
Apr 24 19:51:06 (none) kernel: PCI: Using IRQ router PIIX [8086/122e] at 00:05.0
Apr 24 19:51:06 (none) kernel: Limiting direct PCI/PCI transfers.
Apr 24 19:51:06 (none) kernel: Linux NET4.0 for Linux 2.3
Apr 24 19:51:06 (none) kernel: Based upon Swansea University Computer Society NET3.039
Apr 24 19:51:06 (none) kernel: NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Apr 24 19:51:06 (none) kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Apr 24 19:51:06 (none) kernel: IP Protocols: ICMP, UDP, TCP
Apr 24 19:51:06 (none) kernel: IP: routing cache hash table of 512 buckets, 4Kbytes
Apr 24 19:51:06 (none) kernel: TCP: Hash tables configured (established 4096 bind 4096)
Apr 24 19:51:06 (none) kernel: Initializing RT netlink socket
Apr 24 19:51:06 (none) kernel: apm: BIOS version 1.2 Flags 0x02 (Driver version 1.13)
Apr 24 19:51:06 (none) kernel: Starting kswapd v1.6
Apr 24 19:51:06 (none) kernel: vesafb: framebuffer at 0xff400000, mapped to 0xc4800000, size 2560k
Apr 24 19:51:06 (none) kernel: vesafb: mode is 1024x768x8, linelength=1024, pages=2
Apr 24 19:51:06 (none) kernel: vesafb: protected mode interface info at c000:6edc
Apr 24 19:51:06 (none) kernel: vesafb: scrolling: redraw
Apr 24 19:51:06 (none) kernel: Console: switching to colour frame buffer device 85x34
Apr 24 19:51:06 (none) kernel: fb0: VESA VGA frame buffer device
Apr 24 19:51:06 (none) kernel: pty: 256 Unix98 ptys configured
Apr 24 19:51:06 (none) kernel: Uniform Multi-Platform E-IDE driver Revision: 6.30
Apr 24 19:51:06 (none) kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Apr 24 19:51:06 (none) kernel: PIIX4: IDE controller on PCI bus 00 dev 29
Apr 24 19:51:06 (none) kernel: PIIX4: not 100% native mode: will probe irqs later
Apr 24 19:51:06 (none) kernel: ide0: BM-DMA at 0xfff0-0xfff7, BIOS settings: hda:DMA, hdb:pio
Apr 24 19:51:06 (none) kernel: ide1: BM-DMA at 0xfff8-0xffff, BIOS settings: hdc:DMA, hdd:pio
Apr 24 19:51:06 (none) kernel: hda: IBM-DBCA-206480, ATA DISK drive
Apr 24 19:51:06 (none) kernel: hdc: TOSHIBA DVD-ROM SD-C2202, ATAPI CDROM drive
Apr 24 19:51:06 (none) kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Apr 24 19:51:06 (none) kernel: ide1 at 0x170-0x177,0x376 on irq 15
Apr 24 19:51:06 (none) kernel: hda: 11733120 sectors (6007 MB) w/420KiB Cache, CHS=730/255/63, UDMA(33)
Apr 24 19:51:06 (none) kernel: Partition check:
Apr 24 19:51:06 (none) kernel: /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4
Apr 24 19:51:06 (none) kernel: Linux PCMCIA Card Services 3.1.11
Apr 24 19:51:06 (none) kernel: options: [pci] [cardbus] [pm]
Apr 24 19:51:06 (none) kernel: Adding cardbus controller 0: Toshiba America Info Systems ToPIC95 PCI to Cardbus Bridge with ZV Support
Apr 24 19:51:06 (none) kernel: PCI: No IRQ known for interrupt pin A of device 00:0b.0. Please try using pci=biosirq.
Apr 24 19:51:06 (none) kernel: Yenta IRQ list 0000, PCI irq0
Apr 24 19:51:06 (none) kernel: Socket status: ffffffff
Apr 24 19:51:06 (none) kernel: Adding cardbus controller 1: Toshiba America Info Systems ToPIC95 PCI to Cardbus Bridge with ZV Support (#2)
Apr 24 19:51:06 (none) kernel: PCI: No IRQ known for interrupt pin B of device 00:0b.1. Please try using pci=biosirq.
Apr 24 19:51:06 (none) kernel: Yenta IRQ list 0000, PCI irq0
Apr 24 19:51:06 (none) kernel: Socket status: ffffffff
Apr 24 19:51:06 (none) kernel: Intel PCIC probe: not found.
Apr 24 19:51:06 (none) kernel: devfs: v0.94 (20000415) Richard Gooch (rgooch@atnf.csiro.au)
Apr 24 19:51:06 (none) kernel: devfs: boot_options: 0x2
Apr 24 19:51:06 (none) kernel: VFS: Mounted root (ext2 filesystem) readonly.
Apr 24 19:51:06 (none) kernel: Freeing unused kernel memory: 188k freed

If I disable dma with hdparm -d 0 /dev/hda followed by

dd if=/dev/hda2 of=/dev/hda3 bs=1024k count=128

(hda2 & hda3 are 128MB scratch partitions, hda1 is root, hda4 is usr/var)
the kernel happily oopses - this is repeatable:

 stack segment: 0000
 CPU: 0
 EIP: 0010:[kmem_cache_grow+813/1036]
 EFLAGS: 00010286
 eax: 00000073 ebx: c00e9fe0 ecx: 00000000 edx: 0000001d
 esi: c11279e0 edi: c00e9060 ebp: ffffffff esp: c3ba1c74
 ds: 0018 es: 0018 ss: 0018
 Process dd (pid: 25, stackpage=c3ba1000)
 Stack: c11279e8 c11279e0 00000003 00000282 c00e9158 c11279e8 c00e9060 0000001d
        00000000 00000202 00000001 00000003 00000060 c01295bb c11279e0 00000003
        00000400 00000c00 00000000 00000400 c013033d c11279e0 00000003 00000400
 Call Trace: [kmem_cache_alloc+375/456] [get_unused_buffer_head+57/184] [create_buffers+32/784] [__alloc_pages+89/164] [grow_buffers+110/268] [refill_freelist+10/44] [getblk+134/144]
        [block_write+361/1176] [sys_write+192/224] [system_call+52/56]
 Code: 89 45 00 8b 6d 00 83 6c 24 1c 01 0f 83 02 ff ff ff c7 45 00

after reboot, WITHOUT disabling dma, same dd as above:

 hda: timeout waiting for DMA
 ide_dmaproc: chipset supported ide_dma_timeout func only: 14
 hda: irq timeout: status=0x58 { DriveReady SeekComplete DataRequest }
 hda: timeout waiting for DMA
.. some other retries ...
 hda: DMA disabled
 ide0: reset: success

after this, it freezes hard (must power off)

VITAL STATS:

- Toshiba Satellite 2650XDVD/6.0
- Celeron 466/233
- 64 MB RAM (supposed sane, runs without problems 2.0 kernels &
             memtest86 for over 48 hours)
- IBM-DBCA-206480 (IBM disks usually works in UDMA)

Relevants in config:

CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_PCI_EXPERIMENTAL=y
CONFIG_IDEDMA_PCI_WIP=y
CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_PIIX_TUNING=y
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_IDE_MODES=y

# lspci -s 00:05.1 -vxxx

00:05.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
(prog-if 80) [Master])
        Flags: bus master, medium devsel, latency 64
        I/O ports at fff0 [size=16]
00: 86 80 11 71 05 00 80 02 01 80 01 01 00 40 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: f1 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 07 a3 07 a3 00 00 00 00 05 00 02 02 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
... all 00 ...
f0: 00 00 00 00 00 00 00 00 30 0f 00 00 00 00 00 00

# hdparm -vi /dev/hda

/dev/hda:
 multcount = 0 (off)
 I/O support = 0 (default 16-bit)
 unmaskirq = 0 (off)
 using_dma = 1 (on)
 keepsettings = 0 (off)
 nowerr = 0 (off)
 readonly = 0 (off)
 readahead = 8 (on)
 geometry = 730/255/63, sectors = 11733120, start = 0

Model=IBM-DBCA-206480, FwRev=BC40A87F, SerialNo=HR0RR0M3006
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=12416/15/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=420kB, MaxMultSect=16, MultSect=off
CurCHS=12416/15/63, CurSects=11733120, LBA=yes, LBAsects=11733120
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2

# cat /proc/ide/piix
                                Intel PIIX4 Ultra 33 Chipset.
--------------- Primary Channel ---------------- Secondary Channel
                 enabled enabled
--------------- drive 0 -------- drive1 -------- drive0 ---------- drive1
DMA enabled: yes no yes no
UDMA enabled: yes no yes no
UDMA enabled: 2 X 2 X
UDMA
DMA
PIO

[ apparently the BIOS does a good work setting the things on UDMA2 ]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:08 EST