Subject: kern/14559: 400ms lockup every minute in wi driver
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/12/2001 19:17:12
>Number:         14559
>Category:       kern
>Synopsis:       wi driver lockups for 400ms when trying to update statistics
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 12 09:18:00 PST 2001
>Originator:     Patrik Andersin
>Release:        NetBSD 1.5Y
Portalify Ltd.
System: NetBSD 1.5Y NetBSD 1.5Y (CATTOP.cb2) #2: Fri Nov 9 13:21:55 EET 2001 i386
Architecture: i386
Machine: i386
Wi driver hangs for 400ms once a minute when it tries to update
statistics. This has been tested with Lucent Orinoco Silver card.

wi_inquire_stats() calls once minute:

wi_cmd() gets through CSR_WRITE_2() lines but the for loop
after those, where it tests for cmd completed bit, loops from 
0 to WI_TIMEOUT (65536).

Just run ntpdate -b in a loop. You should notice when clock gets out of sync.

while sleep 10
ntpdate -b

Workaround: Don't initialize statistics gathering.
In file sys/dev/ic/wi.c comment out callout_reset in wi_init():

#if 0
	callout_reset(&sc->wi_stats_ch, STATS_FREQUENCY, wi_inquire_stats, sc);