From: Jun Sun <jsun@mvista.com>
To: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Cc: jsun@mvista.com
Subject: [PATCH] make ps2 mouse work ...
Date: Tue, 15 Jun 2004 19:10:23 -0700 [thread overview]
Message-ID: <20040615191023.G28403@mvista.com> (raw)
[-- 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;
next reply other threads:[~2004-06-16 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 2:10 Jun Sun [this message]
2004-06-16 3:56 ` [PATCH] make ps2 mouse work 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040615191023.G28403@mvista.com \
--to=jsun@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox