Subject: DMA and interrupt errors on DS10?
To: None <port-alpha@netbsd.org>
From: Johan A.van Zanten <johan@giantfoo.org>
List: port-alpha
Date: 02/07/2005 01:56:12
Greetings.

  I've just installed a brand new Seagate IDE as a data drive into a DS10
running NetBSD 2.0:

wd0 at atabus0 drive 0: <ST3160021A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808
sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using
DMA data transfers)

The other drives in it -- including the boot drive -- are SCSI. This is my
first real experience with IDE/EIDE/DMA/etc. I've really only used SCSI
before.

I'm seeing some errors when the kernel starts reading and writing from the
drive.  Once the kernel switches to using PIO mode 4 to talk to the drive,
the errors stop, and as far as i can tell, it's functioning OK.  (My home
directory is on the drive. :)

I may be using a substandard cable; it's the one which came with the DS10.
But i thought i'd post these errors to the list, because i recall there
was some recent messages about interrupts and I/O.

In case it matters, the 2.0 that's running was compiled on this machine,
 and optimized for the 21264 chip. From /etc/mk.conf:

CPUFLAGS+=-mcpu=ev6


 Anyone have any observations or ideas? (See below for errors and
 dmesg.boot. In dmesg.boot are some "stray isa irq" messages.

 -johan

errors:

wd0: transfer error, downgrading to Ultra-DMA mode 1
wd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data
transfers)
wd0h: DMA error reading fsbn 16 of 16-31 (wd0 bn 16; cn 0 tn 0 sn 16),
retrying
wd0: soft error (corrected)
aceride0:0:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0: transfer error, downgrading to DMA mode 2
wd0(aceride0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd0h: DMA error reading fsbn 312168096 of 312168096-312168099 (wd0 bn
312168096; cn 309690 tn 9 sn 9), retrying
aceride0:0:0: lost interrupt
        type: ata tc_bcount: 2048 tc_skip: 0
aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0: transfer error, downgrading to PIO mode 4
wd0(aceride0:0:0): using PIO mode 4
wd0h: DMA error reading fsbn 312168096 of 312168096-312168099 (wd0 bn
312168096; cn 309690 tn 9 sn 9), retrying
wd0: soft error (corrected)



dmesg.boot:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 2.0 (PARATHA) #0: Sun Feb  6 22:06:04 CST 2005
	johan@sarasvati:/local/NetBSD/src/NetBSD-2.0/src/sys/arch/alpha/compile/obj.alpha/PARATHA
COMPAQ AlphaServer DS10 466 MHz, s/n r020dqmz00
8192 byte page size, 1 processor.
total memory = 1024 MB
(2848 KB reserved for PROM, 1021 MB used by NetBSD)
avail memory = 999 MB
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264-4
cpu0: Architecture extensions: 303<PAT,MVI,FIX,BWX>
tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
tsc0: 2 Dchips, 1 memory bus of 16 bytes
tsc0: arrays present: 512MB, 512MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
sio0 at pci0 dev 7 function 0: Acer Labs M1543 PCI-ISA Bridge (rev. 0xc3)
tlp0 at pci0 dev 9 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at dec 6600 irq 29
tlp0: DEC , Ethernet address 08:00:2b:86:77:93
tlp0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp1 at pci0 dev 11 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at dec 6600 irq 30
tlp1: DEC , Ethernet address 08:00:2b:86:77:a8
tlp1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
aceride0 at pci0 dev 13 function 0
aceride0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc1)
aceride0: bus-master DMA support present
aceride0: primary channel wired to compatibility mode
aceride0: primary channel interrupting at isa irq 14
atabus0 at aceride0 channel 0
aceride0: secondary channel wired to compatibility mode
aceride0: secondary channel interrupting at isa irq 15
atabus1 at aceride0 channel 1
esiop0 at pci0 dev 15 function 0: Symbios Logic 53c895 (ultra2-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at dec 6600 irq 39
scsibus0 at esiop0: 16 targets, 8 luns per target
isa0 at sio0
lpt0 at isa0 port 0x3bc-0x3bf irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
esiop0: switching to single-ended mode
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
stray isa irq 15
stray isa irq 15
scsibus0: waiting 2 seconds for devices to settle...
stray isa irq 14
stray isa irq 14
stray isa irq 14
stray isa irq 14
stray isa irq 14; stopped logging
stray isa irq 15
sd0 at scsibus0 target 0 lun 0: <IBM, DDYS-T09170N, S93E> disk fixed
sd0: 8748 MB, 15110 cyl, 3 head, 395 sec, 512 bytes/sect x 17916240 sectors
sd0: sync (50.00ns offset 31), 16-bit (40.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 1 lun 0: <IBM, DDYS-T09170N, S93E> disk fixed
sd1: 8748 MB, 15110 cyl, 3 head, 395 sec, 512 bytes/sect x 17916240 sectors
sd1: sync (50.00ns offset 31), 16-bit (40.000MB/s) transfers, tagged queueing
wd0 at atabus0 drive 0: <ST3160021A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <COMPAQ  CDR-8435, , 0013> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(aceride0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
root on sd0a dumps on sd0b
root file system type: ffs
wd0: transfer error, downgrading to Ultra-DMA mode 1
wd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
wd0h: DMA error reading fsbn 16 of 16-31 (wd0 bn 16; cn 0 tn 0 sn 16), retrying
wd0: soft error (corrected)
aceride0:0:0: lost interrupt
	type: ata tc_bcount: 2048 tc_skip: 0
aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0: transfer error, downgrading to DMA mode 2
wd0(aceride0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd0h: DMA error reading fsbn 312168096 of 312168096-312168099 (wd0 bn 312168096; cn 309690 tn 9 sn 9), retrying
aceride0:0:0: lost interrupt
	type: ata tc_bcount: 2048 tc_skip: 0
aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
wd0: transfer error, downgrading to PIO mode 4
wd0(aceride0:0:0): using PIO mode 4
wd0h: DMA error reading fsbn 312168096 of 312168096-312168099 (wd0 bn 312168096; cn 309690 tn 9 sn 9), retrying
wd0: soft error (corrected)