NetBSD Problem Report #40947

From hauke@spg.tu-darmstadt.de  Tue Mar  3 11:59:46 2009
Return-Path: <hauke@spg.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5FB0663BAB8
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  3 Mar 2009 11:59:46 +0000 (UTC)
Message-Id: <200903031145.n23Bj4fM014689@Kolm.nt.e-technik.tu-darmstadt.de>
Date: Tue, 3 Mar 2009 12:45:04 +0100 (CET)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@gnats.NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Thinkpad panics during shutdown
X-Send-Pr-Version: 3.95

>Number:         40947
>Category:       kern
>Synopsis:       Thinkpad panics, then hangs during shutdown
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 03 12:00:00 +0000 2009
>Closed-Date:    Wed Jun 01 22:42:48 +0000 2016
>Last-Modified:  Wed Jun 01 22:42:48 +0000 2016
>Originator:     Hauke Fath
>Release:        NetBSD 5.0_RC2
>Organization:

>Environment:


System: NetBSD Kolm 5.0_RC2 NetBSD 5.0_RC2 (TP380D) #0: Mon Mar 2 17:20:34 CET 2009 hf@Hochstuhl:/var/obj/netbsd-builds/5/i386/sys/arch/i386/compile/TP380D i386
Architecture: i386
Machine: i386
>Description:

	A Thinkpad 380D (Pentium 150 MHz, 80 MB RAM) with a DIAGNOSTIC +
	DEBUG kernel panics during shutdown with 

	panic: cpu_switchto: switching above IPL_SCHED (8)

	See output at
	<http://www.spg.tu-darmstadt.de/~hf/netbsd/tp380d-nbsd5-panic.jpg>.

>How-To-Repeat:

	Install DIAGNOSTIC / DEBUG kernel on Thinkpad 380D, reboot.

	'config -x /netbsd' output:

### START CONFIG FILE "/public/netbsd-5/sys/arch/i386/conf/TP380D"
# IBM Thinkpad 380D kernel config

include 	"arch/i386/conf/std.i386"

options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

maxusers	16		# estimated number of users

makeoptions 	CPUFLAGS="-Os -pipe -march=pentium"

# CPU-related options.
options 	VM86		# virtual 8086 emulation
options 	USER_LDT	# user-settable LDT; used by WINE

options 	MULTIBOOT	# Multiboot support (see multiboot(8))

# delay between "rebooting ..." message and hardware reset, in milliseconds
#options 	CPURESET_DELAY=2000

# Standard system options

options 	INSECURE	# disable kernel security levels - X needs this

options 	RTC_OFFSET=-60	# hardware clock is this many mins. west of GMT
options 	NTP		# NTP phase/frequency locked loop

options 	KTRACE		# system call tracing via ktrace(1)

# Note: SysV IPC parameters could be changed dynamically, see sysctl(8).
options 	SYSVMSG		# System V-like message queues
options 	SYSVSEM		# System V-like semaphores
options 	SYSVSHM		# System V-like memory sharing
options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support

options 	USERCONF	# userconf(4) support
#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel

# Alternate buffer queue strategies for better responsiveness under high
# disk I/O load.
#options 	BUFQ_READPRIO
options 	BUFQ_PRIOCSCAN

# Diagnostic/debugging support options
options 	DIAGNOSTIC	# expensive kernel consistency checks
options 	DEBUG		# expensive debugging checks/support
#options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
options 	DDB		# in-kernel debugger
#options 	DDB_ONPANIC=1	# see also sysctl(8): `ddb.onpanic'
options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
#options 	DDB_VERBOSE_HELP
#options 	KGDB		# remote debugger
#options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
#makeoptions 	DEBUG="-g"	# compile full symbol table
#options 	SYSCALL_STATS	# per syscall counts
#options 	SYSCALL_TIMES	# per syscall times
#options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)

# Compatibility options
options 	COMPAT_30	# NetBSD 3.0
options 	COMPAT_30_PTHREAD # NetBSD 3.0 pthreads compatibility.
options 	COMPAT_40	# NetBSD 4.0

options 	COMPAT_OSSAUDIO	# OSS (Voxware) audio driver compatibility
options 	COMPAT_LINUX	# binary compatibility with Linux

options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.

# Wedge support
options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
options 	DKWEDGE_METHOD_GPT	# Supports GPT partitions as wedges
# The following two options can break /etc/fstab, so handle with care
#options 	DKWEDGE_METHOD_BSDLABEL	# Support disklabel entries as wedges
#options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges

# File systems
file-system 	FFS		# UFS
file-system 	NFS		# Network File System client
file-system 	NTFS		# Windows/NT file system (experimental)
file-system 	CD9660		# ISO 9660 + Rock Ridge file system
file-system 	MSDOSFS		# MS-DOS file system
file-system 	FDESC		# /dev/fd
file-system 	KERNFS		# /kern
file-system 	NULLFS		# loopback file system
file-system 	PROCFS		# /proc
file-system 	PTYFS		# /dev/ptm support
file-system 	TMPFS		# Efficient memory file-system
file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)

# File system options
options 	WAPBL		# File system journaling support - Experimental
options 	NFSSERVER	# Network File System server

# Networking options
options 	INET		# IP + ICMP + TCP + UDP
options 	INET6		# IPV6
#options 	IPSEC		# IP security
#options 	IPSEC_ESP	# IP security (encryption part; define w/IPSEC)
#options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
#options 	IPSEC_DEBUG	# debug for IP security
#options 	MROUTING	# IP multicast routing
#options 	PIM		# Protocol Independent Multicast
options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
options 	PPP_DEFLATE	# Deflate compression support for PPP
options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
options 	PFIL_HOOKS	# pfil(9) packet filter hooks
options 	IPFILTER_LOG	# ipmon(8) log support
options 	IPFILTER_LOOKUP	# ippool(8) support
#options 	IPFILTER_DEFAULT_BLOCK	# block all packets by default
#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options 	MIIVERBOSE	# verbose PHY autoconfig messages
options 	PCIVERBOSE	# verbose PCI device autoconfig messages
#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
options 	PCMCIAVERBOSE	# verbose PCMCIA configuration messages
options 	SCSIVERBOSE	# human readable SCSI error messages

