[PATCH] make ps2 mouse work ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux