Subject: kern/26909: many PCMCIA devices stopped working
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itohy@netbsd.org>
List: netbsd-bugs
Date: 09/11/2004 15:48:39
>Number:         26909
>Category:       kern
>Synopsis:       many PCMCIA devices stopped working
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 11 07:20:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     ITOH Yasufumi
>Release:        NetBSD 2.0G (source on Sept. 8, 2004)
>Organization:
>Environment:
System: NetBSD mei.my.domain 2.0G NetBSD 2.0G (MEI_TEST) #385: Fri Sep 10 21:40:17 JST 2004 itohy@pino.my.domain:/w/src/sys/arch/i386/compile/MEI_TEST i386
Architecture: i386
Machine: i386

Pentium MMX 166MHz
Cirrus Logic CL-PD6832 PCI-CardBus Bridge

>Description:
	Many PCMCIA cards don't work.
	Recent pcmcia changes seems to break something.

	card			driver	status
	--------------------	------	------
	TDK CompactFlash	wdc&wd	works
	ACCTON NE2000 compat	ne	fails	"where did the card go?"
	TDK 10BASE-T		mbe	works 
	Intersil PRISM II	wi	works
	3Com 3C589		ep	fails	"couldn't configure controller"
	Adaptec APA-1460	aic	fails	"unable to detect chip!"
	RATOC SCSI		esp	fails	(kernel panics)

	All the cards works on 2.0_BETA.

	Here the dmesg output:

NetBSD 2.0G (MEI_TEST) #385: Fri Sep 10 21:40:17 JST 2004
	itohy@pino.my.domain:/w/src/sys/arch/i386/compile/MEI_TEST
