Bug 23468

Summary: xe Driver causes kernel panic when Xircom PS-CE2-10 inserted
Product: Base System Reporter: Chris Knight <chris>
Component: kernAssignee: Warner Losh <imp>
Status: Closed FIXED    
Severity: Affects Only Me CC: chris
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Chris Knight 2000-12-11 12:40:00 UTC
The xe driver causes a kernel panic in pccardd when a Xircom CreditCard Ethernet
Adapter IIps (PS-CE2-10) is inserted due to scp->cardtype being used in an
strcmp call before being assigned a value.

Fix: The following unified diff fixed the kernel panic, and correctly retrieved the
MAC address of the card. Additional debug statments were added to assist in
tracking down the problem. Also included is the result of a pccardc dumpcis
on the Xircom PS-CE2-10 for reference if anyone is interested in providing
a better fix.

% pccardc dumpcis
Configuration data for card in slot 0
Tuple #1, code = 0x1 (Common memory descriptor), length = 2
    000:  d9 40
	Common memory device information:
		Device number 1, type Function specific, WPS = ON
		Speed = 250nS, Memory block size = 512b, 9 units
Tuple #2, code = 0x15 (Version 1 info), length = 60
    000:  04 01 58 69 72 63 6f 6d 00 43 72 65 64 69 74 43
    010:  61 72 64 20 31 30 42 61 73 65 2d 54 00 50 53 2d
    020:  43 45 32 2d 31 30 00 32 2e 31 2f 30 38 30 32 36
    030:  34 33 32 2d 30 39 31 34 39 34 00 ff
	Version = 4.1, Manuf = [Xircom], card vers = [CreditCard 10Base-T]
	Addit. info = [PS-CE2-10],[2.1/08026432-091494]
Tuple #3, code = 0x1a (Configuration map), length = 5
    000:  01 01 00 08 03
	Reg len = 2, config register addr = 0x800, last config = 0x1
	Registers: XX------ 
Tuple #4, code = 0x1b (Configuration entry), length = 21
    000:  c1 41 be 71 55 2e 46 06 21 8e 7d 35 fc 2a 64 10
    010:  f8 ff 10 00 20
	Config index = 0x1(default)
	Interface byte = 0x41 (I/O)  +RDY/-BSY active
	Vcc pwr:
		Nominal operating supply voltage: 5 x 1V
		Max current average over 1 second: 2.5 x 100mA
		Max current average over 10 ms: 4 x 100mA
		Power down supply current: 1 x 100mA
	Vpp pwr:
		Nominal operating supply voltage: 1.2 x 10V, ext = 0x7d
		Max current average over 10 ms: 3 x 10mA
	Wait scale Speed = 2.0 x 100 ns
	Card decodes 4 address lines, full 8/16 Bit I/O
		IRQ modes:
		IRQs:  3 4 5 6 7 8 9 10 11 12 13 14 15
	Memory space length = 0x10
	Max twin cards = 0
	Misc attr: (Power down supported)
Tuple #5, code = 0x22 (Functional EXT), length = 13
    000:  02 01 06 00 80 c7 40 79 7a 00 00 00 ff
Tuple #6, code = 0x20 (Manufacturer ID), length = 5
    000:  05 01 0a 01 ff
	PCMCIA ID = 0x105, OEM ID = 0x10a
Tuple #7, code = 0xff (Terminator), length = 0
2 slots found

% cat if_xe.c.diff
How-To-Repeat: Ensure that pccardd is running, using the default pccard.conf file
(pccardd -f /etc/defaults/pccardd.conf). Insert Xircom PS-CE2-10. A kernel
panic will occur in pccardd. A ddb session will show the trap at strcmp+0x1b.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-12-15 18:31:21 UTC
Responsible Changed
From-To: freebsd-bugs->imp

Over to if_xe maintainer.
Comment 2 Chris Knight 2001-07-30 01:55:18 UTC
Howdy,

Please close this PR. The PS-CE2-10 I had died, and the replacement
PS-CE2-10 does not exhibit the same behaviour. PC-Cards with personality -
wonderful :-( Time to try USB NICs I think...

Regards,
Chris Knight
Systems Administrator
AIMS Independent Computer Professionals
Tel: +61 3 6334 6664  Fax: +61 3 6331 7032  Mob: +61 419 528 795
Web: http://www.aims.com.au
Comment 3 Chris Knight 2002-05-02 04:58:54 UTC
Please close this PR. Thanks.

Regards,
Chris Knight
Systems Administrator
AIMS Independent Computer Professionals
Tel: +61 3 6334 6664  Fax: +61 3 6331 7032  Mob: +61 419 528 795
Web: http://www.aims.com.au
Comment 4 Warner Losh freebsd_committer freebsd_triage 2002-05-02 20:33:02 UTC
State Changed
From-To: open->closed

Closed per originator's request.