diff options
Diffstat (limited to 'sys/dev/kbd/atkbdc.c')
-rw-r--r-- | sys/dev/kbd/atkbdc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/kbd/atkbdc.c b/sys/dev/kbd/atkbdc.c index 7fc2325..0e1fdea 100644 --- a/sys/dev/kbd/atkbdc.c +++ b/sys/dev/kbd/atkbdc.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> +#include <sys/kernel.h> #include <sys/malloc.h> #include <sys/syslog.h> #include <machine/bus_pio.h> @@ -941,6 +942,17 @@ test_controller(KBDC p) return (c == KBD_DIAG_DONE); } +/* + * Provide a way to disable using Keyboard Interface Test command, which may + * cause problems with some non-compliant hardware, resulting in machine + * being powered down early in the boot process. + * + * Particularly it's known that HP ZV5000 and Compaq R3000Z notebooks are + * affected. + */ +static int broken_kit_cmd = 0; +TUNABLE_INT("hw.atkbdc.broken_kit_cmd", &broken_kit_cmd); + int test_kbd_port(KBDC p) { @@ -948,6 +960,9 @@ test_kbd_port(KBDC p) int again = KBD_MAXWAIT; int c = -1; + if (broken_kit_cmd != 0) + return 0; + while (retry-- > 0) { empty_both_buffers(p, 10); if (write_controller_command(p, KBDC_TEST_KBD_PORT)) |