Subject: kern/14921: keyboard support broken
To: None <>
From: Christian Bahls <>
List: netbsd-bugs
Date: 12/12/2001 03:39:51
>Number:         14921
>Category:       kern
>Synopsis:       pc keyboard not working when serial console used
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 11 18:41:00 PST 2001
>Originator:     Christian Bahls
>Release:        NetBSD 1.5Z
University of Rostock
System: NetBSD wh5041 1.5Z NetBSD 1.5Z (DEFEAT) #0: Tue Dec 11 13:40:53 CET 2001 root@wh5041:/usr/src/tester i386
Architecture: i386
Machine: i386

	kept old kernel config for a while ..
	made cvs-update .. 
	rebuild the kernel
	kernel boots fine ..
	startup is fine ..
	serial console seems to be ok ..
	but:: vga-console:
	login: .. i try to enter the login-name
		i am not able to enter more than 3 characters
	kernel locks up ..
	message on the console about pckbd: lost <sth> ..
	serial console locked as well now ..
	strange enough .. in-kernel-debugger
	 on serial line still works
	sync .. (get a kernel panic .. but .. that is a different issue)

	<<here is what i guess where the mistake is >>
	DEC 10 23:10:25 wh5041 /netbsd: pcib0 at pci0 dev 1 function 0
	Dec 10 23:10:25 wh5041 /netbsd: pcib0: vendor 0x1039 product 0x0008 (rev. 0x00)
	Dec 10 23:10:25 wh5041 /netbsd: vga0 at pci0 dev 9 function 0: vendor 0x1005 product 0x2301 (rev. 0x00)
	Dec 10 23:10:25 wh5041 /netbsd: wsdisplay0 at vga0 kbdmux 1
	Dec 10 23:10:25 wh5041 /netbsd: ex0 at pci0 dev 10 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x74)
	Dec 10 23:10:26 wh5041 /netbsd: ex0: interrupting at irq 9
	Dec 10 23:10:26 wh5041 /netbsd: ex0: MAC address 00:01:02:12:14:04

	>>This is after my fix<<
	Dec 10 23:19:21 wh5041 /netbsd: pcib0 at pci0 dev 1 function 0
	Dec 10 23:19:21 wh5041 /netbsd: pcib0: vendor 0x1039 product 0x0008 (rev. 0x00)
	Dec 10 23:19:21 wh5041 /netbsd: vga0 at pci0 dev 9 function 0: vendor 0x1005 product 0x2301 (rev. 0x00)
	Dec 10 23:19:22 wh5041 /netbsd: wsdisplay0 at vga0 kbdmux -1
	Dec 10 23:19:22 wh5041 /netbsd: ex0 at pci0 dev 10 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x74)
	Dec 10 23:19:22 wh5041 /netbsd: ex0: interrupting at irq 9
	Dec 10 23:19:22 wh5041 /netbsd: ex0: MAC address 00:01:02:12:14:04

	NOTE: "kbdmux 1" <-> "kbdmux -1"



	machine i386
	options 	EXEC_AOUT	# exec a.out binaries
	options		EXEC_ELF32	# exec ELF binaries
	options 	EXEC_SCRIPT	# exec #! scripts
	options 	INET6_MD_CKSUM	# machine-dependant code for in6_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
	ident 		"DEFEAT"
	maxusers	32		# estimated number of users
	options 	I586_CPU
	options 	VM86		# virtual 8086 emulation
	options 	DUMMY_NOPS
	options		NMBCLUSTERS=4096
	options 	UCONSOLE	# users can use TIOCCONS (for xconsole)
	options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
	options 	NTP		# NTP phase/frequency locked loop
	options 	KTRACE		# system call tracing via ktrace(1)
	options 	SYSVMSG		# System V-like message queues
	options 	SYSVSEM		# System V-like semaphores
	options 	SYSVSHM		# System V-like memory sharing
	options 	LKM		# loadable kernel modules
	options 	DIAGNOSTIC	# expensive kernel consistency checks
	options 	DEBUG		# expensive debugging checks/support
	options 	DDB		# in-kernel debugger
	options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
	makeoptions	DEBUG="-g"	# compile full symbol table
	options 	COMPAT_15	# NetBSD 1.5,
	options 	COMPAT_LINUX	# binary compatibility with Linux
	file-system 	FFS		# UFS
	file-system 	EXT2FS		# second extended file system (linux)
	file-system 	MFS		# memory file system
	file-system 	NFS		# Network File System client
	file-system 	CD9660		# ISO 9660 + Rock Ridge file system
	file-system 	MSDOSFS		# MS-DOS file system
	file-system 	NULLFS		# loopback file system
	file-system 	PROCFS		# /proc
	file-system 	UNION		# union file system
	options 	SOFTDEP         # FFS soft updates support.
	options 	INET		# IP + ICMP + TCP + UDP
	options 	INET6		# IPV6
	options 	PFIL_HOOKS	# pfil(9) packet filter hooks
	options 	IPFILTER_LOG	# ipmon(8) log support
	options 	WSEMUL_VT100		# VT100 / VT220 emulation
	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
	config		netbsd	root on wd0a type ffs
	mainbus0 at root
	pci*	at mainbus? bus ?
	pcib*	at pci? dev ? function ?	# PCI-ISA bridges
	isa0	at pcib?
	npx0	at isa? port 0xf0 irq 13	# x86 math coprocessor
	options 	XSERVER		# X server support
	pckbc0		at isa?			# pc keyboard controller
	pckbd*		at pckbc?		# PC keyboard
	vga*		at pci? dev ? function ?
	wsdisplay*	at vga? console ?
	wskbd* 		at pckbd? console ?
	pcppi0		at isa?
	sysbeep0	at pcppi?
	com0	at isa? port 0x3f8 irq 4	# Standard PC serial ports
	com1	at isa? port 0x2f8 irq 3
	lpt0	at isa? port 0x378 irq 7	# standard PC parallel ports
	pciide* at pci? dev ? function ? flags 0x0000
	wd*	at pciide? channel ? drive ? flags 0x0000
	atapibus* at pciide? channel ?
	cd*	at atapibus? drive ? flags 0x0000	# ATAPI CD-ROM drives
	fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
	fd0	at fdc0 drive 0
	ex*	at pci? dev ? function ?	# 3Com 90x[BC]
	bmtphy*	at mii? phy ?			# Broadcom BCM5201 and BCM5202 PHYs
	eap*	at pci? dev ? function ?	# Ensoniq AudioPCI
	audio*	at eap?
	midi*	at eap?			# 137[01] MIDI port
	pseudo-device	vnd		2	# disk-like interface to files
	pseudo-device	bpfilter	4	# Berkeley packet filter
	pseudo-device	ipfilter		# IP filter (firewall) and NAT
	pseudo-device	loop		2	# network loopback
	pseudo-device	gif		4	# IPv[46] over IPv[46] tunnel (RFC1933)
	pseudo-device	pty			# pseudo-terminals
	pseudo-device	rnd			# /dev/random and in-kernel generator
	pseudo-device	wsmux		2
	pseudo-device	wsfont		1

	I would guess .. using a serial console "helps" as well ,-)

	i changed
	wsdisplay*	at vga? console ?
	wsdisplay0	at vga0 kbdmux -1 console ?
	i am not experienced enough to dig into the source code
	.. am willing to apply patches (kernel build takes about 1h though)

	thank you very much in advance
	christian bahls
	math student

 	CVS update on december 10th 2001 (problem since about 1 week)