fix: handle PS/2 mouse RESEND (0xFE) response during init
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.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
--- 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(());
|
||||
@@ -0,0 +1 @@
|
||||
../../../local/patches/base/P3-ps2d-mouse-resend.patch
|
||||
@@ -25,6 +25,7 @@ patches = [
|
||||
"P9-fix-so-pecred.patch",
|
||||
"P3-inputd-keymap-bridge.patch",
|
||||
"P3-ps2d-led-feedback.patch",
|
||||
"P3-ps2d-mouse-resend.patch",
|
||||
"P3-usbhidd-hardening.patch",
|
||||
"P3-init-colored-output.patch",
|
||||
"P4-logd-persistent-logging.patch",
|
||||
|
||||
Reference in New Issue
Block a user