From ddf67604dbd2ed909cab25e13655a9e385a789a6 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 22 Jun 2010 16:27:46 +0000 Subject: Some early 2.x sun4c PROM will default to serial input but glass output if no keyboard is connected but a framebuffer exists in the machine; the current kernel console code will complain and switch to full serial, but later on the framebuffer would incorrectly take over the console. Correctly detect this situation and reset the `fbnode' variable. This is an improvement of the fix which went in rev 1.54 of this file. --- sys/arch/sparc/sparc/autoconf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 039b025b1d5..36c32bb1bf5 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.85 2010/06/07 19:54:33 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.86 2010/06/22 16:27:45 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -1211,12 +1211,15 @@ mainbus_attach(parent, dev, aux) * node if a framebuffer is installed, even if console is * set to serial. */ - if (*promvec->pv_stdout != PROMDEV_SCREEN) + if (*promvec->pv_stdout != PROMDEV_SCREEN || + *promvec->pv_stdin != PROMDEV_KBD) fbnode = 0; else { /* remember which frame buffer is the console */ fbnode = getpropint(node, "fb", 0); } + } else { + /* fbnode already initialized in consinit() */ } /* Find the "options" node */ -- cgit v1.2.3