]> xenbits.xensource.com Git - seabios.git/commit
ps2: Don't wait 100ms to discard possible extra reset receive byte
authorKevin O'Connor <kevin@koconnor.net>
Wed, 22 Jul 2015 18:32:28 +0000 (14:32 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 22 Jul 2015 18:32:28 +0000 (14:32 -0400)
commit4ce5d20799ed25f1cf7666e11334d72e3ddb5749
treee47dc0a791f560f9885ca586250590d1a0b87277
parent8b9942fa3368139b089dc3fea0549cc3282b5c12
ps2: Don't wait 100ms to discard possible extra reset receive byte

The existing PS2 port code waits 100ms to see if the device attached
to the keyboard port responds to a reset command with two bytes
(instead of the normal one byte).  If an extra byte is received, it is
discarded.

Receiving two bytes would be unusual and waiting to check for that
event is unnecessary because the next command in the keyboard init
sequence already seamlessly discards any extra bytes in the command
queue.

This patch eliminates the 100ms wait, which notably reduces the
SeaBIOS boot time on QEMU.  This patch also forces PS2 mice to always
respond with two bytes during a reset sequence (instead of just one
byte), which is a good sanity check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/ps2port.c
src/hw/ps2port.h