summaryrefslogtreecommitdiffstats
path: root/sys/dev/kbd
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-12-15 23:00:47 +0000
committerjhb <jhb@FreeBSD.org>2004-12-15 23:00:47 +0000
commit5d0bf7c3654da3ef64e9a28670e3d1e48ee04574 (patch)
treec550f8e94b863608142496a061ce67d57395cc75 /sys/dev/kbd
parent7c0944d56c2504d71b846fe79d625028c80cdfd8 (diff)
downloadFreeBSD-src-5d0bf7c3654da3ef64e9a28670e3d1e48ee04574.zip
FreeBSD-src-5d0bf7c3654da3ef64e9a28670e3d1e48ee04574.tar.gz
Add a new flag to the atkbd(4) driver to disable testing the keyboard
port during the device probe as this can cause hangs on some machines, specifically Compaq R3000Z series amd64 laptops. The flag is bit 3, or 0x8. PR: amd64/67745 Reported by: Neil Winterbauer newntrbr at ucla dot edu, many others Tested by: ade, astrodog at gmail dot com, many others MFC after: 1 week
Diffstat (limited to 'sys/dev/kbd')
-rw-r--r--sys/dev/kbd/atkbd.c3
-rw-r--r--sys/dev/kbd/atkbdreg.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/kbd/atkbd.c b/sys/dev/kbd/atkbd.c
index 5d6822e..1335bc6 100644
--- a/sys/dev/kbd/atkbd.c
+++ b/sys/dev/kbd/atkbd.c
@@ -1117,7 +1117,8 @@ probe_keyboard(KBDC kbdc, int flags)
* to set the command byte to particular values.
*/
test_controller(kbdc);
- test_kbd_port(kbdc);
+ if (!(flags & KB_CONF_NO_PROBE_TEST))
+ test_kbd_port(kbdc);
err = get_kbd_echo(kbdc);
diff --git a/sys/dev/kbd/atkbdreg.h b/sys/dev/kbd/atkbdreg.h
index 4ae93e3..f60e48c 100644
--- a/sys/dev/kbd/atkbdreg.h
+++ b/sys/dev/kbd/atkbdreg.h
@@ -35,6 +35,7 @@
#define KB_CONF_FAIL_IF_NO_KBD (1 << 0) /* don't install if no kbd is found */
#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */
#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */
+#define KB_CONF_NO_PROBE_TEST (1 << 3) /* don't test keyboard during probe */
#ifdef _KERNEL
OpenPOWER on IntegriCloud