Subject: port-i386/33492: wi(4) crash
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <abrasive@axdf.net>
List: netbsd-bugs
Date: 05/16/2006 10:15:01
>Number:         33492
>Category:       port-i386
>Synopsis:       wi(4) crash on insertion/boot
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Tue May 16 10:15:01 +0000 2006
>Originator:     James Laird
>Release:        NetBSD 3.0.0_STABLE, also snapshot from around 5/4/06
>Organization:
	AXDF
>Environment:
System: NetBSD moth-sandwich 3.0 NetBSD 3.0 (MOTH-SANDWICH) #2 : Mon May 15 19:24:30 EST 2006  root@blants:/usr/obj/sys/arch/i386/compile/MOTH-SANDWICH i386
Architecture: i386
Machine: i386
dmesg output:
NetBSD 3.0 (MOTH-SANDWICH) #6: Mon May 15 21:05:53 EST 2006
	root@blants:/usr/obj/sys/arch/i386/compile/MOTH-SANDWICH
total memory = 24380 KB
avail memory = 21776 KB
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium (P54C) (586-class), 90.22 MHz, id 0x525
cpu0: features 1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
isa0 at mainbus0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 (mux ignored): console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 (mux ignored)
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atabus0 at wdc0 channel 0
wdc1 at isa0 port 0x170-0x177 irq 15
atabus1 at wdc1 channel 0
vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
wsdisplay0 at vga0 (kbdmux ignored): console (80x25, vt100 emulation), using wskbd0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff irq 
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
isapnp0: no ISA Plug 'n Play devices found
apm0 at mainbus0: Power Management spec V1.1
pcic0: controller 0 detecting irqs with mask 0xdeb8:..5..9..11
pcic0: using irq 5 for socket events
wd0 at atabus0 drive 0: <TOSHIBA MK1403MAV>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 1296 MB, 2633 cyl, 16 head, 63 sec, 512 bytes/sect x 2654280 sectors
wd0: drive supports PIO mode 4, DMA mode 2
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-1202B, 1600839600, 1635> cdrom removable
cd0: drive supports PIO mode 3
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying ffs...
root file system type: ffs
WARNING: clock time much less than file system time
WARNING: using file system time
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11
xirc0 at pcmcia0 function 0: <Xircom, CreditCard 10/100, CE3-10/100, 1.00>
xirc0: id=0143
pcic0: port 0x300-0x30f
pcmcia0: card irq 9
xi0 at xirc0
xi0: MAC address 00:10:a4:b1:6c:db
ukphy0 at xi0 phy 0: Generic IEEE 802.3u media interface
ukphy0: OUI 0x00a0be, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ukphy1 at xi0 phy 16: Generic IEEE 802.3u media interface
ukphy1: OUI 0x00a0be, model 0x0000, rev. 0
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25bf, vt100 emulation)
vga_init_screen: no font
wsdisplay0: screen 5 added (80x50, vt100 emulation)

>Description:
	wi(4) driver, with supported card, crashes (kernel trap) on insertion/boot with card in.
	Laptop, kernel based on GENERIC_TINY, Toshiba Satellite 410CDT (24MB RAM, 90MHz) with no PCI;
	Wireless controller, a Compaq WL110 PCMCIA wi-fi card (rebranded Lucent Hermes)
	
	partial dmesg, at crash:
	pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff irq
	pcic0: controller = (Intel 82365SL Revision 1) has sockets A and B
	pcmcia0 at pcic0 controller 0 socket 0
	pcmcia1 at pcic0 controller 0 socket 1
	pcic0: controller 0 detecting irqs with mask 0xdeb8:..5..9..11
	pcic0: using irq 5 for socket events
	wi0 at pcmcia1 function 0: <Compaq, Compaq WL110 PC Card, Version 01.01. >
	pcic0: port 0x400-0x43f
	pcmcia1: card irq 9
	wi0:kernel: supervisor trap protection fault, code=0
	Stopped in pid 5.1 (pcic0,0,1) ad	netbsd:Xtrap00: pushl	$0x4

	This was traced, with breadcrumbs, to this line in wi_reset (dev/ic/wi.c):
	CSR_WRITE_2(sc, WI_EVENT_ACK, ~0);

	Removing all three CSR_WRITE_2 lines allows it to continue but then another trap occurs in random locations in wi_read_nicid's printing code.

	Core dump is available.

	Tried the patch detailed at http://mail-index.netbsd.org/port-alpha/2003/12/22/0000.html ; did nothing to help.


>Fix:

Unknown