Subject: kern/12693: wd DMA mode detection broken in 1.5.1_BETA ?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <teemu.rinta-aho@iki.fi>
List: netbsd-bugs
Date: 04/18/2001 15:37:13
>Number:         12693
>Category:       kern
>Synopsis:       wd DMA mode detection broken in 1.5.1_BETA ?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 18 15:37:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Teemu Rinta-aho
>Release:        1.5.1_BETA
>Organization:
>Environment:
NetBSD 1.5.1_BETA (D800) #1: Thu Apr 19 00:03:54 EEST 2001 
root@d800:/usr/src/sys/arch/i386/compile/D800
>Description:
I have an IBM 75GXP hard disk, Asus A7V with Ultra ATA-100 IDE motherboard
and I have NetBSD, Linux and Windows 2000. I just recently updated
my NetBSD from 1.5 RELEASE to 1.5.1 BETA, and noticed that there are
error messages from pciide and wd when booting. These error messages
didn't come up with the 1.5 RELEASE, only with 1.5.1 BETA which
was cvs updated yesterday. It seems like the new kernel starts
with DMA mode 5 and ends up with problems while the old kernel
started up with DMA mode 4. I have proper cabling and the latest
bios etc. and no other OS gives this kind of error messages.

NetBSD boots after a couple of error messages but it doesn't make
me feel comfortable with my file system....

I will now attach the diff between
dmesg from my old kernel and the dmesg of the new kernel:

[tmg@d800 tmg]$ diff dmesg.old dmesg.new 
1c1
< NetBSD 1.5 (D800) #0: Thu Nov 23 01:20:34 EET 2000
---
> NetBSD 1.5.1_BETA (D800) #1: Thu Apr 19 00:03:54 EEST 2001
3c3
< cpu0: AMD K7 (Athlon) (686-class)
---
> cpu0: AMD K7 (Athlon) (686-class), 807.24 MHz
17a18
> wsdisplay0: screen 1-7 added (80x25, vt100 emulation)
65c66
< wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 4 (using DMA data transfers)
---
> wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5 (using DMA data transfers)
91a93,111
> pciide1:0:0: lost interrupt
>       type: ata tc_bcount: 512 tc_skip: 0
> pciide1:0:0: bus-master DMA error: missing interrupt, status=0x21
> wd0: transfer error, downgrading to Ultra-DMA mode 2
> wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
> wd0d: DMA error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> pciide1:0:0: lost interrupt
>       type: ata tc_bcount: 512 tc_skip: 0
> pciide1:0:0: bus-master DMA error: missing interrupt, status=0x21
> wd0: transfer error, downgrading to Ultra-DMA mode 1
> wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
> wd0d: aborted command, interface CRC error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> pciide1:0:0: lost interrupt
>       type: ata tc_bcount: 512 tc_skip: 0
> pciide1:0:0: bus-master DMA error: missing interrupt, status=0x21
> wd0: transfer error, downgrading to PIO mode 4
> wd0(pciide1:0:0): using PIO mode 4
> wd0d: DMA error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> wd0: soft error (corrected)
95,98d114
< wsdisplay0: screen 1 added (80x25, vt100 emulation)
< wsdisplay0: screen 2 added (80x25, vt100 emulation)
< wsdisplay0: screen 3 added (80x25, vt100 emulation)
< wsdisplay0: screen 4 added (80x25, vt100 emulation)
[tmg@d800 tmg]$ 

>How-To-Repeat:
I really can't say... I can do it, but it probably requires the
exact hardware combination: IBM 75GXP 30GB disk and Asus A7V or 
some other motherboard with Promise ATA-100.
>Fix:
I looked at the source code but I unfortunately don't have time
to fix this at the moment, I hope somebody who knows about wd.c
and pciide.c etc. can look into this.
>Release-Note:
>Audit-Trail:
>Unformatted: