cfd5d30f74
MouseTx::handle() treated 0xFE (PS/2 RESEND) as an unknown response, causing mouse init to fail on hardware where the mouse requests a resend during the reset/command exchange. Now resends the current command byte when the mouse returns 0xFE, matching the PS/2 protocol.
14 lines
683 B
Diff
14 lines
683 B
Diff
--- a/drivers/input/ps2d/src/mouse.rs 2026-05-04 00:50:32.328708003 +0100
|
|
+++ b/drivers/input/ps2d/src/mouse.rs 2026-05-04 00:50:46.622536346 +0100
|
|
@@ -61,6 +61,10 @@
|
|
if data == 0xFA {
|
|
self.write_i += 1;
|
|
self.try_write(ps2)?;
|
|
+ } else if data == 0xFE {
|
|
+ // PS/2 RESEND: mouse asks us to resend the current command byte
|
|
+ log::debug!("mouse requested resend for byte {:02X}, resending", self.write.get(self.write_i).unwrap_or(&0));
|
|
+ self.try_write(ps2)?;
|
|
} else {
|
|
log::error!("unknown mouse response {:02X}", data);
|
|
return Err(());
|