options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM

#
# wscons options
#
# builtin terminal emulations
options 	WSEMUL_VT100		# VT100 / VT220 emulation
# customization of console and kernel output - see dev/wscons/wsdisplayvar.h
options 	WSDISPLAY_CUSTOM_OUTPUT	# color customization from wsconsctl(8)
#options 	WS_DEFAULT_FG=WSCOL_WHITE
#options 	WS_DEFAULT_BG=WSCOL_BLACK
#options 	WS_DEFAULT_COLATTR="(0)"
#options 	WS_DEFAULT_MONOATTR="(0)"
options 	WS_KERNEL_FG=WSCOL_GREEN
#options 	WS_KERNEL_BG=WSCOL_BLACK
#options 	WS_KERNEL_COLATTR=""
#options 	WS_KERNEL_MONOATTR=""
# customization of console border color
options 	WSDISPLAY_CUSTOM_BORDER	# custom border colors via wsconsctl(8)
#options 	WSDISPLAY_BORDER_COLOR=WSCOL_BLUE	# default color
# compatibility to other console drivers
options 	WSDISPLAY_COMPAT_PCVT		# emulate some ioctls
options 	WSDISPLAY_COMPAT_SYSCONS	# emulate some ioctls
options 	WSDISPLAY_COMPAT_USL		# VT handling
options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
#options 	WSKBD_EVENT_AUTOREPEAT		# auto repeat in event mode
# don't attach pckbd as the console if no PS/2 keyboard is found
options 	PCKBD_CNATTACH_MAY_FAIL
# see dev/pckbport/wskbdmap_mfii.c for implemented layouts
options 	PCKBD_LAYOUT="(KB_DE | KB_NODEAD)" # for pckbd driver
options 	UKBD_LAYOUT="(KB_DE | KB_NODEAD)"  # for ukbd driver
# allocate a number of virtual screens at autoconfiguration time
#options 	WSDISPLAY_DEFAULTSCREENS=4
# use a large software cursor that doesn't blink
options 	PCDISPLAY_SOFTCURSOR
# console scrolling support.
options 	WSDISPLAY_SCROLLSUPPORT

# Kernel root file system and dump configuration.
config		netbsd	root on wd0a type ffs

#
# Device configuration
#

apm0	at mainbus0			# Advanced power management

# Tuning for power management, see apm(4) for more details.
#options 	APM_NO_IDLE		# Don't call BIOS CPU idle function
#options 	APM_V10_ONLY		# Use only the APM 1.0 calls
#options 	APM_NO_POWEROFF		# Don't power off on halt(8)
#options 	APM_POWER_PRINT		# Print stats on the console

# For IBM Thinkpads
options 	APM_DISABLE_INTERRUPTS=0 # Don't disable interrupts
options		APMDEBUG

# Basic Bus Support

options 	VGA_POST		# in-kernel support for VGA POST


# PCI bus support
pci*	at mainbus? bus ?
pci*	at pchb? bus ?

# Configure PCI using BIOS information
#options 	PCIBIOS			# PCI BIOS support
#options 	PCIBIOSVERBOSE		# PCI BIOS verbose info
#options 	PCIBIOS_IRQS_HINT=0x0a00 # PCI interrupts hint. IRQ 9 or 11
#options 	PCIBIOS_INTR_GUESS	# see pcibios(4)
#options 	PCIBIOS_LIBRETTO_FIXUP	# this code makes the Toshiba Libretto
					# L2/L3 work, but should not be enabled
					# on anything else.
#options 	PCIBIOS_SHARP_MM20_FIXUP # this code makes the Sharp MM 20
					# work, but should not be enabled
					# on anything else.
#options 	PCIINTR_DEBUG		# super-verbose PCI interrupt fixup

# PCI fixups, for both PCIBIOS and ACPI
#options 	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
#options 	PCI_BUS_FIXUP		# fixup PCI bus numbering
#options 	PCI_INTR_FIXUP		# fixup PCI interrupt routing

pchb*	at pci? dev ? function ?	# PCI-Host bridges
pcib*	at pci? dev ? function ?	# PCI-ISA bridges

# ISA bus support
isa0	at pcib?

# PCMCIA bus support
pcmcia* at pcic? controller ? socket ?

# PCI PCMCIA controllers
pcic0	at pci? dev? function ?

# Coprocessor Support

# Math Coprocessor support
npx0	at isa? port 0xf0 irq 13	# x86 math coprocessor


# Console Devices

# wscons
pckbc0		at isa?			# pc keyboard controller
pckbd*		at pckbc?		# PC keyboard
pms*		at pckbc?		# PS/2 mouse for wsmouse
#options 	PMS_DISABLE_POWERHOOK	# Disable PS/2 reset on resume

vga*		at pci? dev ? function ?
wsdisplay*	at vga? console ?
wskbd*		at pckbd? console ?
wsmouse*	at pms? mux 0

attimer0	at isa?
pcppi0		at isa?
sysbeep0	at pcppi?


# Serial Devices

# PCMCIA serial interfaces
com*	at pcmcia? function ?		# Modems and serial cards

pcmcom* at pcmcia? function ?		# PCMCIA multi-port serial cards
com*	at pcmcom? slave ?		# ...and the slave devices

# ISA serial interfaces
com0	at isa? port 0x3f8 irq 4	# Standard PC serial ports
com1	at isa? port 0x2f8 irq 3

# Parallel Printer Interfaces

# ISA parallel printer interfaces
#lpt0	at isa? port 0x378 irq 7	# standard PC parallel ports
#lpt1	at isa? port 0x278
lpt2	at isa? port 0x3bc

# SCSI Controllers and Devices

# PCMCIA SCSI controllers
aic*	at pcmcia? function ?		# Adaptec APA-1460 SCSI
#esp*	at pcmcia? function ?		# Qlogic ESP406/FAS408 SCSI
#spc* 	at pcmcia? function ?		# Fujitsu MB87030/MB89352 SCSI

# SCSI bus support
scsibus* at scsi?

# SCSI devices
sd*	at scsibus? target ? lun ?	# SCSI disk drives
#st*	at scsibus? target ? lun ?	# SCSI tape drives
#cd*	at scsibus? target ? lun ?	# SCSI CD-ROM drives
#ch*	at scsibus? target ? lun ?	# SCSI autochangers
#ses*	at scsibus? target ? lun ?	# SCSI Enclosure Services devices
#ss*	at scsibus? target ? lun ?	# SCSI scanners
uk*	at scsibus? target ? lun ?	# SCSI unknown


# ISA ST506, ESDI, and IDE controllers
# Use flags 0x01 if you want to try to use 32bits data I/O (the driver will
# fall back to 16bits I/O if 32bits I/O are not functional).
# Some controllers pass the initial 32bit test, but will fail later.
wdc0	at isa? port 0x1f0 irq 14 flags 0x00
wdc1	at isa? port 0x170 irq 15 flags 0x00

# ATA (IDE) bus support
atabus* at ata?
options	ATADEBUG

# IDE drives
# Flags are used only with controllers that support DMA operations
# and mode settings (e.g. some pciide controllers)
# The lowest order four bits (rightmost digit) of the flags define the PIO
# mode to use, the next set of four bits the DMA mode and the third set the
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
# to use, and the last bit must be 1 for this setting to be used.
# For DMA and UDMA, 0xf (1111) means 'disable'.
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
# (0xc=1100, 0xa=1010, 0xf=1111)
# 0x0000 means "use whatever the drive claims to support".
wd*	at atabus? drive ? flags 0x0000

# ATA RAID configuration support, as found on some Promise controllers.
pseudo-device	ataraid
ld*	at ataraid? vendtype ? unit ?

# ATAPI bus support
atapibus* at atapi?

# ATAPI devices
# flags have the same meaning as for IDE drives.
cd*	at atapibus? drive ? flags 0x0000	# ATAPI CD-ROM drives
sd*	at atapibus? drive ? flags 0x0000	# ATAPI disk drives
st*	at atapibus? drive ? flags 0x0000	# ATAPI tape drives
uk*	at atapibus? drive ? flags 0x0000	# ATAPI unknown


# Miscellaneous mass storage devices

# ISA floppy
fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
fd*	at fdc? drive ?			# the drives themselves

# Network Interfaces

# PCMCIA network interfaces
#an*	at pcmcia? function ?		# Aironet PC4500/PC4800 (802.11)
#awi*	at pcmcia? function ?		# BayStack 650/660 (802.11FH/DS)
cnw*	at pcmcia? function ?		# Xircom/Netwave AirSurfer
cs*	at pcmcia? function ?		# CS89xx Ethernet
ep*	at pcmcia? function ?		# 3Com 3c589 and 3c562 Ethernet
mbe*	at pcmcia? function ?		# MB8696x based Ethernet
ne*	at pcmcia? function ?		# NE2000-compatible Ethernet
#ray*	at pcmcia? function ?		# Raytheon Raylink (802.11)
sm*	at pcmcia? function ?		# Megahertz Ethernet
wi*	at pcmcia? function ?		# Lucent/Intersil WaveLan IEEE (802.11)
xirc*	at pcmcia? function ?		# Xircom CreditCard Ethernet
com*	at xirc?
xi*	at xirc?
mhzc*	at pcmcia? function ?		# Megahertz Ethernet/Modem combo cards
com*	at mhzc?
sm*	at mhzc?

# MII/PHY support
ukphy*	at mii? phy ?			# generic unknown PHYs


# Audio Devices

# ISA audio devices
sb0	at isa? port 0x220 irq 5 drq 1 drq2 5	# SoundBlaster

# OPL[23] FM synthesizers
opl*	at sb?

# Audio support
audio*	at audiobus?

# MIDI support
midi*	at midibus?
midi*	at pcppi?		# MIDI interface to the PC speaker

# The spkr driver provides a simple tone interface to the built in speaker.
spkr0	at pcppi?		# PC speaker


# Pseudo-Devices

pseudo-device 	crypto		# /dev/crypto device
pseudo-device	swcrypto	# software crypto implementation

# disk/mass storage pseudo-devices
pseudo-device	cgd		4	# cryptographic disk devices
pseudo-device	fss		4	# file system snapshot device

pseudo-device	md		1	# memory disk device (ramdisk)
options		MEMORY_DISK_HOOKS	# enable root ramdisk
options		MEMORY_DISK_DYNAMIC	# loaded via kernel module

pseudo-device	vnd			# disk-like interface to files
options 	VND_COMPRESSION		# compressed vnd(4)

# network pseudo-devices
pseudo-device	bpfilter		# Berkeley packet filter
pseudo-device	ipfilter		# IP filter (firewall) and NAT
pseudo-device	loop			# network loopback
pseudo-device	ppp			# Point-to-Point Protocol
pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
pseudo-device	sl			# Serial Line IP
pseudo-device	irframetty		# IrDA frame line discipline
pseudo-device	tap			# virtual Ethernet
pseudo-device	tun			# network tunneling over tty
pseudo-device	gre			# generic L3 over IP tunnel
pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
#pseudo-device	faith			# IPv[46] tcp relay translation i/f
pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
pseudo-device	agr			# IEEE 802.3ad link aggregation
#pseudo-device	pf			# PF packet filter
#pseudo-device	pflog			# PF log if

# miscellaneous pseudo-devices
pseudo-device	pty			# pseudo-terminals
pseudo-device	sequencer	1	# MIDI sequencer
pseudo-device	rnd			# /dev/random and in-kernel generator
pseudo-device	clockctl		# user control of clock subsystem
pseudo-device	ksyms			# /dev/ksyms
pseudo-device	lockstat		# lock profiling