total memory = 32380 KB
avail memory = 28408 KB
BIOS32 rev. 0 found at 0xfd630
PCI BIOS rev. 2.1 found at 0xfd8e0
PCI IRQ Routing Table rev. 1.0 found at 0xfd6a0, size 144 bytes (7 entries)
pcibios_pir_init: bad IRQ table checksum
PCI BIOS has 8 Interrupt Routing table entries
PCI Exclusive IRQs: 10 11
pci_addr_fixup: 000:18:1 0x1060 0x673a new address 0x02000000
pci_addr_fixup: 000:18:1 0x1060 0x673a new address 0x02000010
pci_addr_fixup: 000:23:0 0x1013 0x1110 new address 0x02001000
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium/MMX (586-class), 166.10 MHz, id 0x544
cpu0: features 8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
cpu0: features 8001bf<MMX>
pnpbios0 at mainbus0: nodes 15, max len 122
com0 at pnpbios0 index 0 (PNP0501)
com0: io 3f8-3ff, irq 4
com0: ns16550a, working fifo
lpt0 at pnpbios0 index 2 (PNP0400)
lpt0: io 378-37b, irq 7
pckbc0 at pnpbios0 index 7 (PNP0303, IBM Enhanced (101/102-key) KC): kbd port
pckbc1 at pnpbios0 index 9 (PNP0F13, PS/2 Compatible Mouse): aux port
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1060 product 0xe891 (rev. 0xb0)
pcib0 at pci0 dev 18 function 0
pcib0: vendor 0x1060 product 0xe886 (rev. 0xb2)
vendor 0x1060 product 0x673a (IDE mass storage, interface 0x8a, revision 0x10) at pci0 dev 18 function 1 not configured
vga0 at pci0 dev 22 function 0: vendor 0x1023 product 0x9660 (rev. 0xd3)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
cbb0 at pci0 dev 23 function 0: vendor 0x1013 product 0x1110 (rev. 0xc1)
cbb1 at pci0 dev 23 function 1: vendor 0x1013 product 0x1110 (rev. 0xc1)
ohci0 at pci0 dev 24 function 0: vendor 0x1095 product 0x0670 (rev. 0x04)
ohci0: interrupting at irq 11
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x1095 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at pcib0
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atabus0 at wdc0 channel 0
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
isapnp0: read port 0x203
isapnp0: <ESS ES1878 Plug and Play AudioD, ESS0004, , > port 0x800/8 not configured
ess0 at isapnp0 port 0x220/16,0x388/4,0x330/2 irq 5 drq 1,0
ess0:: ESS Technology ES1878 [version 0x688b]
ess0: audio1 interrupting at irq 5
audio0 at ess0: half duplex, mmap, independent
opl0 at ess0: model OPL3
midi0 at opl0: ESS Yamaha OPL3
joy0 at isapnp0 port 0x201/1
joy0: ESS ES1878 Plug and Play AudioD 
joy0: joystick not connected
cbb0: interrupting at irq 10
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 1 device 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 9
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 2 device 0
pcmcia1 at cardslot1
apm0 at mainbus0: Power Management spec V1.2
cardbus_mapreg_map called: cardbus1 0
cardbus_mapreg_map: physaddr 40000000
cardbus1: unmap mem space
tlp0 at cardbus1 dev 0 function 0: DECchip 21143 Ethernet, pass 4.1
cardbus_mapreg_map called: cardbus1 0
cardbus_mapreg_map: physaddr 40000000
tlp0: Ethernet address xx:xx:xx:xx:xx:xx
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000818, model 0x0021, rev. 2
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0: 21143 reset block
tlp0: unknown ISV media block type 0x06
wd0 at atabus0 drive 0: <IBM-DBCA-206480>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 6194 MB, 13424 cyl, 15 head, 63 sec, 512 bytes/sect x 12685680 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying nfs...
mountroot: trying ffs...
root file system type: ffs
cc_microset[0]: delta 100699099, resetting state
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
cc_microset[0]: delta 270004, resetting state
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: TDK, TC_N
pcmcia0: Manufacturer code 0x105, product 0x301
pcmcia0: function 0: fixed disk(ata), ccr addr 200 mask f
pcmcia0: function 0, config table entry 0: memory card; irq mask 0; memspace 0-7ff; mwait_required rdybsy_active powerdown
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 2: I/O card; irq mask 4000; iomask a, iospace 1f0-1f7 3f6-3f7; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 3: I/O card; irq mask 4000; iomask a, iospace 170-177 376-377; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
wdc1 at pcmcia0 function 0: <TDK, TC_N>
wdc1: i/o mapped mode
atabus1 at wdc1 channel 0
wd1 at atabus1 drive 0: <DT KoCpr:.CTN_::ET3634::21M8ib:t:S>
wd1: drive supports 1-sector PIO transfers, LBA addressing
wd1: 16000 KB, 500 cyl, 4 head, 16 sec, 512 bytes/sect x 32000 sectors
wd1 detached
atabus1 detached
wdc1 detached
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: ACCTON, EN2216-PCMCIA-ETHERNET, EN2216, R02
pcmcia0: Manufacturer code 0x1bf, product 0x2216
pcmcia0: function 0: network adapter, ccr addr 3f8 mask 3
pcmcia0: function 0, config table entry 32: I/O card; irq mask ffff; iomask a, iospace 300-31f; mwait_required io16 irqlevel
pcmcia0: function 0, config table entry 33: I/O card; irq mask ffff; iomask a, iospace 320-33f; mwait_required io16 irqlevel
pcmcia0: function 0, config table entry 34: I/O card; irq mask ffff; iomask a, iospace 340-35f; mwait_required io16 irqlevel
pcmcia0: function 0, config table entry 35: I/O card; irq mask ffff; iomask a, iospace 360-37f; mwait_required io16 irqlevel
ne0 at pcmcia0 function 0: <ACCTON, EN2216-PCMCIA-ETHERNET, EN2216, R02>
ne0: where did the card go?
ne0 detached
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: TDK, LAC-CD02x
pcmcia0: Manufacturer code 0x105, product 0x200
pcmcia0: function 0: network adapter, ccr addr 400 mask 3
pcmcia0: function 0, config table entry 4: I/O card; irq mask 7eb8; iomask 4, iospace 0-f; io16 irqlevel
mbe0 at pcmcia0 function 0: <TDK, LAC-CD02x>
mbe0: Ethernet address xx:xx:xx:xx:xx:xx
mbe0 detached
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: IO DATA, WNB11PCM, Version 01.02, 
pcmcia0: Manufacturer code 0x28a, product 0x2
pcmcia0: function 0: network adapter, ccr addr 3e0 mask 1
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 6, iospace 0-3f; io16 irqpulse irqlevel
wi0 at pcmcia0 function 0: <IO DATA, WNB11PCM, Version 01.02, >
wi0: 802.11 address xx:xx:xx:xx:xx:xx
wi0: using RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash
wi0: Intersil Firmware: Primary (0.3.0), Station (0.8.2)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wi0 detached
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: 3Com Corporation, 3C589D, TP/BNC LAN Card Ver. 2a, 000002
pcmcia0: Manufacturer code 0x101, product 0x589
pcmcia0: function 0: network adapter, ccr addr 10000 mask 3
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; io8 io16 irqlevel
pcmcia0: function 0, config table entry 3: I/O card; irq mask ffff; iomask 4, iospace 0-f; io8 io16 irqlevel
ep0 at pcmcia0 function 0: <3Com Corporation, 3C589D, TP/BNC LAN Card Ver. 2a, 000002>
ep0: wrote 0x7ff to TX_AVAIL_THRESH, read back 0xef08. Interface disabled
ep0: couldn't configure controller
ep0 detached
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: Adaptec, Inc., APA-1460 SCSI Host Adapter, Version 0.01
pcmcia0: Manufacturer code 0x12f, product 0x2
pcmcia0: function 0: unspecified, ccr addr 2000 mask 1
pcmcia0: function 0, config table entry 9: I/O card; irq mask 1e00; iomask a, iospace 340-35f; io16 irqlevel
pcmcia0: function 0, config table entry 8: I/O card; irq mask 1e00; iomask a, iospace 140-15f; io16 irqlevel
aic0 at pcmcia0 function 0: <Adaptec, Inc., APA-1460 SCSI Host Adapter, Version 0.01>
aic0: unable to detect chip!
aic0 detached

[[ warning: hand copied from here ]]

pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: RATOC System Inc., SCSI2 CARD 37
pcmcia0: Manufacturer code 0xc015, product 0x1
pcmcia0: function 0: SCSI bridge, ccr addr 400 mask 3
pcmcia0: function 0, config table entry 33: I/O card; irq mask ffff; iomask a, iospace 120-12f; mwait_required rdybsy_active io16 irqlevel
esp0 at pcmcia0 function 0: <RATOC System Inc., SCSI2 CARD 37>
uvm_fault(0xc03c3d74, 0, 0, 2) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 6.1 (cardslot0) at	_ncr53c9x_init+0x72:	movl	$0,0(%eax)
db> t
_ncr53c9x_init+0x72		# parameters are omitted
_esp_pcmcia_enable+0x7f
_esp_pcmcia_attach+0x69
_config_attach_loc+0x389
_config_found_sm_loc+0x3d
_pcmcia_rescan+0x94
_pcmcia_card_attach+0xf2
_cardslot_event_thread+0x260
db>

>How-To-Repeat:
	boot 2.0G kernel and insert a PCMCIA card.

>Fix:
	ENOCLUE.
	Possibly, need more settling time after power up?

>Release-Note:
>Audit-Trail:
>Unformatted: