summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-12-22 07:09:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-12-22 07:09:53 +0000
commitd7694e39cc091d00cf9ee689b99c6b7946b982e4 (patch)
tree35ece5d83f334d701ad0c7e0e31bda930e97b494 /sys/arch/hp300/dev
parent7658356de5013efb24b967df9a37b87aeaf5cd31 (diff)
Postpone the hil console detection logic to the first detection of a keyboard.
On hp300, hil would claim console against dnkbd if no dnkbd was found at the time the loop is probed, even if the loop is empty. Because of this, plugging dnkbd later would not select it as console keyboard, which is really annoying on kernels without wsmux, such as hp300 RAMDISK. Now the first keyboard plugged will become the console keyboard, whatever its type. No functional change on hppa, since the console path gives a definite console device setting.
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r--sys/arch/hp300/dev/hil_intio.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/arch/hp300/dev/hil_intio.c b/sys/arch/hp300/dev/hil_intio.c
index 0362f616779..3f17de0ebd7 100644
--- a/sys/arch/hp300/dev/hil_intio.c
+++ b/sys/arch/hp300/dev/hil_intio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hil_intio.c,v 1.5 2005/11/16 21:37:02 miod Exp $ */
+/* $OpenBSD: hil_intio.c,v 1.6 2005/12/22 07:09:49 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -68,7 +68,7 @@ static int hil_matched = 0;
}
struct isr hil_isr;
-int hil_is_console = -1;
+int hil_is_console = -1; /* undecided */
void
hil_intio_attach(struct device *parent, struct device *self, void *aux)
@@ -86,16 +86,8 @@ hil_intio_attach(struct device *parent, struct device *self, void *aux)
/*
* Check that the configured console device is a wsdisplay.
*/
- if (cn_tab == &wsdisplay_cons) {
- /*
- * If we did not find and attach a Domain keyboard earlier,
- * claim the console keyboard.
- */
- if (hil_is_console == -1)
- hil_is_console = 1;
- } else {
+ if (cn_tab != &wsdisplay_cons)
hil_is_console = 0;
- }
hil_isr.isr_func = hil_intr;
hil_isr.isr_arg = sc;
@@ -104,7 +96,7 @@ hil_intio_attach(struct device *parent, struct device *self, void *aux)
printf(" ipl %d", hil_isr.isr_ipl);
- hil_attach(sc, hil_is_console);
+ hil_attach(sc, &hil_is_console);
intr_establish(&hil_isr, self->dv_xname);
startuphook_establish(hil_attach_deferred, sc);