When the keyboard type is unknwon, don't attach both ADB and USB, as the

kernel will panic if an USB keyboard is plugged later.

Of course there will be a problem on a desktop machine with an USB attached
keyboard, but that cannot be fixed without access to such a machine..
This commit is contained in:
manu 2004-07-03 16:24:57 +00:00
parent ee13f974b7
commit e317692907
1 changed files with 4 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.132 2004/06/20 21:02:07 manu Exp $ */
/* $NetBSD: machdep.c,v 1.133 2004/07/03 16:24:57 manu Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.132 2004/06/20 21:02:07 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.133 2004/07/03 16:24:57 manu Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@ -526,7 +526,6 @@ cninit_kd()
#if NAKBD > 0
memset(name, 0, sizeof(name));
OF_getprop(OF_parent(node), "name", name, sizeof(name));
printf("OF_getprop: name = %s\n", name);
if (strcmp(name, "adb") == 0) {
printf("console keyboard type: ADB\n");
akbd_cnattach();
@ -573,17 +572,14 @@ cninit_kd()
/*
* stdin is /pseudo-hid/keyboard. There is no
* `adb-kbd-ihandle or `usb-kbd-ihandles methods
* available. Try attaching anything.
* available. Try attaching as ADB.
*
* XXX This must be called before pmap_bootstrap().
*/
if (strcmp(name, "pseudo-hid") == 0) {
printf("console keyboard type: unknown\n");
printf("console keyboard type: unknown, assuming ADB\n");
#if NAKBD > 0
akbd_cnattach();
#endif
#if NUKBD > 0
ukbd_cnattach();
#endif
goto kbd_found;
}