Subject: Re: corega FEtherII PCC-TXD @ cbb -> lock system
To: None <tech-kern@netbsd.org, port-i386@netbsd.org>
From: doomwarrior <doomwarriorx@gmail.com>
List: tech-kern
Date: 09/25/2006 21:56:21
I'm move this 'problem report' to tech-kern, because  after testing some 
more non-i386 systems, this isn't  imho related to i386.
If anybody give can give me a hint, what to check or to do, because this 
drives me crazy.
> Hi
>
> I installed NetBSD on my old Notebook (Cyberbook 9889) and plugged the 
> NE-compatible network card into the pcmcia slot.
> But the card isn't working and lock the system! I tried to debug this 
> behaviour, but if I single step over the parts the system
> didn't lock any more. But the card isn't working. After adding all 
> verbose and debug output, the system also don't crash.
> What I already tried:
> a) change RBUS_MIN_START, RBUS_IO_BASE, RBUS_IO_SIZE to different values
> b) use latest NetBSD 4.0 kernel
> c) test on a normal Desktop PC with Ricoh 5C475 PCI-CardBus bridge 
> (rev. 0x81) (chipflags 2)
> d) without cbb-support
> e) test the card with Ubuntu 6.06.1
f) test NetBSD 3.0 on a PowerMac 8500
g) test NetBSD 3.0 on a Ultra AXi
> ---
> a) the default values seem to be ok, because if RBUS_MIN_START is to 
> low, the pcmcia driver couldn't read the CIS correctly.
> b) nothing change here :-(
> c) same behaviour but the MAC of the card is 00:00:00:00:00:00
> d) then the pcic driver is configured and the correct MAC-address is 
> displayed but get a "device time out" later...
> e) card is working and the LED is flashing.
f)  panic in pcmcia_scan_cis
g) same behaviour but the MAC of the card is 08:00:00:00:00:00
>
> if somebody needs more infos please let me know. I first thought the 
> ccr write would be the problem, because
> while stepping through the kernel the system sometimes lock, if I run 
> through the interrupt establish function with continue.
> But because this is my only pcmcia card, I can't say if any of this 
> values below are strange.
>
> Best Regards
> Stephan
>
> see part of dmesg:
> ...
> cbb0 at pci0 dev 3 function 0: Texas Instruments PCI1131 PCI-CardBus 
> Bridge (rev. 0x01) (chipflags 3)
> cbb0: socket base address 0x10000000
> cbb0: intrpin A, intrtag 15
> cbb1 at pci0 dev 3 function 1: Texas Instruments PCI1131 PCI-CardBus 
> Bridge (rev. 0x01) (chipflags 3)
> cbb1: socket base address 0x10001000
> cbb1: intrpin B, intrtag 15
> ...
> CardBus latency timer 0x20 (20010100)
> PCI latency timer 0x10 (821000)
> pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [0x44]
> cbb0: interrupting at irq 15
> PCI config regs:
> 0x00: ac15104c 02000007 06070001 00821000
> 0x10: 10000000 02000000 20010100 fffff000
> 0x20: 00000000 fffff000 00000000 fffffffc
> 0x30: 00000000 fffffffc 00000000 04c0010f
> 0x40: 00000000 00000001 00000000 00000000
> 0x80: 00241020 00000000 00000000 00000000
> 0x90: 00702800 00000000 00000000 00000000
> 0xa0: 00000000 00000000 00000000 00000000
> socket regs: 00000000 0000000e 30000106 00000000 00000000
> ExCA regs: 84 00 00 00 00 00 00 00
> cardslot0 at cbb0 slot 0 flags 0
> cardbus0 at cardslot0: bus 1 device 0
> pcmcia0 at cardslot0
> pccbb_pcmcia_card_detect
> pccbbattach: found cardslot
> CardBus latency timer 0x20 (20020200)
> PCI latency timer 0x10 (821000)
> pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [0x44]
> ...
> cbb1: interrupting at irq 15
> PCI config regs:
> 0x00: ac15104c 02000007 06070001 00821000
> 0x10: 10001000 02000000 20020200 fffff000
> 0x20: 00000000 fffff000 00000000 fffffffc
> 0x30: 00000000 fffffffc 00000000 04c0020f
> 0x40: 00000000 00000001 00000000 00000000
> 0x80: 00243020 00000000 00000000 00000000
> 0x90: 00702800 00000000 00000000 00000000
> 0xa0: 00000000 00000000 00000000 00000000
> socket regs: 00000000 0000000e 30000510 00000000 00000000
> ExCA regs: 84 0c 00 00 00 00 00 00
> cardslot1 at cbb1 slot 1 flags 0
> cardbus1 at cardslot1: bus 2 device 0
> pcmcia1 at cardslot1
> pccbb_pcmcia_card_detect
> pccbbattach: found cardslot
> pccbb_pcmcia_socket_enable: 5V card
> pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [0x44]
> pccbb_power: CARDBUS_VCC_5V and CARDBUS_VPP_VCC [0x15]
> cbb1: wait took 0.008935s
> pccbb_pcmcia_delay: "pccen1" 0x0, sleep 1 ms
> pccbb_pcmcia_delay: "pccwr0" 0x0, sleep 10 ms
> pccbb_pcmcia_delay: "pccwr1" 0x0, sleep 100 ms
> pcmcia1: ++enabled_count = 1
> pccbb_pcmcia_alloc_mem: addr 0x40000000 size 0x400, realsize 0x1000
> pccbb_pcmcia_mem_map window 0 bus 40000000+0+400 at card addr 0
> pccbb_pcmcia_do_mem_map: start 0x40000000 end 0x400003ff off 0xc0000000
> pccbb_pcmcia_do_mem_map window 0: 0000 0080 0040 40
> pcmcia1: CIS version unknown (major=1, minor=0)
> pcmcia1: CIS info: corega K.K., corega FEtherII PCC-TXD, ,
> pcmcia1: Manufacturer code 0x1234, product 0x5678
> pcmcia1: function 0: network adapter, ccr addr 3c0 mask 63
> pcmcia1: function 0, config table entry 7: I/O card; irq mask ffff; 
> iomask a, io
> space 300-31f; mwait_required io16 irqlevel
> ne0 at pcmcia1 function 0: <corega K.K., corega FEtherII PCC-TXD, , >
> pcmcia_config_alloc: io 0 start=300 length=20 align=400 skew=300
> pccbb_pcmcia_io_alloc alloc port 0x1000+0x20
> pccbb_pcmcia_io_map window 0 dynamic port 1000+20
> pccbb_pcmcia_do_io_map win 0 addr 0x1000 size 0x20 width 0
> start 00 10, stop 1f 10, ioctl 02 enable 40
> window iobase 1000 iomax 101f
> function iobase 1000 iomax 101f
> pccbb_intr_establish start. 0x0
> pccbb_intr_establish add pil. 0xc0b9aa60
> pcmcia1: ++enabled_count = 2
> cbb1: pccbb_pcmcia_socket_settype 01 type io 70
> pccbb_pcmcia_alloc_mem: addr 0x40000000 size 0x14, realsize 0x1000
> pccbb_pcmcia_mem_map window 0 bus 40000000+3c0+14 at card addr 0
> pccbb_pcmcia_do_mem_map: start 0x40000000 end 0x400003d3 off 0xc0000000
> pccbb_pcmcia_do_mem_map window 0: 0000 0080 0040 40
> ccr write at ccrt: 1 ccrh: -891772928 size: 3ca value: 0
> ccr write at ccrt: 1 ccrh: -891772928 size: 3cc value: 16
> ccr write at ccrt: 1 ccrh: -891772928 size: 3c2 value: 0
> ccr write at ccrt: 1 ccrh: -891772928 size: 3c0 value: 71
> pcmcia1: function 0 CCR at 0 offset 3c0: 47 0 0 0, 0 3 ff ff, ff
> ne0: Ethernet address 0a:00:00:00:00:00
> pcmcia1: --enabled_count = 1
> pccbb_intr_disestablish start. 0xc0b9aa60
> pccbb_intr_disestablish: pil 0xc0b9aa60
> pccbb_intr_disestablish frees one pil
> pccbb_intr_disestablish frees one pil
> pccbb_intr_disestablish: no interrupt handler
> pccbb_pcmcia_socket_disable
> pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [0x44]
> pccbb_pcmcia_delay: "pccwr1" 0x0, sleep 300 ms
> pcmcia1: --enabled_count = 0
>
f) PowerMac panic: (written by hand, so there could be some typos)
0xd54CCAA0 kernel | MCHK trap by pcmcia_scan_cis 0x140: srr1=0x49030 
r1=0xd54CCB60 cr=0x93000093 xer=0xC000BE6F ctr=0x3BC58C
0xd54CCB60 at pcmcia_scan_cis + 0xBC
0xd54CCDB0 at pcmcia_read_cis + 0x84
0xd54CCEE0 at pcmcia_card_attach + 0x28
0xd54CCF00 at pcmcia_card_event_thread +0xd0
0xd54CCF40 at cpu_switchto + 0x44
0xd54CCF50 at ADBDevTable + 0x6CE54

