Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Attach a USB keyboard as console keyboard i...



details:   https://anonhg.NetBSD.org/src/rev/2a4bcf8dccf8
branches:  trunk
changeset: 580577:2a4bcf8dccf8
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Apr 29 20:11:01 2005 +0000

description:
Attach a USB keyboard as console keyboard if pckbc_cnattach() failed or
if there is no pckbc configured.  Previously only the latter cuased the
USB keyboard to be used.
This should make it more likely to get the USB keyboard as the console
on legacy free machines using the GENERIC config file.

diffstat:

 sys/arch/x86/x86/consinit.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r eb71faa3a8ef -r 2a4bcf8dccf8 sys/arch/x86/x86/consinit.c
--- a/sys/arch/x86/x86/consinit.c       Fri Apr 29 20:03:47 2005 +0000
+++ b/sys/arch/x86/x86/consinit.c       Fri Apr 29 20:11:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.4 2004/03/13 17:31:34 bjh21 Exp $       */
+/*     $NetBSD: consinit.c,v 1.5 2005/04/29 20:11:01 augustss Exp $    */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2004/03/13 17:31:34 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.5 2005/04/29 20:11:01 augustss Exp $");
 
 #include "opt_kgdb.h"
 
@@ -144,6 +144,7 @@
 {
        const struct btinfo_console *consinfo;
        static int initted;
+       int error;
 
        if (initted)
                return;
@@ -176,11 +177,14 @@
                if (0) goto dokbd; /* XXX stupid gcc */
 dokbd:
 #if (NPCKBC > 0)
-               pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP,
+               error = pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP,
                    PCKBC_KBD_SLOT);
+#else
+               error = EIO;
 #endif
-#if NPCKBC == 0 && NUKBD > 0
-               ukbd_cnattach();
+#if (NUKBD > 0)
+               if (error)
+                       ukbd_cnattach();
 #endif
                return;
        }



Home | Main Index | Thread Index | Old Index