# wscons pseudo-devices
pseudo-device	wsmux			# mouse & keyboard multiplexor
pseudo-device	wsfont

# cmos(4) pseudo-device
pseudo-device	cmos

# pseudo audio device driver
pseudo-device	pad

# userland interface to drivers, including autoconf and properties retrieval
pseudo-device	drvctl

# Pass-to-Userspace TransporTER, required for puffs(4) and pud(4)
pseudo-device	putter

options 	FILEASSOC		# fileassoc(9) - required for Veriexec
### END CONFIG FILE "/public/netbsd-5/sys/arch/i386/conf/TP380D"
### (included from "arch/i386/conf/std.i386")
###> # $NetBSD: std.i386,v 1.28 2008/04/30 15:29:12 ad Exp $
###> #
###> # standard, required NetBSD/i386 'options'
###> 
###> machine i386 x86
###> include		"conf/std"	# MI standard options
###> 
###> options 	EXEC_AOUT	# exec a.out binaries
###> options 	EXEC_ELF32	# exec ELF binaries
###> options 	EXEC_SCRIPT	# exec #! scripts
###> options 	CPU_IN_CKSUM
###> #options 	CRYPTO_MD_DES_ENC	# machine-dependant code for DES
###> #options 	CRYPTO_MD_DES_CBC	# machine-dependant DES CBC code
###> #options 	CRYPTO_MD_BF_ENC	# machine-dependant code for BF_encrypt
###> #options 	CRYPTO_MD_BF_CBC	# careful: uses bswapl, requires 486
###> options		MULTIPROCESSOR		# multiprocessor supprot
###> options 	MPBIOS			# configure CPUs and APICs using MPBIOS
###> 
###> mainbus0 at root
###> cpu* at mainbus?
###> ioapic* at mainbus?
### (end include "arch/i386/conf/std.i386")
### (included from "conf/std")
###> # $NetBSD: std,v 1.9 2007/08/04 11:03:00 ad Exp $
###> #
###> # standard MI 'options'
###> #
###> # this file is for options which can't be off-by-default for some reasons.
###> # "it's commonly used" is NOT a good reason to enable options here.
###> 
###> # the following options are on-by-default to keep
###> # kernel config file compatibility.
###> options	VMSWAP		# Swap device/file support
###> options	BUFQ_FCFS	# First-come First-serve strategy
###> options	BUFQ_DISKSORT	# Traditional min seek sort strategy
###> options	RFC2292		# Previous version of Adv. Sockets API for IPv6 
###> options	PTRACE		# Include ptrace(2)
###> options	COREDUMP	# allow processes to coredump.
###> 
###> #
###> # Security model.
###> #
###> options secmodel_bsd44	# Traditional 4.4BSD security model
###> 
###> #
###> # Scheduling algorithm
###> #
###> options	SCHED_4BSD
###> 
###> pseudo-device	cpuctl
### (end include "conf/std")


>Fix:
	None.

>Release-Note:

