From 7ca67a6885c324da4180fdc2fa8aa6a5e93fd81e Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Thu, 7 Apr 2005 18:18:17 +0000 Subject: [PATCH] Make previous commit actually working by replacing TUNABLE_INT() with TUNABLE_INT_FETCH(). Apparently keyboard init is performed earlier in the boot process than fetching all static tunables. MFC after: 1 day --- sys/dev/atkbdc/atkbdc.c | 20 ++++++++++---------- sys/dev/kbd/atkbdc.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index 0e1fdeaa0d07..08fa768462b9 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -942,16 +942,6 @@ 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) @@ -959,7 +949,17 @@ test_kbd_port(KBDC p) int retry = KBD_MAXRETRY; int again = KBD_MAXWAIT; int c = -1; + int broken_kit_cmd = 0; + /* + * 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. + */ + TUNABLE_INT_FETCH("hw.atkbdc.broken_kit_cmd", &broken_kit_cmd); if (broken_kit_cmd != 0) return 0; diff --git a/sys/dev/kbd/atkbdc.c b/sys/dev/kbd/atkbdc.c index 0e1fdeaa0d07..08fa768462b9 100644 --- a/sys/dev/kbd/atkbdc.c +++ b/sys/dev/kbd/atkbdc.c @@ -942,16 +942,6 @@ 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) @@ -959,7 +949,17 @@ test_kbd_port(KBDC p) int retry = KBD_MAXRETRY; int again = KBD_MAXWAIT; int c = -1; + int broken_kit_cmd = 0; + /* + * 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. + */ + TUNABLE_INT_FETCH("hw.atkbdc.broken_kit_cmd", &broken_kit_cmd); if (broken_kit_cmd != 0) return 0;