Subject: kern/16109: ISDN - AVM Fritz!Card PCMCIA not recognized + panic
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cwr@atsec.com>
List: netbsd-bugs
Date: 03/28/2002 18:09:02
>Number:         16109
>Category:       kern
>Synopsis:       AVM Fritz!Card PCMCIA is not recognized - panics upon removal
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 28 09:12:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Clemens Wittinger
>Release:        NetBSD 1.5ZC as of 26.03.2002
>Organization:
none
>Environment:

System: NetBSD probe 1.5ZC NetBSD 1.5ZC (PROBE) #35: Thu Mar 28 14:19:43 CET 2002 root@probe:/usr/src/sys/arch/i386/compile/PROBE i386
Architecture: i386
Machine: i386
>Description:
	The main symptom is that the Fritz! PCMCIA card is not correctly
	recognized - it's either not recognized at all when inserted before
	booting or incorrectly when inserted after booting.
	Here's a dmesg:

cis mem map d5de3000
pcmcia1: CIS tuple chain:
unhandled CISTPL bf
 bf 03 00 00 ff
CISTPL_NO_LINK
 14 00
CISTPL_VERS_1
 15 0d 04 01 41 56 4d 00 49 53 44 4e 20 41 00
CISTPL_FUNCID
 21 02 06 00
CISTPL_CONFIG
 1a 05 01 02 00 04 01
CISTPL_CFTABLE_ENTRY
 1b 0f c1 01 19 09 55 55 b0 a0 40 01 07 00 38 f8
 9c
CISTPL_CFTABLE_ENTRY
 1b 09 82 01 08 b0 a0 00 03 07 00
CISTPL_END
 ff
pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: AVM, ISDN A, !\^B\^F, \^Z\^E\^A\^B
pcmcia1: Manufacturer code 0xffffffff, product 0xffffffff
pcmcia1: function 0: network adapter, ccr addr 400 mask 1
pcmcia1: function 0, config table entry 1: I/O card; irq mask 9cf8; iomask 10, iospace 140-147; io8 irqlevel
pcmcia1: function 0, config table entry 2: I/O card; irq mask 9cf8; iomask 10, iospace 300-307; io8 irqlevel
isic0 at pcmcia1 function 0pcmcia1: ++enabled_count = 1
pcmcia1: function 0 CCR at 0 offset 400: bf bf bf bf, bf bf bf bf, bf
: AVM Fritz!Card
isic0: Error, HSCX version 14 unknown!
ex0 at cardbus0 dev 0 function 0: 3Com 3c575B-TX Ethernet
ex0: MAC address 00:00:86:33:9d:fe
tqphy0 at ex0 phy 0: 78Q2120 10/100 media interface, rev. 3
tqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

	Note that, well at least to information I got from a Linux boot,
	that the HSCX version is 2.1 and this card is indeed functioning.

	Sometimes, I have no better explanation, this card is not recognized
	at all. When I set pcmciacis_debug I get "unhandled CISTPL bf"
	followed by a hex dump unparsable by me :) No signs of the card in this
	case. This mostly happens when the card is inserted before booting,
	however it also has happened that the card was detected, albeit wrongly,
	in that case.

	When I insert the card after booting I get a dmesg like above quite
	consistently.

	Other pcmcia cards seem to work fine, also the CardBus device (ex0)
	works as supposed.

	Now, when the card is "detected" and I remove it, the system panics:

GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...(no debugging symbols found)...
(gdb) target kcore n.core
#0  0x1 in ?? ()
(gdb) where
#0  0x1 in ?? ()
#1  0xc0311b63 in cpu_reboot ()
#2  0xc0163d57 in db_sync_cmd ()
#3  0xc016395c in db_command ()
#4  0xc016355b in db_command_loop ()
#5  0xc016702c in db_trap ()
#6  0xc030e980 in kdb_trap ()
#7  0xc031bc17 in trap ()
#8  0xc0100dff in calltrap ()
#9  0xc015b0c9 in isic_detach_bri ()
#10 0xc03c1de4 in isic_pcmcia_detach ()
#11 0xc018d36d in config_detach ()
#12 0xc03ab2a4 in pcmcia_card_detach ()
#13 0xc03a0086 in cardslot_event_thread ()
(gdb) source /sys/arch/i386/gdbscripts/stack
(gdb) stack
  0x1(0x0,0xc04d7c18,0xd5de2c5c,0xc0165b48,0xd)
             at 0xc0311b63 <cpu_reboot+99> (frame at 0xd5de2c1c)
  0xc0311b63 <cpu_reboot+99>(0x100,0x0,0xc04c1c14,0xc0400880,0x0)
             at 0xc0163d57 <db_sync_cmd+31> (frame at 0xd5de2c3c)
  0xc0163d57 <db_sync_cmd+31>(0xc0533ee0,0x0,0xd5de2cac,0xd5de2c94,0x0)
             at 0xc016395c <db_command+532> (frame at 0xd5de2c5c)
  0xc016395c <db_command+532>
(0xc04c1c14,0xc0400880,0xd5de2d5c,0xc0163549,0xc0400b0b)
             at 0xc016355b <db_command_loop+139> (frame at 0xd5de2d0c)
  0xc016355b <db_command_loop+139>
(0xc030a1f3,0x6,0xd5dd1a7b,0xc031ca62,0xc000efcc)
             at 0xc016702c <db_trap+284> (frame at 0xd5de2d5c)
  0xc016702c <db_trap+284>(0x6,0x0,0xd5de2dcc,0xc030e970,0x1)
             at 0xc030e980 <kdb_trap+284> (frame at 0xd5de2d8c)
  0xc030e980 <kdb_trap+284>(0x6,0x0,0xd5de2e24,0x1,0xc0b31c00)
             at 0xc031bc17 <trap+379> (frame at 0xd5de2dcc)
  0xc031bc17 <trap+379>(0x10,0x10,0x10,0x10,0x0)
             at 0xc0100dff <calltrap+5> (frame at 0xd5de2e1c)
  0xc0100dff <calltrap+5>(0x0,0x0,0xd5de2ebc,0xc015b0be,0xc0b31c30)
             at 0xc015b0c9 <isic_detach_bri+37> (frame at 0xd5de2e7c)
  0xc015b0c9 <isic_detach_bri+37>(0xc0b31c00,0xc0b31f94,0x3,0x0,0xc0b31c00)
             at 0xc03c1de4 <isic_pcmcia_detach+112> (frame at 0xd5de2ebc)
  0xc03c1de4 <isic_pcmcia_detach+112>
---Type <return> to continue, or q <return> to quit---
(0xc0b31c00,0x1,0xd5de2f1c,0xc0190fcb,0xc0b2b680)
             at 0xc018d36d <config_detach+61> (frame at 0xd5de2eec)
  0xc018d36d <config_detach+61>(0xc0b31c00,0x1,0xc0b31c14,0x0,0xc0b10200)
             at 0xc03ab2a4 <pcmcia_card_detach+84> (frame at 0xd5de2f1c)
  0xc03ab2a4 <pcmcia_card_detach+84>
(0xc0b10200,0x1,0xd5de2f8c,0xc039fe3e,0xc0a5e680)
             at 0xc03a0086 <cardslot_event_thread+682> (frame at 0xd5de2f4c)
  0xc03a0086 <cardslot_event_thread+682>(0xc0a5e680,0xc061,0x0,0x0,0xc0100331)
             at 0xc0100337 <proc_trampoline+3> (frame at 0xd5de2f8c)
(gdb) quit

	Here's also a dmesg of the crash:


pcmcia1: deactivating isic1 (function 0)
pcmcia1: detaching isic1 (function 0)
pcmcia1: --enabled_count = 0
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
uvm_fault(0xc0504500, 0x0, 0, 1) -> e
syncing disks... 7 7 7 7 7 done

	I've actually no idea how to track this further down, or
	what other information might be helpful. So please feel free
	to ask me.

>How-To-Repeat:
	see above
>Fix:
	none
>Release-Note:
>Audit-Trail:
>Unformatted: