Subject: kern/34944: new SATA code in viaide.c breaks one of my SATA channels
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <blair.sadewitz@gmail.com>
List: netbsd-bugs
Date: 10/30/2006 04:10:00
>Number:         34944
>Category:       kern
>Synopsis:       new SATA code in viaide.c breaks one of my SATA channels
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 30 04:10:00 +0000 2006
>Originator:     Blair Sadewitz
>Release:        4.99.3
>Organization:
>Environment:
NetBSD woody 4.99.3 NetBSD 4.99.3 (comp2) #3: Sun Oct 29 21:49:37 EST 2006  blair@woody:/home/blair/comp2 amd64
>Description:
Prior to version 1.35 of viaide.c, if I added entries for device ID 0x0591 in pcidevs.h, viaide.c, et. al., I could use both of my SATA drives.

Presently, I am able to use viaide0:0, but I get this in dmesg now:

wd0 at atabus0 drive 0viaide0: port 1: device connected, but communication not established

Note how there's no \n after the wd0 line.  I also repeatedly get a lot of messages like this (with atadebug_mask=0xffff):

Oct 29 16:37:55 woody /netbsd: wdcintr: inactive controller
Oct 29 16:37:55 woody /netbsd: viaide1:1:0: after reset, sc=0x1 sn=0x1 cl=0x0 ch
=0x0
Oct 29 16:37:55 woody /netbsd: viaide1:1:1: after reset, sc=0x1 sn=0x1 cl=0x0 ch
=0x0
Oct 29 16:37:55 woody /netbsd: viaide1:1: wdcwait_reset() end, st0=0x50 st1=0x0
Oct 29 16:37:55 woody /netbsd: viaide1:1: after reset, ret_value=0x3
Oct 29 16:37:55 woody /netbsd: viaide1:1:0: after reset, sc=0x1 sn=0x1 cl=0x0 ch
=0x0
Oct 29 16:37:55 woody /netbsd: wdcintr: inactive controller
Oct 29 16:37:55 woody /netbsd: viaide1:1:1: after reset, sc=0x1 sn=0x1 cl=0x0 ch
=0x0
Oct 29 16:37:55 woody /netbsd: wdcintr: inactive controller
Oct 29 16:37:55 woody last message repeated 76 times
Oct 29 16:37:55 woody /netbsd: viaide1:0:0: after reset, sc=0x1 sn=0x1 cl=0x0 ch
=0x0
Oct 29 16:37:55 woody /netbsd: viaide1:0:1: after reset, sc=0x1 sn=0x1 cl=0x14 c
h=0xeb
Oct 29 16:37:55 woody /netbsd: viaide1:0: wdcwait_reset() end, st0=0x50 st1=0x0
Oct 29 16:37:55 woody /netbsd: viaide1:0: after reset, ret_value=0x3

>How-To-Repeat:
Attempt to use NetBSD-current on an Asus P5VDC-X motherboard with two SATA devices connected.
>Fix:
I do not have enough familiarity with this to figure out anything aside from backing out to 1.34 of viaide.c and adding the VT8237A entry manually.

NOTE: I have tried swapping SATA devices (both Western Digital WD800J drives) to rule out a device problem; it made no difference.