Skip to content

ps2d: Use sleep rather than busy-waits for timeouts

Problem: On the HP Pavilion dv9700, Acer Aspire A515-54, and Dell Inspiron e1505 laptops, the PS/2 mouse initialization and self-test often take long enough to falsely reach the timeout condition from the busy-wait loop, resulting in the touchpad not working.

Solution: To ensure the timeout period is less dependent on CPU model and clock speed, the busy-wait loop is replaced with a sleep-wait loop, which allows 500 milliseconds before a timeout for a read or write. This change allows the touchpad to work consistently on all tested laptops.

Drawbacks: Using sleep results in somewhat higher latency for quick responses while polling, since it guarantees a wait until rescheduling.

Merge request reports

Loading