Subject: kern/13092: wiconfig cause a kernel panic after the recent change to the wi driver
To: None <gnats-bugs@gnats.netbsd.org, toshii@netbsd.org>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 06/03/2001 14:00:45
>Number:         13092
>Category:       kern
>Synopsis:       wiconfig cause a kernel panic after the recent change to the wi driver
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 03 05:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Ernesti
>Release:        NetBSD-current 03-Jun-2001 11:00 GMT
>Organization:
	
>Environment:
	
System: NetBSD arresum.veego.de 1.5W NetBSD 1.5W (ARRESUM) #590: Sun Jun 3 13:42:42 CEST 2001 bernd@arresum.veego.de:/home/work/obj_i386/src.i386/sys/arch/i386/compile/ARRESUM i386
Architecture: i386
Machine: i386
>Description:
	wiconfig wi0 cause a kernel panic when the card is initialized (ifconfiged).

	Backing out

	rev 1.15 syssrc/sys/dev/ic/wi.c
	rev 1.7 syssrc/sys/dev/ic/wireg.h 

	fixed the panic.

	From the commit log:

>How-To-Repeat:
	configure wi0 with ifconfig and do a wiconfig wi0 after that.
	Now you get this panic:

uvm_fault(0xc041aba0, 0xe664e000, 0, 3) -> e
kernel: page fault trap, code=0
Stopped in pid 537 (wiconfig) at wi_read_record+0x101: repne insw
%
dx,%es:(%edi)
db> t
wi_read_record(c0edd000,e664d984,c011f150,0,e6633900) at wi_read_record+0x101
wi_ioctl(80008000,80008000,80008000,80008000,80008000) at wi_ioctl+0x3d7

	Maybe you also need to use encryption, but I didn't test it without
	encryption.

	Btw, here is the dmesg output:

wi0 at pcmcia0 function 0: Lucent Technologies, WaveLAN/IEEE, Version 01.01
wi0: port 0x440-0x47fpcmcia0: card irq 11
 802.11 address 00:60:1d:xx:xx:xx
wi0: using Lucent chip or unknown chip

>Fix:
	Back out:

	rev 1.15 syssrc/sys/dev/ic/wi.c
	rev 1.7 syssrc/sys/dev/ic/wireg.h 

>Release-Note:
>Audit-Trail:
>Unformatted:
 >Module Name:    syssrc
 >Committed By:   toshii
 >Date:           Sat Jun  2 15:49:17 UTC 2001
 >
 >Modified Files:
 >	syssrc/sys/dev/ic: wi.c wireg.h
 >
 >Log Message:
 >Use bus_space_{read,write}_multi_stream_2 where available.