summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-16 10:58:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-16 10:58:37 +0000
commit96e3273218d3ba0bfb9cc0cd2d7133fde2d2b8a3 (patch)
tree168dba9ee0debde2be26a19148e7c997725d4199 /sys/arch/i386/isa
parent8b2378a16bd14494c347a6adb2199965d6aec807 (diff)
pcvt/pccons too fast for some kbds; netbsd pr#2631; mike.long@analog.com
Diffstat (limited to 'sys/arch/i386/isa')
-rw-r--r--sys/arch/i386/isa/pccons.c7
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_hdr.h11
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index daf071830fe..43aad7f3fbd 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccons.c,v 1.19 1996/06/25 18:32:03 tholo Exp $ */
+/* $OpenBSD: pccons.c,v 1.20 1996/07/16 10:58:34 deraadt Exp $ */
/* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */
/*-
@@ -172,10 +172,15 @@ void pccnputc __P((dev_t, char));
int pccngetc __P((dev_t));
void pccnpollc __P((dev_t, int));
+/* wait 7+ us for keyboard controller; ~1.25us per inb() */
#define KBD_DELAY \
{ u_char x = inb(0x84); (void) x; } \
{ u_char x = inb(0x84); (void) x; } \
{ u_char x = inb(0x84); (void) x; } \
+ { u_char x = inb(0x84); (void) x; } \
+ { u_char x = inb(0x84); (void) x; } \
+ { u_char x = inb(0x84); (void) x; } \
+ { u_char x = inb(0x84); (void) x; } \
{ u_char x = inb(0x84); (void) x; }
static __inline int
diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
index c045b465a6b..960aa82c7d9 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_hdr.h,v 1.12 1996/06/16 13:54:01 deraadt Exp $ */
+/* $OpenBSD: pcvt_hdr.h,v 1.13 1996/07/16 10:58:36 deraadt Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -1398,6 +1398,11 @@ static __inline void vt_selattr(struct video_state *svsp)
{ volatile u_char x = inb(0x84); (void) &x;} \
{ volatile u_char x = inb(0x84); (void) &x;} \
{ volatile u_char x = inb(0x84); (void) &x;} \
+ { volatile u_char x = inb(0x84); (void) &x;} \
+ { volatile u_char x = inb(0x84); (void) &x;} \
+ { volatile u_char x = inb(0x84); (void) &x;} \
+ { volatile u_char x = inb(0x84); (void) &x;} \
+ { volatile u_char x = inb(0x84); (void) &x;} \
{ volatile u_char x = inb(0x84); (void) &x;}
#else /* PCVT_PORTIO_DELAY */
@@ -1405,9 +1410,9 @@ static __inline void vt_selattr(struct video_state *svsp)
/* producing delays for accesssing the */
/* keyboard controller */
#if PCVT_NETBSD > 9
-#define PCVT_KBD_DELAY() delay(7)
+#define PCVT_KBD_DELAY() delay(11)
#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
-#define PCVT_KBD_DELAY() DELAY(7)
+#define PCVT_KBD_DELAY() DELAY(11)
#endif
#endif /* PCVT_PORTIO_DELAY */