From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Marc Waeckerlin <Marc.Waeckerlin@siemens.com>
Cc: t.hirsch@web.de, laflipas@telefonica.net, linux-kernel@vger.kernel.org
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem
Date: Tue, 29 Jun 2004 12:53:08 -0500 [thread overview]
Message-ID: <200406291253.10542.dtor_core@ameritech.net> (raw)
In-Reply-To: <200406291808.08186.Marc.Waeckerlin@siemens.com>
On Tuesday 29 June 2004 11:08 am, Marc Waeckerlin wrote:
> Am Dienstag, 29. Juni 2004 16.32 schrieben Sie unter "Re: Continue: psmouse.c
> - synaptics touchpad driver sync problem":
> > Marc Waeckerlin wrote:
> > > Am Freitag, 25. Juni 2004 16.02 schrieb Dmitry Torokhov unter "Re:
> > > Continue:
> > > > Anyway, I also have a tiy patch to try out (attached, not tested/
> > > > not compiled). Please let me know how ifit makes any improvement.
> > > No, unfortunately no improvement at all.
> >
> > Yeah, I figure there would not be any. Still I have a nagging suspicion
> > that the mux gets confused and I would like to see the full dmesg with
> > this patch applied and DEBUG enabled.
>
> "dmesg" won't help, because the buffer gets filled too quickly. I send you the
> part from /var/log/messages since last boot. File size is 386KB, so I send it
> to you directly, not through the mailing list. You are free to forward it, if
> you think it's useful for others.
>
Ok, this is much better, it confirms my suspicions... It seems that your
keyboard controller gets confused where the data is coming from. Please
try the patch below (against vanilla 2.6.7, not compiled/tested).
>
> > Is there any change of getting it?
>
> What do you mean by this?
>
Nevermind ;)
--
Dmitry
--- 2.6.7/drivers/input/serio/i8042.c 2004-06-22 01:23:15.000000000 -0500
+++ linux-2.6.7/drivers/input/serio/i8042.c 2004-06-29 12:48:21.000000000 -0500
@@ -400,19 +400,35 @@
goto out;
}
- dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
- ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
-
if (i8042_mux_values[0].exists && (str & I8042_STR_AUXDATA)) {
+ static unsigned long last_transmit;
+ static unsigned char last_str;
+ dfl = 0;
if (str & I8042_STR_MUXERR) {
+ printk(KERN_INFO "i8042.c: MUX reports error condition %02x, data is %02x\n", str, data);
switch (data) {
+ default:
+/*
+ * When MUXERR condition is signalled the data register can only contain
+ * 0xfd, 0xfe or 0xff if implementation follows the spec. Unfortunately
+ * it is not always the case. Some KBC just get confused which port the
+ * data came from and signal error leaving the data intact. They _do not_
+ * revert to legacy mode (actually I've never seen KBC reverting to legacy
+ * mode yet, when we see one we'll add proper handling).
+ * Anyway, we will assume that the data came from the same serio last byte
+ * was transmitted (if transmission happened not too long ago).
+ */
+ if (time_before(jiffies, last_transmit + HZ/10)) {
+ str = last_str;
+ break;
+ }
+ /* fall through - report timeout */
case 0xfd:
- case 0xfe: dfl = SERIO_TIMEOUT; break;
- case 0xff: dfl = SERIO_PARITY; break;
+ case 0xfe: dfl = SERIO_TIMEOUT; data = 0xfe; break;
+ case 0xff: dfl = SERIO_PARITY; data = 0xfe; break;
}
- data = 0xfe;
- } else dfl = 0;
+ }
dbg("%02x <- i8042 (interrupt, aux%d, %d%s%s)",
data, (str >> 6), irq,
@@ -421,9 +437,14 @@
serio_interrupt(i8042_mux_port + ((str >> 6) & 3), data, dfl, regs);
+ last_str = str;
+ last_transmit = jiffies;
goto irq_ret;
}
+ dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
+ ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
+
dbg("%02x <- i8042 (interrupt, %s, %d%s%s)",
data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq,
dfl & SERIO_PARITY ? ", bad parity" : "",
next prev parent reply other threads:[~2004-06-29 17:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 14:32 Continue: psmouse.c - synaptics touchpad driver sync problem Dmitry Torokhov
[not found] ` <200406291808.08186.Marc.Waeckerlin@siemens.com>
2004-06-29 17:53 ` Dmitry Torokhov [this message]
2004-06-30 6:02 ` Dmitry Torokhov
2004-06-30 8:25 ` Vojtech Pavlik
2004-06-30 8:45 ` Vojtech Pavlik
2004-06-30 12:58 ` Marc Waeckerlin
-- strict thread matches above, loose matches on Subject: below --
2004-07-01 13:54 Dmitry Torokhov
2004-07-02 15:10 ` Marc Waeckerlin
2004-06-30 13:23 Dmitry Torokhov
2004-07-01 12:34 ` Marc Waeckerlin
2004-07-01 13:03 ` Dmitry Torokhov
2004-07-01 15:38 ` Marc Waeckerlin
2004-07-06 7:27 ` Marc Waeckerlin
2004-07-01 12:55 ` Marc Waeckerlin
2004-06-25 14:02 Dmitry Torokhov
2004-06-29 14:23 ` Marc Waeckerlin
2004-06-24 16:11 Dmitry Torokhov
2004-06-23 15:59 Dmitry Torokhov
2004-06-24 9:35 ` Marc Waeckerlin
2004-06-24 15:19 ` Marc Waeckerlin
2004-06-22 7:52 Marc Waeckerlin
2004-06-22 13:07 ` Dmitry Torokhov
2004-06-23 9:34 ` Marc Waeckerlin
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=200406291253.10542.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=Marc.Waeckerlin@siemens.com \
--cc=laflipas@telefonica.net \
--cc=linux-kernel@vger.kernel.org \
--cc=t.hirsch@web.de \
/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