diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-07-21 20:10:18 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-07-21 20:10:18 +0000 |
commit | deca899360d6c667ccc59a8fee08872372e99938 (patch) | |
tree | 93a54fef00f99d01e78f68c40d238b8c35ac4e04 /sys/dev/ic | |
parent | 6a17c06747a3930dd8437cd0058358d8ef035295 (diff) |
Disable the heuristics for legacy free systems if pckbc flags are set to 1
in UKC; found the hard way by jakemsr@ on an old Tecra laptop.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/pckbc.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/pckbcvar.h | 10 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index fe9bebca7e1..8ec830ff8e1 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.21 2010/01/12 20:31:22 drahn Exp $ */ +/* $OpenBSD: pckbc.c,v 1.22 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -285,8 +285,9 @@ pckbc_attach_slot(sc, slot) } void -pckbc_attach(sc) +pckbc_attach(sc, flags) struct pckbc_softc *sc; + int flags; { struct pckbc_internal *t; bus_space_tag_t iot; @@ -348,8 +349,8 @@ pckbc_attach(sc) haskbd = 1; } #endif /* 0 */ - if (haskbd == 0) { #if defined(__i386__) || defined(__amd64__) + if (haskbd == 0 && !ISSET(flags, PCKBCF_FORCE_KEYBOARD_PRESENT)) { /* * If there is no keyboard present, yet we are the console, * we might be on a legacy-free PC where the PS/2 emulated @@ -365,8 +366,8 @@ pckbc_attach(sc) pckbc_console = 0; wscn_input_init(1); } -#endif } +#endif /* * Check aux port ok. diff --git a/sys/dev/ic/pckbcvar.h b/sys/dev/ic/pckbcvar.h index 947f542ce3d..ec8cf9bff4d 100644 --- a/sys/dev/ic/pckbcvar.h +++ b/sys/dev/ic/pckbcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbcvar.h,v 1.7 2008/07/29 04:20:37 miod Exp $ */ +/* $OpenBSD: pckbcvar.h,v 1.8 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbcvar.h,v 1.4 2000/06/09 04:58:35 soda Exp $ */ /* @@ -105,10 +105,16 @@ void pckbc_set_poll(pckbc_tag_t, pckbc_slot_t, int); int pckbc_xt_translation(pckbc_tag_t, pckbc_slot_t, int); void pckbc_slot_enable(pckbc_tag_t, pckbc_slot_t, int); -void pckbc_attach(struct pckbc_softc *); +void pckbc_attach(struct pckbc_softc *, int); int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t, pckbc_slot_t, int); int pckbc_is_console(bus_space_tag_t, bus_addr_t); int pckbcintr(void *); +/* + * Device configuration flags (cf_flags). + */ + +#define PCKBCF_FORCE_KEYBOARD_PRESENT 0x0001 + #endif /* _DEV_IC_PCKBCVAR_H_ */ |