Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] make ps2 mouse work ...
@ 2004-06-16  2:10 Jun Sun
  2004-06-16  3:56 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Jun Sun @ 2004-06-16  2:10 UTC (permalink / raw)
  To: linux-kernel, linux-mips; +Cc: jsun

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]


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

[-- Attachment #2: 040615.a-psmouse-cmdcnt-volatile.patch --]
[-- Type: text/plain, Size: 456 bytes --]

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;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-16 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-16  2:10 [PATCH] make ps2 mouse work Jun Sun
2004-06-16  3:56 ` Andrew Morton
2004-06-16  3:56   ` Andrew Morton
2004-06-16 12:11   ` Vojtech Pavlik
2004-06-16 17:04     ` Jun Sun
2004-06-16 17:58       ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox