summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-26 07:09:13 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-26 07:09:13 +0000
commitc2f1750366832665344a4b8b936d3a8e85e86100 (patch)
tree8979d65d6ce6a60c4224d1b29c074feae8b3956d /sys
parent918eb9b57be5346d531092a4fbb13dbe03b2c31f (diff)
If pckbc_cnattach fails, try to usb attach. Helps on some legacy-free PCs
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/wscons_machdep.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/wscons_machdep.c b/sys/arch/i386/i386/wscons_machdep.c
index 8d08713cefe..7dfcd9ed95e 100644
--- a/sys/arch/i386/i386/wscons_machdep.c
+++ b/sys/arch/i386/i386/wscons_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscons_machdep.c,v 1.5 2001/03/14 18:24:10 todd Exp $ */
+/* $OpenBSD: wscons_machdep.c,v 1.6 2001/07/26 07:09:12 csapuntz Exp $ */
/*
* Copyright (c) 2001 Aaron Campbell
@@ -76,6 +76,9 @@
#if (NPCKBD > 0) || (NUKBD > 0)
#include <dev/wscons/wskbdvar.h>
#endif
+#if (NUKBD > 0)
+#include <dev/usb/ukbdvar.h>
+#endif
#include "pc.h"
#if (NPC > 0)
@@ -129,7 +132,12 @@ wscninit(cp)
if (0) goto dokbd; /* XXX stupid gcc */
dokbd:
#if (NPCKBC > 0)
- pckbc_cnattach(I386_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT);
+ if (!pckbc_cnattach(I386_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT))
+ return;
+#endif
+#if (NUKBD > 0)
+ if (!ukbd_cnattach())
+ return;
#endif
#endif /* VGA | EGA | PCDISPLAY */
return;