>Audit-Trail:
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Tue, 03 Mar 2009 18:25:02 +0100

 The full stack trace from serial console (hmmm, looks like pcmcia 
 breakage?):

 [...]
 syncing disks... 5 done
 unmounting file systems...
 unmounting /dev/pts (ptyfs)...
 unmounting /kern (kernfs)...
 unmounting /var/tmp (tmpfs)...
 unmounting /tmp (tmpfs)...
 unmounting /local (/dev/wd0g)...
 unmounting /usr/pkg (/dev/wd0e)...
 unmounting /var (/dev/wd0f)...
 unmounting / (/dev/wd0a)... done
 panic: cpu_switchto: switching above IPL_SCHED (8)
 fatal breakpoint trap in supervisor mode
 trap type 1 code 0 eip c02fc8cc cs 8 eflags 246 cr2 c7197b00 ilevel 8
 Stopped in pid 564.1 (reboot) at        netbsd:breakpoint+0x4:  popl    %ebp
 db{0}> t
 breakpoint(c7aefa7c,c02f33cb,c6931ce0,c7aefa90,c7aefad4,c7fe9a40,c7aefaec,c010038e,c0100391,8) 
 at netbsd:breakpoint+0x4
 panic(c0100391,8,c7fe9a40,c7fe9a40,c7aefad4,c025efeb,c7fe9a40,c6931ce0,0,c03fbe40) 
 at netbsd:panic+0x182
 cpu_switchto(c7fe9a40,1e,c7fe9a40,c7fe9a40,0,3eaa4b,1,c0436fd4,c7fe9a40,0) 
 at netbsd:cpu_switchto+0x1e
 sleepq_block(1e,0,8,8,c6920030,c07c0010,c7ae0010,c7fe9a40,0,c7aefb8c) at 
 netbsd:sleepq_block+0xa9
 ltsleep(c033ccd7,20,c03eaa4b,1e,0,3e0,1,0,c6e526b8,8) at 
 netbsd:ltsleep+0x10f
 pcic_delay(c6e526b8,12c,c03eaa4b,c0387b20,c771da0c,c771da0c,c7aefbcc,c0341f69,c6e526b8,400) 
 at netbsd:pcic_delay+0x8a
 pcic_chip_socket_disable(c6e526b8,400,c7aefbec,c018637b,0,c771da0c,c7aefbec,c018619f,c771da0c,400) 
 at netbsd:pcic_chip_socket_disable+0x64
 ep_pcmcia_disable(c771da0c,400,e,c771da0c,8,c771da0c,c7aefc0c,c0186b2c,c771da0c,0) 
 at netbsd:ep_pcmcia_disable+0x15
 epdisable(c771da0c,0,8,8,0,c7aefd00,c7aefc2c,c025de8e,c771da0c,0) at 
 netbsd:epdisable+0x23
 epshutdown(c771da0c,0,0,c0300c6a,8,0,c7aefc3c,c0300c85,c7aefd00,0) at 
 netbsd:epshutdown+0x3b
 doshutdownhooks(c7aefd00,0,c7aefcdc,c026750b,0,0,c7aefc9c,c025adb7,c6924f40,1) 
 at netbsd:doshutdownhooks+0x24
 cpu_reboot(0,0,c7aefc9c,c025adb7,c6924f40,1,4e1c000,4e1c000,c7aefc90,c7f91770) 
 at netbsd:cpu_reboot+0x6e
 sys_reboot(c7fe9a40,c7aefd00,c7aefd28,c7f91770,bbb5f000,c7c111a4,0,0,0,bfbfeef8) 
 at netbsd:sys_reboot+0x6b
 syscall(c7aefd48,b3,ab,1f,1f,1,d,bfbfeef8,0,256) at netbsd:syscall+0xf7
 db{0}>

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org, Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Tue, 03 Mar 2009 12:47:31 -0500

 This is a multi-part message in MIME format.
 --------------050403000100050403080108
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit

 Hauke Fath wrote:
 > The following reply was made to PR kern/40947; it has been noted by GNATS.
 > 
 > From: Hauke Fath <hf@spg.tu-darmstadt.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: kern/40947: Thinkpad panics during shutdown
 > Date: Tue, 03 Mar 2009 18:25:02 +0100
 > 
 >  The full stack trace from serial console (hmmm, looks like pcmcia 
 >  breakage?):

 Hi Hauke --

 elink3.c should be adapted to use the new pmf instead of shutdownhooks. 
 Can you please try the attached patch?

 Cheers,
 Jared

 --------------050403000100050403080108
 Content-Type: text/plain;
  name="pr40947.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="pr40947.patch"

 Index: pcmcia/if_ep_pcmcia.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pcmcia/if_ep_pcmcia.c,v
 retrieving revision 1.62
 diff -u -p -r1.62 if_ep_pcmcia.c
 --- pcmcia/if_ep_pcmcia.c	27 Aug 2008 05:33:47 -0000	1.62
 +++ pcmcia/if_ep_pcmcia.c	3 Mar 2009 17:46:38 -0000
 @@ -322,7 +322,7 @@ ep_pcmcia_attach(device_t parent, device
  	if (epconfig(sc, epp->epp_chipset, enaddr))
  		aprint_error_dev(self, "couldn't configure controller\n");

 -	if (!pmf_device_register(self, NULL, NULL))
 +	if (!pmf_device_register1(self, NULL, NULL, epshutdown))
  		aprint_error_dev(self, "couldn't establish power handler\n");
  	else
  		pmf_class_network_register(self, &sc->sc_ethercom.ec_if);
 Index: ic/elink3.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/elink3.c,v
 retrieving revision 1.127
 diff -u -p -r1.127 elink3.c
 --- ic/elink3.c	27 Aug 2008 05:33:47 -0000	1.127
 +++ ic/elink3.c	3 Mar 2009 17:46:38 -0000
 @@ -192,7 +192,6 @@ int	epioctl(struct ifnet *, u_long, void
  void	epstart(struct ifnet *);
  void	epwatchdog(struct ifnet *);
  void	epreset(struct ep_softc *);
 -static void epshutdown(void *);
  void	epread(struct ep_softc *);
  struct mbuf *epget(struct ep_softc *, int);
  void	epmbuffill(void *);
 @@ -500,9 +499,6 @@ epconfig(struct ep_softc *sc, u_short ch

  	sc->tx_start_thresh = 20;	/* probably a good starting point. */

 -	/*  Establish callback to reset card when we reboot. */
 -	sc->sd_hook = shutdownhook_establish(epshutdown, sc);
 -
  	ep_reset_cmd(sc, ELINK_COMMAND, RX_RESET);
  	ep_reset_cmd(sc, ELINK_COMMAND, TX_RESET);

 @@ -1798,10 +1794,10 @@ epstop(struct ifnet *ifp, int disable)
  /*
   * Before reboots, reset card completely.
   */
 -static void
 -epshutdown(void *arg)
 +bool
 +epshutdown(device_t dev, int how)
  {
 -	struct ep_softc *sc = arg;
 +	struct ep_softc *sc = device_private(dev);	/* XXX DECL_NEW */
  	int s = splnet();

  	if (sc->enabled) {
 @@ -1811,6 +1807,8 @@ epshutdown(void *arg)
  		sc->enabled = 0;
  	}
  	splx(s);
 +
 +	return true;
  }

  /*
 Index: ic/elink3var.h
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/elink3var.h,v
 retrieving revision 1.35
 diff -u -p -r1.35 elink3var.h
 --- ic/elink3var.h	27 Aug 2008 05:33:47 -0000	1.35
 +++ ic/elink3var.h	3 Mar 2009 17:46:38 -0000
 @@ -121,6 +121,7 @@ int	epintr(void *);

  int	epenable(struct ep_softc *);
  void	epdisable(struct ep_softc *);
 +bool	epshutdown(device_t, int);

  int	ep_activate(device_t, enum devact);
  int	ep_detach(device_t, int);

 --------------050403000100050403080108--

From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Wed, 04 Mar 2009 14:50:07 +0900 (JST)

 In message <20090303120000.D164463C1C9@www.NetBSD.org>
 	on Tue,  3 Mar 2009 12:00:00 +0000 (UTC),
 	Hauke Fath <hf@spg.tu-darmstadt.de> wrote:
 > System: NetBSD Kolm 5.0_RC2 NetBSD 5.0_RC2 (TP380D) #0: Mon Mar 2 17:20:34 CET 2009 hf@Hochstuhl:/var/obj/netbsd-builds/5/i386/sys/arch/i386/compile/TP380D i386
 > Architecture: i386
 > Machine: i386
 > >Description:
 > 
 > 	A Thinkpad 380D (Pentium 150 MHz, 80 MB RAM) with a DIAGNOSTIC +
 > 	DEBUG kernel panics during shutdown with 
 > 
 > 	panic: cpu_switchto: switching above IPL_SCHED (8)
 > 
 > 	See output at
 > 	<http://www.spg.tu-darmstadt.de/~hf/netbsd/tp380d-nbsd5-panic.jpg>.
 It looks like the same phenomenon as pr 39141 except ep(4)'s error message.

 syncing disks... done
 unmounting file systems... done
 acpi0: entering state 5
 panic: cpu_switchto: switching above IPL_SCHED (8)
 _prop_array_pool(0,0,0,0,cc2830a0,c08c4a80,cc2830a0,0,0,0) at 0xcc2af5fc
 cpu_info_primary(c1cec804,c08512a8,a08501c0,c085fa80,0,30757063,0,0,0,c1cec800)
 at 0xc085fac0
 Ent traceback...

 dumping to dev p.1 offset 2118375

 And freeze.

 -- 
 Takahiro Kambe <taca@back-street.net>

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Wed, 04 Mar 2009 09:41:36 +0100

 Jared D. McNeill wrote:
 > elink3.c should be adapted to use the new pmf instead of shutdownhooks. 
 > Can you please try the attached patch?

 Thanks. Stack trace looks a little different, but same panic. I'll 
 enclose the full dmesg.

 	hauke

 <snip>
 kernel text is mapped with 0 large pages and 1007 normal pages
 Loaded initial symtab at 0xc045c394, strtab at 0xc0499808, # entries 14844
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
      2006, 2007, 2008
      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 5.0_RC2 (TP380D) #0: Wed Mar  4 09:16:40 CET 2009
 	hf@Hochstuhl:/var/obj/netbsd-builds/5/i386/sys/arch/i386/compile/TP380D
 total memory = 81532 KB
 avail memory = 75956 KB
 Generic PC
 mainbus0 (root)
 cpu0 at mainbus0: Intel 586-class, 152MHz, id 0x52c
 pci0 at mainbus0 bus 0: configuration mode 1
 pchb0 at pci0 dev 0 function 0
 pchb0: Intel 82437MX (MTSC) Mobile System Controller (rev. 0x02)
 pcib0 at pci0 dev 1 function 0
 pcib0: Intel 82371MX (MPIIX) Mobile PCI I/O IDE Xcelerator (rev. 0x03)
 vga0 at pci0 dev 3 function 0: Neomagic MagicGraph 128ZV (rev. 0x02)
 wsdisplay0 at vga0 kbdmux 1
 drm at vga0 not configured
 pcic0 at pci0 dev 19 function 0: Cirrus Logic PD6729 PCMCIA controller
 pcic0: controller 0 (Cirrus PD6710/2X) has sockets A and B
 isa0 at pcib0
 lpt2 at isa0 port 0x3bc-0x3bf irq : polled
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com0: console
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
 pckbc0 at isa0 port 0x60-0x64
 pckbd0 at pckbc0 (kbd slot)
 pckbc0: using irq 1 for kbd slot
 wskbd0 at pckbd0 mux 1
 pms0 at pckbc0 (aux slot)
 pckbc0: using irq 12 for aux slot
 wsmouse0 at pms0 mux 0
 attimer0 at isa0 port 0x40-0x43: AT Timer
 wdc0 at isa0 port 0x1f0-0x1f7 irq 14
 atabus0 at wdc0 channel 0
 sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v3.02
 audio0 at sb0: half duplex, mmap, independent
 opl0 at sb0: model OPL3
 midi0 at opl0: SB Yamaha OPL3 (CPU-intensive output)
 wss0 at isa0 port 0x530-0x537 irq 10 drq 0,1: CS4236B
 audio1 at wss0: full duplex, mmap
 pcppi0 at isa0 port 0x61
 midi1 at pcppi0: PC speaker (CPU-intensive output)
 spkr0 at pcppi0
 sysbeep0 at pcppi0
 npx0 at isa0 port 0xf0-0xff
 fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
 attimer0: attached to pcppi0
 pcmcia0 at pcic0 controller 0 socket 0
 pcmcia1 at pcic0 controller 0 socket 1
 apm0 at mainbus0: Advanced Power Management BIOS: Power Management spec V1.2
 apm0: battery life expectancy: 80%
 apm0: A/C state: on
 apm0: battery charge state: high charging
 pcic0: using irq 7 for socket events
 pcic0: WARNING: powerhook_establish is deprecated
 pcic0: WARNING: powerhook_establish is deprecated
 fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
 atapibus0 at atabus0: 2 targets
 cd0 at atapibus0 drive 1: <CD-38E, , 2.0A> cdrom removable
 wd0 at atabus0 drive 0: <IC25N040ATCS05-0>
 wd0: 38154 MB, 77520 cyl, 16 head, 63 sec, 512 bytes/sect x 78140160 sectors
 pcmcia1: CIS version PCMCIA 2.0 or 2.1
 pcmcia1: CIS info: 3Com Corporation, 3C589D, TP/BNC LAN Card Ver. 2a, 000002
 pcmcia1: Manufacturer code 0x101, product 0x589
 pcmcia1: function 0: network adapter, ccr addr 10000 mask 3
 pcmcia1: function 0, config table entry 1: I/O card; irq mask ffff; 
 iomask 4, iospace 0-f; io8 io16 irqlevel
 pcmcia1: function 0, config table entry 3: I/O card; irq mask ffff; 
 iomask 4, iospace 0-f; io8 io16 irqlevel
 ep0 at pcmcia1 function 0: <3Com Corporation, 3C589D, TP/BNC LAN Card 
 Ver. 2a, 000002>
 pcic0: port 0x400-0x40f
 pcmcia1: card irq 9
 ep0: address 00:10:4b:7f:61:a3, 8KB byte-wide FIFO, 5:3 Rx:Tx split
 ep0: 10baseT, 10base5, 10base2 (default 10baseT)
 pad: requested 1 units
 pad0: outputs: 44100Hz, 16-bit, stereo
 audio2 at pad0: half duplex
 boot device: wd0
 root on wd0a dumps on wd0b
 dump_misc_init: max_paddr = 0x5000000
 init: copying out path `/sbin/init' 11
 Wed Mar  4 09:21:09 CET 2009
 swapctl: adding /dev/wd0b as swap device at priority 0
 Starting file system checks:
 /dev/rwd0a: file system is clean; not checking
 /dev/rwd0e: file system is clean; not checking
 /dev/rwd0f: file system is clean; not checking
 /dev/rwd0g: file system is clean; not checking
 Setting tty flags.
 Setting sysctl variables:
 vm.anonmin: 10 -> 50
 vm.anonmax: 80 -> 90
 vm.execmin: 5 -> 2
 vm.execmax: 30 -> 8
 vm.filemin: 10 -> 1
 vm.filemax: 50 -> 10
 vm.bufcache: 15 -> 8
 kern.logsigexit: 1 -> 1
 ddb.onpanic: 0 -> 1
 Starting network.
 /etc/rc: WARNING: $hostname not set.
 IPv6 mode: host
 Configuring network interfaces: ep0pcmcia1: card irq 9
 .
 Adding interface aliases:.
 Building databases: dev, utmp, utmpx done
 encoding -> de.nodead
 Starting syslogd.
 Setting date via ntp.
 Checking for core dump...
 savecore: no core dump
 Starting rpcbind.
 Mounting all filesystems...
 Clearing temporary files.
 Starting amd.
 Mar  4 09:21:43 Kolm amd[220]/info:  using configuration file /etc/amd.conf
 Creating a.out runtime link editor directory cache.
 Checking quotas: done.
 Starting statd.
 Starting lockd.
 Starting virecover.
 Starting apmd.
 Starting local daemons:.
 Updating motd.
 Starting ntpd.
 Starting xdm.
 Starting sshd.
 Starting sendmail.
 Starting smmsp.
 Starting inetd.
 Starting cron.
 Wed Mar  4 09:21:53 CET 2009
 Mar  4 09:21:56 Kolm getty[406]: /dev/ttyE0: Device not configured

 NetBSD/i386 (Kolm) (tty00)

 login: root
 Password:
 Mar  4 09:22:09 Kolm login: ROOT LOGIN (root) ON tty00
 Last login: Wed Mar  4 09:14:58 2009 on ttyE0
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
      2006, 2007, 2008
      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 5.0_RC2 (TP380D) #0: Wed Mar 4 09:16:40 CET 2009

 Welcome to NetBSD!

 You have new mail.
 [root@Kolm] ~ # shutdown -r now
 Shutdown NOW!
 shutdown: [pid 550]
 [root@Kolm] ~ # wall: You have write permission turned off; no reply 
 possible


 *** FINAL System shutdown message from root@Kolm ***
 System going down IMMEDIATELY 



 System shutdown time has arrived

 About to run shutdown hooks...
 Stopping cron.
 Stopping inetd.
 Stopping xdm.
 Waiting for PIDS: 325.
 Removing block-type swap devices
 swapctl: removing /dev/wd0b as swap device
 Wed Mar  4 09:22:48 CET 2009

 Done running shutdown hooks.
 Mar  4 09:22:55 Kolm syslogd: Exiting on signal 15
 syncing disks... done
 unmounting file systems...
 unmounting /dev/pts (ptyfs)...
 unmounting /kern (kernfs)...
 unmounting /var/tmp (tmpfs)...
 unmounting /tmp (tmpfs)...
 unmounting /local (/dev/wd0g)...
 unmounting /usr/pkg (/dev/wd0e)...
 unmounting /var (/dev/wd0f)...
 unmounting / (/dev/wd0a)...apm0: battery life expectancy: 80%
 apm0: A/C state: on
 apm0: battery charge state: high charging
   done
 panic: cpu_switchto: switching above IPL_SCHED (8)
 fatal breakpoint trap in supervisor mode
 trap type 1 code 0 eip c02fc8cc cs 8 eflags 246 cr2 bbb99d6c ilevel 8
 Stopped in pid 550.1 (reboot) at        netbsd:breakpoint+0x4:  popl    %ebp
 db{0}> t
 breakpoint(c7d85a3c,c02f33cf,c6931ce0,c7d85a50,c7d85a94,c7ce0500,c7d85aac,c010038e,c0100391,8) 
 at netbsd:breakpoint+0x4
 panic(c0100391,8,c7ce0500,c7ce0500,c7d85a94,c025efef,c7ce0500,c6931ce0,0,c03fbe40) 
 at netbsd:panic+0x182
 cpu_switchto(c7ce0500,1e,c7ce0500,c7ce0500,0,3eaa4b,1,c0436fd4,c7ce0500,0) 
 at netbsd:cpu_switchto+0x1e
 sleepq_block(1e,0,8,8,c6920030,c0940010,c7d80010,c7ce0500,0,c7d85b4c) at 
 netbsd:sleepq_block+0xa9
 ltsleep(c033ccd7,20,c03eaa4b,1e,0,3e0,1,0,c6e526b8,8) at 
 netbsd:ltsleep+0x10f
 pcic_delay(c6e526b8,12c,c03eaa4b,c0387b20,c771d808,c771d808,c7d85b8c,c0341f69,c6e526b8,400) 
 at netbsd:pcic_delay+0x8a
 pcic_chip_socket_disable(c6e526b8,400,c7d85bac,c018637b,0,c771d808,c7d85bac,c018619f,c771d808,400) 
 at netbsd:pcic_chip_socket_disable+0x64
 ep_pcmcia_disable(c771d808,400,e,c771d808,8,c771d808,c7d85bcc,c0186b39,c771d808,0) 
 at netbsd:ep_pcmcia_disable+0x15
 epdisable(c771d808,0,8,8,c6c7b6a4,0,c7d85bec,c0267d7e,c6c7b6a4,0) at 
 netbsd:epdisable+0x23
 epshutdown(c6c7b6a4,0,1,1,c6c7b6a4,c7d85bf8,c7d85c0c,c0252a45,c6c7b6a4,0) 
 at netbsd:epshutdown+0x48
 device_pmf_driver_shutdown(c6c7b6a4,0,1,1,0,c7d85d00,c7d85c2c,c025dead,0,0) 
 at netbsd:device_pmf_driver_shutdown+0x1d
 pmf_system_shutdown(0,0,0,c0300c6a,8,0,c7d85c3c,c0300c85,c7d85d00,0) at 
 netbsd:pmf_system_shutdown+0x70
 doshutdownhooks(c7d85d00,0,c7d85cdc,c026750f,0,0,c7d85c9c,c025adbb,c6924f40,1) 
 at netbsd:doshutdownhooks+0x3f
 cpu_reboot(0,0,c7d85c9c,c025adbb,c6924f40,1,4e1c000,4e1c000,c7d85c90,c7d68b1c) 
 at netbsd:cpu_reboot+0x6e
 sys_reboot(c7ce0500,c7d85d00,c7d85d28,c7d68b1c,c02f54e1,c693acc0,1,0,0,bfbfeef8) 
 at netbsd:sys_reboot+0x6b
 syscall(c7d85d48,b3,ab,1f,1f,1,d,bfbfeef8,0,256) at netbsd:syscall+0xf7
 db{0}>

 </snip>

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Hauke Fath <hf@spg.tu-darmstadt.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Wed, 04 Mar 2009 06:23:59 -0500

 This is a multi-part message in MIME format.
 --------------020906010007080108090401
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit

 Hauke Fath wrote:
 > Jared D. McNeill wrote:
 >> elink3.c should be adapted to use the new pmf instead of 
 >> shutdownhooks. Can you please try the attached patch?
 > 
 > Thanks. Stack trace looks a little different, but same panic. I'll 
 > enclose the full dmesg.

 > epshutdown(c6c7b6a4,0,1,1,c6c7b6a4,c7d85bf8,c7d85c0c,c0252a45,c6c7b6a4,0) 
 > at netbsd:epshutdown+0x48
 > device_pmf_driver_shutdown(c6c7b6a4,0,1,1,0,c7d85d00,c7d85c2c,c025dead,0,0) 
 > at netbsd:device_pmf_driver_shutdown+0x1d
 > pmf_system_shutdown(0,0,0,c0300c6a,8,0,c7d85c3c,c0300c85,c7d85d00,0) at 
 > netbsd:pmf_system_shutdown+0x70
 > doshutdownhooks(c7d85d00,0,c7d85cdc,c026750f,0,0,c7d85c9c,c025adbb,c6924f40,1) 
 > at netbsd:doshutdownhooks+0x3f
 > cpu_reboot(0,0,c7d85c9c,c025adbb,c6924f40,1,4e1c000,4e1c000,c7d85c90,c7d68b1c) 
 > at netbsd:cpu_reboot+0x6e

 This part doesn't make sense to me; doshutdownhooks doesn't call 
 pmf_system_shutdown.

 In any case, give this second patch a shot.

 Cheers,
 Jared

 --------------020906010007080108090401
 Content-Type: text/plain;
  name="i82365.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="i82365.patch"

 Index: i82365.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/i82365.c,v
 retrieving revision 1.103
 diff -u -p -r1.103 i82365.c
 --- i82365.c	16 Dec 2008 22:35:31 -0000	1.103
 +++ i82365.c	4 Mar 2009 11:23:03 -0000
 @@ -1328,7 +1328,11 @@ pcic_delay(h, timo, wmesg)
  #endif
  	DPRINTF(("pcic_delay: \"%s\" %p, sleep %d ms\n",
  	    wmesg, h->event_thread, timo));
 -	tsleep(pcic_delay, PWAIT, wmesg, roundup(timo * hz, 1000) / 1000);
 +	if (doing_shutdown)
 +		delay(timo * 1000);
 +	else
 +		tsleep(pcic_delay, PWAIT, wmesg,
 +		    roundup(timo * hz, 1000) / 1000);
  }

  void

 --------------020906010007080108090401--

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Wed, 4 Mar 2009 16:31:43 +0100

 At 6:23 Uhr -0500 04.03.2009, Jared D. McNeill wrote:
 >In any case, give this second patch a shot.

 I applied it in addition to the first patch (don't know if it 
 matters), and it works - the Thinkpad reboots without panic.

 Thanks,
 	hauke

 -- 
       The ASCII Ribbon Campaign                    Hauke Fath
 ()     No HTML/RTF in email            Institut für Nachrichtentechnik
 /\     No Word docs in email                     TU Darmstadt
       Respect for open standards              Ruf +49-6151-16-3281

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Hauke Fath <hf@spg.tu-darmstadt.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Wed, 4 Mar 2009 10:33:40 -0500 (EST)

 On Wed, 4 Mar 2009, Hauke Fath wrote:
 > At 6:23 Uhr -0500 04.03.2009, Jared D. McNeill wrote:
 >> In any case, give this second patch a shot.
 >
 > I applied it in addition to the first patch (don't know if it matters), and 
 > it works - the Thinkpad reboots without panic.

 The first patch needs more work to be integrated, but the second patch 
 should be fine for now (and ought to make it into 5.0).

 Cheers,
 Jared

From: Hauke Fath <hauke@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40947 CVS commit: src/sys/dev/ic
Date: Fri, 6 Mar 2009 17:10:41 +0000

 Module Name:	src
 Committed By:	hauke
 Date:		Fri Mar  6 17:10:41 UTC 2009

 Modified Files:
 	src/sys/dev/ic: i82365.c

 Log Message:
 Workaround from jmcneill for a panic at shutdown.

 Fixes PR kern/40947 and should be pulled up to netbsd-5.


 To generate a diff of this commit:
 cvs rdiff -u -r1.103 -r1.104 src/sys/dev/ic/i82365.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Wed, 01 Jun 2016 22:42:48 +0000
State-Changed-Why:
Fix committed by jmcneill on Mar  6 17:10:41 UTC 2009


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.