g) dmesg of AXi:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 3.0 (MYDEBUG64) #0: Mon Sep 25 21:11:52 CEST 2006
        doomwarrior@ultron:/usr/src/sys/arch/sparc64/compile/MYDEBUG64
total memory = 1024 MB
avail memory = 992 MB
bootpath: /pci@1f,0/pci@1,0/scsi@1,0/disk@0,0
mainbus0 (root): SUNW,UltraSPARC-IIi-Engine: hostid 80ff0646
cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 440.028 MHz, version 0 FPU
cpu0: 32K instruction (32 b/l), 16K data (32 b/l), 2048K external (64 b/l)
cpu0: upa id 0
psycho0 at mainbus0 addr 0xfffc0000
SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 128; PCI bus 0
extent `psycho mem' (0x0 - 0xffffffff), flags = 0x0
     0x0 - 0x1ffffff
extent `psycho io' (0x0 - 0xffffff), flags = 0x0
     0x0 - 0x8ff
DVMA map: c0000000 to e0000000
IOTSB: 10d2000 to 1152000
pci0 at psycho0
pci0: i/o space, memory space enabled
ppb0 at pci0 dev 1 function 1: vendor 0x108e product 0x5000 (rev. 0x13)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
ebus0 at pci1 dev 1 function 0
ebus0: vendor 0x108e product 0x1000, revision 0x01
auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003, 
72c000-72c003, 72f000-72f003
power at ebus0 addr 724000-724003 ipl 37 not configured
SUNW,pll at ebus0 addr 504000-504002 not configured
sab0 at ebus0 addr 400000-40007f ipl 43: rev 3.2
sabtty0 at sab0 port 0: console i/o
sabtty1 at sab0 port 1
com0 at ebus0 addr 3803f8-3803ff ipl 41: ns16550a, working fifo
kbd0 at com0
com1 at ebus0 addr 3602f8-3602ff ipl 42: ns16550a, working fifo
ms0 at com1
lpt0 at ebus0 addr 340278-340287, 30015c-30015d, 700000-70000f ipl 34
fdthree at ebus0 addr 3203f0-3203f7, 706000-70600f, 720000-720003 ipl 39 
not configured
clock0 at ebus0 addr 0-1fff: mk48t59
flashprom at ebus0 addr 0-fffff not configured
beeper at ebus0 addr 722000-722003 not configured
hme0 at pci1 dev 1 function 1: Sun Happy Meal Ethernet, rev. 1
hme0: interrupting at ivec 3021
hme0: Ethernet address 08:00:20:XX:XX:XX
nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ppb1 at pci0 dev 1 function 0: vendor 0x108e product 0x5000 (rev. 0x13)
pci2 at ppb1 bus 128
pci2: i/o space, memory space enabled
esiop0 at pci2 dev 1 function 0: Symbios Logic 53c875 (ultra-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at ivec 20
esiop0: alloc new tag DSA table at PHY addr 0xc0066000
scsibus0 at esiop0: 16 targets, 8 luns per target
esiop1 at pci2 dev 1 function 1: Symbios Logic 53c875 (ultra-wide scsi)
esiop1: using on-board RAM
intr_establish: intr reused 7e0
esiop1: interrupting at ivec 20
esiop1: alloc new tag DSA table at PHY addr 0xc0068000
scsibus1 at esiop1: 16 targets, 8 luns per target
cbb0 at pci2 dev 3 function 0: vendor 0x1180 product 0x0475 (rev. 0x81)
vendor 0x1002 product 0x4756 (miscellaneous display, revision 0x7a) at 
pci2 dev 4 function 0 not configured
cbb0: interrupting at ivec 4
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 129 device 0
pcmcia0 at cardslot0
pcons at mainbus0 not configured
No counter-timer -- using %tick at 440MHz as system clock.
Using %tick -- intr in 4400281 cycles...done.
raidattach: Asked for 8 units
Kernelized RAIDframe activated
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
cbb0: wait took too long 0.198294s
pcmcia0: CIS version unknown (major=1, minor=0)
pcmcia0: CIS info: corega K.K., corega FEtherII PCC-TXD, ,
pcmcia0: Manufacturer code 0x1234, product 0x5678
pcmcia0: function 0: network adapter, ccr addr 3c0 mask 63
pcmcia0: function 0, config table entry 7: I/O card; irq mask ffff; 
iomask a, iospace 300-31f; mwait_required io16 irqlevel
ne0 at pcmcia0 function 0: <corega K.K., corega FEtherII PCC-TXD, , >
ne0: Ethernet address 08:00:00:00:00:00
esiop0: alloc newcdb at PHY addr 0xc006a000
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST318437LW, 0105> disk fixed
sd0: 17547 MB, 29851 cyl, 2 head, 601 sec, 512 bytes/sect x 35937500 sectors
sd0: sync (50.00ns offset 16), 16-bit (40.000MB/s) transfers, tagged 
queueing
cd0 at scsibus0 target 6 lun 0: <PIONEER, DVD-ROM DVD-305, 1.03> cdrom 
removable
cd0: sync (50.00ns offset 16), 8-bit (20.000MB/s) transfers
esiop1: alloc newcdb at PHY addr 0xc006c000
Searching for RAID components...
root on sd0a dumps on sd0b
mountroot: trying cd9660...
mountroot: trying ffs...
root file system type: ffs
init: copying out path `/sbin/init' 11

#ifconfig ne0 up
cbb0: wait took too long 0.194638s
Sep 25 21:49:51 ultron /netbsd: cbb0: wait took too long 0.194638s
Sep 25 21:49:51 ultron /netbsd: ne0: remote transmit DMA failed to complete
Sep 25 21:49:51 ultron /netbsd: ne0: remote transmit DMA failed to complete
# Sep 25 21:49:52 ultron /netbsd: ne0: remote transmit DMA failed to 
complete