Subject: kern/33581: Z Com XI-325H / SMC2532W-B PC Card wedges system and overheats card
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <djb_netbsd@charter.net>
List: netbsd-bugs
Date: 05/29/2006 01:25:00
>Number:         33581
>Category:       kern
>Synopsis:       Z Com XI-325H / SMC2532W-B PC Card wedges system and overheats card
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 29 01:25:00 +0000 2006
>Originator:     Dave J. Barnes
>Release:        NetBSD 3.0
>Organization:
>Environment:
NetBSD anchovy 3.0 NetBSD 3.0 (2006/05/28 DJB Multia/alpha) #0: Sun May 28 15:17:41 CDT 2006  root@anchovy:/usr/NetBSD_src/usr/src/sys/arch/alpha/compile/DJB alpha
>Description:
Inserting a PCMCIA card based on the Z Com XI-325 series wedges the system when power is enabled to the card.  The system is in a tight loop constantly accessing the card which causes the interface chip, an Intersil ISL3873B, to overheat.  If the card is left inserted, the card will be damaged.  The interface chip temperature was observed to be over 150 degrees F - too hot to touch!  

Problem area was found to be in dev/ic/i82365.c in subroutine pcic_chip_socket_enable().

NOTE: Other systems could have the same problem with the XI-325 PC Cards.  However, the card works fine in my IBM Z50 running hpcmips version 3.0.  Don't have anything else here to test with.  Other PC Cards in my junk box that claim to be Prism 2.5 using the ISL3873B were in fact using the older HFA3842 MAC chip (I looked inside). Problem may be with all Prism 2.5/ISL3873B based cards and not just XI-325.
>How-To-Repeat:
Run GENERIC kernel, or any custom Multia kernel without the patch below;
insert SMC3532W-B (which is a XI-325H); 
observe system hang; 
remove PC Card; 
card is very hot.
>Fix:
Apply diff below.

dmesg fragment:
wi0 at pcmcia0 function 0: <SMC, SMC2532W-B EliteConnect Wireless Adapter, , >
pcic0: port 0x300-0x33f
wi0: 802.11 address 00:04:e2:80:29:8b
wi0: using RF:PRISM2.5 MAC:ISL3873B(PCMCIA)
wi0: Intersil Firmware: Primary (1.1.1), Station (1.8.4)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

Diff:
===============
--- dev/ic/i82365.c.orig	2006-05-28 12:52:53.000000000 -0500
+++ dev/ic/i82365.c	2006-05-28 12:53:11.000000000 -0500
@@ -1382,11 +1382,14 @@
 	intr &= PCIC_INTR_ENABLE;
 	pcic_write(h, PCIC_INTR, intr);
 
+	
 	/* zero out the address windows */
 	pcic_write(h, PCIC_ADDRWIN_ENABLE, 0);
 
+	/* XXXX NO! Don't assert output enable until card is ready */
 	/* power off; assert output enable bit */
-	power = PCIC_PWRCTL_OE;
+	/* power = PCIC_PWRCTL_OE; */
+        power = 0;
 	pcic_write(h, PCIC_PWRCTL, power);
 
 	/*
@@ -1444,6 +1448,10 @@
 	 */
 	pcic_delay(h, 20, "pccen2");
 
+        /* XXXX Card should be ready so now turn on output enable */
+	power |=  PCIC_PWRCTL_OE;
+        pcic_write(h, PCIC_PWRCTL, power);
+
 #ifdef DIAGNOSTIC
 	reg = pcic_read(h, PCIC_IF_STATUS);
 	if ((reg & PCIC_IF_STATUS_POWERACTIVE) == 0)