Subject: kern/8205: VIA Rhine driver returns spurious error at init time
To: None <>
From: Dave Huang <>
List: netbsd-bugs
Date: 08/13/1999 23:35:46
>Number:         8205
>Category:       kern
>Synopsis:       VIA Rhine driver returns spurious error at init time
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 13 23:35:00 1999
>Originator:     Dave Huang
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet:   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 23 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of August 13, 1999
System: NetBSD 1.4J NetBSD 1.4J (YERFABLE) #25: Sat Aug 14 01:17:54 CDT 1999 alpha

In a message to port-alpha and current-users, I wrote:
> However, a kernel compiled from last Friday's -current (Aug 6) gives me
> an error when trying to setup the IPv6 stuff:
>   vr0: supplying EUI64: 00:80:c8:ff:fe:f7:c6:96
>   root on sd0a dumps on sd0b
>   root file system type: ffs
>   vr0: interface not running
>   vr0: SIOCSIFADDR error 340088

Turns out this is due to vr_init() returning an error code... however,
there wasn't any error! The variable containing the error code was
never initialized, and contained junk (hence the strange error code).

	Try to use the vr driver, I guess... in my case, I have both
IPv4 and IPv6 in my kernel. IPv4 worked, but IPv6 didn't... it seems
like the problem would still occur without IPv6 though.

--- /usr/src/sys/dev/pci/if_vr.c	Wed Aug  4 06:17:29 1999
+++ if_vr.c	Sat Aug 14 01:17:28 1999
@@ -1217,7 +1217,7 @@
 	struct ifnet *ifp = &sc->vr_ec.ec_if;
 	struct vr_desc *d;
 	struct vr_descsoft *ds;
-	int i, error;
+	int i, error = 0;
 	/* Cancel pending I/O. */
 	vr_stop(sc, 0);