Subject: kern/11973: wi(4) device needs more extra timeout.
To: None <>
From: Takahiro Kambe <>
List: netbsd-bugs
Date: 01/16/2001 08:52:16
>Number:         11973
>Category:       kern
>Synopsis:       wi(4) device needs more extra timeout.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 16 08:52:00 PST 2001
>Originator:     Takahiro Kambe
>Release:        NetBSD-current 2001/1/15
System: NetBSD 1.5Q NetBSD 1.5Q (CF-M33-PCMCIA) #4: Wed Jan 17 01:32:22 JST 2001 i386
Architecture: i386
Machine: i386
	Wireless LAN card, ADLINK 330C and GW-NS110 are recently thought
	to supported by wi(4).  But those cards are failed to attach.

wi0: init failed
wi0: could not get mac address, attach failed

wi0: init failed
wi0: 802.11 address xx:xx:xx:xx:xx:xx

	But those cards are succeded to attach on 1.5.1-ALPHA machine.

	Insert those cards on current machine.
	Adding some delay to wi_cmd() seems to solve the problem.
	The delay()'s value bellow might be more smaller.

Index: if_wi.c
RCS file: /usr/pkg/libdata/cvs/src/sys/dev/pcmcia/if_wi.c,v
retrieving revision
diff -u -r1. if_wi.c
--- if_wi.c	2001/01/14 14:07:29
+++ if_wi.c	2001/01/16 16:36:41
@@ -773,6 +773,7 @@
 	CSR_WRITE_2(sc, WI_COMMAND, cmd);
 	for (i = 0; i < WI_TIMEOUT; i++) {
+	delay(60);
 		 * Wait for 'command complete' bit to be
 		 * set in the event status register.