[PATCH] make ps2 mouse work ...

From: Jun Sun
Date: Tue Jun 15 2004 - 21:11:36 EST



I found this problem on a MIPS machine. The problem is
likely to happen on other register-rich RISC arches too.

cmdcnt needs to be volatile since it is modified by
irq routine and read by normal process context.

Jun
diff -Nru linux/drivers/input/mouse/psmouse.h.orig linux/drivers/input/mouse/psmouse.h
--- linux/drivers/input/mouse/psmouse.h.orig 2004-04-16 15:28:47.000000000 -0700
+++ linux/drivers/input/mouse/psmouse.h 2004-06-15 18:51:53.000000000 -0700
@@ -40,7 +40,7 @@
char *name;
unsigned char cmdbuf[8];
unsigned char packet[8];
- unsigned char cmdcnt;
+ volatile unsigned char cmdcnt;
unsigned char pktcnt;
unsigned char type;
unsigned char model;