summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-09-28 19:02:25 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-09-28 19:02:25 +0200
commit15afb9d00b50c5d362ffcb387d7e6e4054192eff (patch)
treea10cb1e3ae57ba76e4aef05c7dcd34165a5c9a5b
parentdbb0f46e583d54bdd63ace2d1a8e74e8a8b89a84 (diff)
apply ps2mouse corruption fix to omap
the omap ps2mouse driver is currently unused, but in case of being finished at some point, apply the fix from the pc driver.
-rw-r--r--sys/src/9/omap/mouse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/9/omap/mouse.c b/sys/src/9/omap/mouse.c
index f0f62c8a1..acf49f530 100644
--- a/sys/src/9/omap/mouse.c
+++ b/sys/src/9/omap/mouse.c
@@ -107,7 +107,7 @@ ps2mouseputc(int c, int shift)
}
msg[nb] = c;
- if(++nb == packetsize){
+ if(++nb >= packetsize){
nb = 0;
if(msg[0] & 0x10)
msg[1] |= 0xFF00;
@@ -142,13 +142,13 @@ ps2mouse(void)
if(mousetype == MousePS2)
return;
-// i8042auxenable(ps2mouseputc);
-// i8042auxcmd(0xEA); // TODO
-// i8042auxcmd(0xF4);
-
mousetype = MousePS2;
packetsize = 3;
mousehwaccel = 1;
+
+// i8042auxenable(ps2mouseputc);
+// i8042auxcmd(0xEA); // TODO
+// i8042auxcmd(0xF4);
}
/*