diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1998-07-08 08:54:38 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1998-07-08 08:54:38 +0000 |
| commit | e809645c27adf28c266fe2d7797affac4fc20eb8 (patch) | |
| tree | f8a8dc198eaf1277c74a1ee7d8d42a4400010463 | |
| parent | 5c59deba3c4434a506b23bf0036c5d99145db580 (diff) | |
Notes
| -rw-r--r-- | sys/pc98/pc98/syscons.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index cafeb1355a66..5598acbd5f72 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.88 1998/06/15 13:06:33 kato Exp $ + * $Id: syscons.c,v 1.89 1998/06/24 13:37:50 kato Exp $ */ #include "sc.h" @@ -623,6 +623,7 @@ sckbdprobe(int unit, int flags) int codeset; int c = -1; int m; + int res, id; sc_kbdc = kbdc_open(sc_port); #ifndef PC98 @@ -759,6 +760,17 @@ sckbdprobe(int unit, int flags) printf("sc%d: unable to enable the keyboard port and intr.\n", unit); goto fail; } + + /* Get the ID of the keyboard, if any */ + empty_kbd_buffer(sc_kbdc, 5); + res = send_kbd_command(sc_kbdc, KBDC_SEND_DEV_ID); + if (res == KBD_ACK) { + /* 10ms delay */ + DELAY(10000); + id = (read_kbd_data(sc_kbdc) << 8) | read_kbd_data(sc_kbdc); + if (bootverbose) + printf("sc%d: keyboard device ID: %04x\n", unit, id); + } kbdc_set_device_mask(sc_kbdc, m | KBD_KBD_CONTROL_BITS), kbdc_lock(sc_kbdc, FALSE); @@ -4897,7 +4909,14 @@ next_code: case SUSP: #if NAPM > 0 accents = 0; - apm_suspend(); + apm_suspend(PMST_SUSPEND); +#endif + break; + + case STBY: +#if NAPM > 0 + accents = 0; + apm_suspend(PMST_STANDBY); #endif break; |
