While looking over the i8042prt code, what scared me a bit was that we're hapilly mixing STATUS_TIMEOUT and STATUS_IO_TIMEOUT. Note that NT_SUCCESS(STATUS_TIMEOUT) will return TRUE (!!!), while NT_SUCCESS(STATUS_IO_TIMEOUT) will return FALSE.
Take for example this loop in I8042BasicDetect:
Counter = 3; do { Status = I8042ReadDataWait(DevExt, &Value); } while ((Counter--) && (STATUS_TIMEOUT == Status));
If my reading of the code is correct, I8042ReadDataWait can either return STATUS_SUCCESS or STATUS_IO_TIMEOUT, it will never return the STATUS_TIMEOUT which is tested here.
I'd like to change all the STATUS_TIMEOUT occurences to STATUS_IO_TIMEOUT, I get the impression that a timeout is an error condition in i8042prt so we want NT_SUCCESS() to return FALSE if a timeout occurred. Anyone out there seeing this AllocConsole bug who would be willing to test?
Gé van Geldorp.