Attached is a re-write of my previous patch that changes i8042_flush to
be timeout based rather than buffer size based.... Which turns out to
not be significantly different, since the udelay in the loop is the
basis for the timing. I created the I8042_FLUSH_TIMEOUT delay, and used
it similarly to the I8042_CTL_TIMEOUT define; however the flush timeout
is much shorter.
I was tempted to make the "50" that is hard coded into the udelays into
a define to make the timeout defines more readable, but it seemed like
unnecessary refactoring that is outside of the scope of this change.
As a tangentially related aside, I found my bug in the device model that
was causing the queue to be full so early as well. So the keyboard is
working for me even without this patch now.