Provide a new tunable hw.atkbdc.broken_kit_cmd, which if set to 1
instructs the driver to avoid using Keyboard Interface Test command. This command causes problems with some non-compliant hardware, resulting in machine being abruptly powered down early in the boot process. Particularly it's known that HP ZV5000 and Compaq R3000Z notebooks are affected by this problem. Due to popularity of those models this patch is good MFC5.4 candidate. PR: 67745 Submitted by: Jung-uk Kim jkim at niksun.com MFC after: 1 days
This commit is contained in:
parent
ebb3a9b55b
commit
80da76bc50
@ -42,6 +42,13 @@ In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.atkbdc.0.at="isa"
|
||||
.Cd hint.atkbdc.0.port="0x060"
|
||||
.Pp
|
||||
The following tunables are settable from the loader:
|
||||
.Bl -ohang
|
||||
.It Va hw.atkbdc.broken_kit_cmd
|
||||
set to 1 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.
|
||||
.Sh DESCRIPTION
|
||||
The keyboard controller
|
||||
.Nm
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user