diff options
author | kato <kato@FreeBSD.org> | 1997-06-30 10:00:47 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-06-30 10:00:47 +0000 |
commit | 2dca27a4d2f732358f98dfbd392ad37ad0f8ac1f (patch) | |
tree | c10e0e9a2303ae75e4fd752827e60bcae3738431 /sys | |
parent | ff5923046a2d78277908b3c56074e9d192c29a14 (diff) | |
download | FreeBSD-src-2dca27a4d2f732358f98dfbd392ad37ad0f8ac1f.zip FreeBSD-src-2dca27a4d2f732358f98dfbd392ad37ad0f8ac1f.tar.gz |
Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.219
and 1.30, respectively.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/pc98/syscons.c | 56 | ||||
-rw-r--r-- | sys/pc98/pc98/syscons.h | 3 |
2 files changed, 37 insertions, 22 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index 922ae0c..ea6dedf 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/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.40 1997/05/17 11:52:26 kato Exp $ + * $Id: syscons.c,v 1.41 1997/06/23 09:31:03 kato Exp $ */ #include "sc.h" @@ -598,26 +598,40 @@ sckbdprobe(int unit, int flags) printf("sc%d: keyboard scancode set %d\n", unit, codeset); #endif /* DETECT_XT_KEYBOARD */ - /* reset keyboard hardware */ - if (!reset_kbd(sc_kbdc)) { - /* KEYBOARD ERROR - * Keyboard reset may fail either because the keyboard doen't exist, - * or because the keyboard doesn't pass the self-test, or the keyboard - * controller on the motherboard and the keyboard somehow fail to - * shake hands. It is just possible, particularly in the last case, - * that the keyoard controller may be left in a hung state. - * test_controller() and test_kbd_port() appear to bring the keyboard - * controller back (I don't know why and how, though.) - */ - empty_both_buffers(sc_kbdc, 10); - test_controller(sc_kbdc); - test_kbd_port(sc_kbdc); - /* We could disable the keyboard port and interrupt... but, - * the keyboard may still exist (see above). - */ - if (bootverbose) - printf("sc%d: failed to reset the keyboard.\n", unit); - goto fail; + if (flags & KBD_NORESET) { + write_kbd_command(sc_kbdc, KBDC_ECHO); + if (read_kbd_data(sc_kbdc) != KBD_ECHO) { + empty_both_buffers(sc_kbdc, 10); + test_controller(sc_kbdc); + test_kbd_port(sc_kbdc); + if (bootverbose) + printf("sc%d: failed to get response from the keyboard.\n", + unit); + goto fail; + } + } else { + /* reset keyboard hardware */ + if (!reset_kbd(sc_kbdc)) { + /* KEYBOARD ERROR + * Keyboard reset may fail either because the keyboard doen't + * exist, or because the keyboard doesn't pass the self-test, + * or the keyboard controller on the motherboard and the keyboard + * somehow fail to shake hands. It is just possible, particularly + * in the last case, that the keyoard controller may be left + * in a hung state. test_controller() and test_kbd_port() appear + * to bring the keyboard controller back (I don't know why and + * how, though.) + */ + empty_both_buffers(sc_kbdc, 10); + test_controller(sc_kbdc); + test_kbd_port(sc_kbdc); + /* We could disable the keyboard port and interrupt... but, + * the keyboard may still exist (see above). + */ + if (bootverbose) + printf("sc%d: failed to reset the keyboard.\n", unit); + goto fail; + } } /* diff --git a/sys/pc98/pc98/syscons.h b/sys/pc98/pc98/syscons.h index b2e7ccc..cfb2b70 100644 --- a/sys/pc98/pc98/syscons.h +++ b/sys/pc98/pc98/syscons.h @@ -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.h,v 1.12 1997/02/22 09:43:51 peter Exp $ + * $Id: syscons.h,v 1.13 1997/05/17 11:52:26 kato Exp $ */ #ifndef _PC98_PC98_SYSCONS_H_ @@ -71,6 +71,7 @@ #define CHAR_CURSOR 0x00004 #define DETECT_KBD 0x00008 #define XT_KEYBD 0x00010 +#define KBD_NORESET 0x00020 /* attribute flags */ #define NORMAL_ATTR 0x00 |