Subject: port-sparc64/16696: sparc64 panics after the addition of ofpci driver
To: None <gnats-bugs@gnats.netbsd.org>
From: None <t-nkyma@tcp-ip.or.jp>
List: netbsd-bugs
Date: 05/07/2002 16:38:38
>Number:         16696
>Category:       port-sparc64
>Synopsis:       sparc64 panics after the addition of ofpci driver
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 07 00:39:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Takeshi Nakayama
>Release:        NetBSD 1.5ZC
>Organization:
none
>Environment:
System: NetBSD nyx 1.5ZC NetBSD 1.5ZC (NYX32) #76: Tue May 7 10:55:07 JST 2002
 takeshi@nyx:/usr/src/sys/arch/sparc64/compile/NYX32 sparc64
Architecture: sparc
Machine: sparc64
>Description:
	After the addition of ofpci driver, my Netra X1 panics as
	followings:

console is /pci@1f,0/isa@7/serial@0,3f8
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    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 1.5ZC (NYX32) #76: Tue May  7 10:27:15 JST 2002
    takeshi@nyx:/usr/src/sys/arch/sparc64/compile/NYX32
total memory = 384 MB
avail memory = 351 MB
using 2470 buffers containing 19760 KB of memory
bootpath: /pci@1f,0/ide@d,0/disk@0,0:d
mainbus0 (root): SUNW,UltraAX-i2
cpu0 at mainbus0: SUNW,UltraSPARC-IIe @ 500 MHz, version 0 FPU
cpu0: physical 32K instruction (32 b/l), 16K data (32 b/l), 256K external (64 b/l)
psycho0 at mainbus0
SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 0; PCI bus 0
DVMA map: 60000000 to 80000000
IOTSB: 1904000 to 1984000
ofpci0 at psycho0
ofpci0: i/o space, memory space enabled
ebus0 at ofpci0 dev 7 function 0
ebus0: Acer Labs M1543 PCI-ISA Bridge, revision 0x00
dma at ebus0 addr 0-ffff ipl 42 not configured
rtc0 at ebus0 addr 70-71: m5819
power at ebus0 addr 2000-2007 ipl 35 not configured
SUNW,lomh at ebus0 addr 8010-8011 ipl 42 not configured
com0 at ebus0 addr 3f8-3ff ipl 43: ns16550a, working fifo
com0: console
com1 at ebus0 addr 2e8-2ef ipl 43: ns16550a, working fifo
flashprom at ebus0 addr 0-7ffff not configured
Acer Labs M7101 Power Management Controller (miscellaneous prehistoric) at ofpci0 dev 3 function 0 not configured
panic: ofpciattach: lomp no device class

	It seems that node lomp has no class-code.

ok dev /pci
ok ls
f00a0198 ide@d
f00928b4 usb@a
f0088d68 ethernet@5
f007f21c ethernet@c
f007ede4 lomp@3
f007afb0 pmu@3
f007377c isa@7
ok dev pmu
ok .properties
name                     pmu
ranges                   00000000 00000000 00001800 00000000 00000000 00000100 
                         00000001 00000000 81001810 00000000 00004000 00000100 
                         00000002 00000000 81001814 00000000 00000000 00000100 
reg                      00001800 00000000 00000000 00000000 00000000 
                         81001810 00000000 00004000 00000000 00000010 
compatible               pci10b9,7101
                         pciclass,000000
#address-cells           00000002 
#size-cells              00000001 
devsel-speed             00000001 
class-code               00000000 
max-latency              00000000 
min-grant                00000000 
revision-id              00000000 
device-id                00007101 
vendor-id                000010b9 
ok dev ..
ok dev lomp
ok .properties
name                     lomp
reg                      00001800 00000000 00000000 00000000 00000000 
                         81001810 00004000 00000000 00000000 00000010 
ok 

>How-To-Repeat:
	See above.
>Fix:
	ofpci_attach_device in ofpci.c should ignore the node which
	has no class-code instead of causing kernel panic.
>Release-Note:
>Audit-Trail:
>Unformatted: