diff options
author | 2005-08-06 19:49:19 +0000 | |
---|---|---|
committer | 2005-08-06 19:49:19 +0000 | |
commit | 1f1dd41e99235958150850aed63fa3ba23c779fa (patch) | |
tree | 63c9f4e567d6d6354f5cd1642c534ff4d8a564d8 | |
parent | tell people that atexit is bad; ok jmc (diff) | |
download | wireguard-openbsd-1f1dd41e99235958150850aed63fa3ba23c779fa.tar.xz wireguard-openbsd-1f1dd41e99235958150850aed63fa3ba23c779fa.zip |
while checking for an aux port, if we timeout waiting for our test
data to echo back, send KBC_AUXWRITE and send the test again
required to find the aux port on the oqo model 01
ok mickey@ and miod@
-rw-r--r-- | sys/dev/ic/pckbc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index 60fab5c4b94..ae82e0c34d5 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.9 2004/11/02 21:21:00 miod Exp $ */ +/* $OpenBSD: pckbc.c,v 1.10 2005/08/06 19:49:19 jcs Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -355,6 +355,18 @@ pckbc_attach(sc) } bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */ res = pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_AUX_SLOT, 1); + if (res == -1) { + /* Read of aux echo timed out, try again */ + if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXWRITE)) + goto nomouse; + if (!pckbc_wait_output(iot, ioh_c)) + goto nomouse; + bus_space_write_1(iot, ioh_d, 0, 0x5a); + res = pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_AUX_SLOT, 1); +#ifdef PCKBCDEBUG + printf("kbc: aux echo: %x\n", res); +#endif + } if (res != -1) { /* * In most cases, the 0x5a gets echoed. |