summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/syscons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa/syscons.c')
-rw-r--r--sys/i386/isa/syscons.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index e38ec37..d326ebe 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.182 1996/10/26 20:16:58 sos Exp $
+ * $Id: syscons.c,v 1.183 1996/11/04 21:01:08 sos Exp $
*/
#include "sc.h"
@@ -295,6 +295,7 @@ static int
scprobe(struct isa_device *dev)
{
int i, j, retries = 5;
+ int xt_keyboard = 0;
u_char val;
/* Enable interrupts and keyboard controller */
@@ -341,13 +342,23 @@ gotack:
goto fail;
}
}
+ /*
+ * Allow us to set the XT_KEYBD flag in UserConfig so that keyboards
+ * such as those on the IBM ThinkPad laptop computers can be used
+ * with the standard console driver.
+ */
+ if ( dev->id_flags & XT_KEYBD )
+ xt_keyboard = 1;
#ifdef XT_KEYBOARD
- kbd_wait();
- outb(KB_DATA, 0xF0);
- kbd_wait();
- outb(KB_DATA, 1);
- kbd_wait();
-#endif /* XT_KEYBOARD */
+ xt_keyboard = 1;
+#endif
+ if ( xt_keyboard ) {
+ kbd_wait();
+ outb(KB_DATA, 0xF0);
+ kbd_wait();
+ outb(KB_DATA, 1);
+ kbd_wait();
+ }
succeed:
return (IO_KBDSIZE);
OpenPOWER on IntegriCloud