From: Gunther.Mayer@t-online.de (Gunther Mayer)
To: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Cc: Vojtech Pavlik <vojtech@suse.cz>, linas@linas.org
Subject: Re: mouse problems in 2.4.2 -> lost byte -> Patch(2.4.3)!
Date: Sun, 08 Apr 2001 22:23:09 +0200 [thread overview]
Message-ID: <3AD0C8AD.1A4D7D12@t-online.de> (raw)
In-Reply-To: <20010328235913.A6994@suse.cz> <20010328231933.53ECF1B7A5@backlot.linas.org> <20010329074551.A361@suse.cz>
[-- Attachment #1: Type: text/plain, Size: 3102 bytes --]
Original Problem: PS/2 mouse pointer goes upper right corner and stays there.
Diagnosis: one byte was lost and this is fatal for the mouse driver.
Various people wrote:
>
> On Wed, Mar 28, 2001 at 05:19:33PM -0600, linas@linas.org wrote:
..
> > > > > > > I am experiencing debilitating intermittent mouse problems & was about
> > > > > >
> > > > > > This is easily explained: some byte of the mouse protocol was lost.
>
> Plus, it's very likely the new PS/2 code will break on some systems that
> have not-so-compatible i8042 chips, so it is really something that can't
Losing bytes on psaux is a bug!
We must first understand, how bytes can be lost (most probable first):
- transmission error on the line can easily happen in noisy environments
and is _not_ handled correctly by linux (i.e. should do RESEND)
- 0xAA is always handled as reconnect, if the mouse generates this byte,
Linux will de-sync the mouse driver
- Mouse is defective or keyboard controller defective
- An error in the linux kbd/mouse driver (e.g. triggered by X11<->console switching)
This patch printk's necessary information on the first 2 cases and
should be applied to the stable kernel, as this will help to resolve a severe bug !
Regards, Gunther
P.S.
These messages can be generated:
Apr 8 21:49:23 linux kernel: psaux: reconnect 0xAA detected
Apr 8 21:49:42 linux kernel: pc_keyb: mouse error (0x75), byte ignored(ff).
Apr 8 21:49:43 linux kernel: psaux: reconnect 0xAA detected
--- linux-2.4.3-orig/drivers/char/pc_keyb.c Wed Apr 4 19:46:42 2001
+++ linux/drivers/char/pc_keyb.c Sun Apr 8 21:45:37 2001
@@ -404,6 +404,11 @@
mouse_reply_expected = 0;
}
else if(scancode == AUX_RECONNECT){
+ // Under normal operation most mice don't generate 0xAA.
+ // But, Other devices might be unusable with this policy.
+ // (My mouse easily generates 0xAAs on rapid movements,
+ // when set to 10 samples/sec.)
+ printk("psaux: reconnect detected(0xaa), sending AUX_ENABLE.\n");
queue->head = queue->tail = 0; /* Flush input queue */
__aux_write_ack(AUX_ENABLE_DEV); /* ping the mouse :) */
return;
@@ -420,6 +425,9 @@
kill_fasync(&queue->fasync, SIGIO, POLL_IN);
wake_up_interruptible(&queue->proc_list);
}
+ else
+ // 2K buffer is enough for about 10 sec under normal operations, here.
+ printk("psaux: buffer overflow, byte dropped.\n");
}
#endif
}
@@ -465,6 +473,11 @@
else
handle_keyboard_event(scancode);
}
+ else
+ // Fixme: Ignoring bytes will de-sync mouse protocol.
+ printk("pc_keyb: %s error (0x%02x), byte ignored(%02x).\n",
+ (status & KBD_STAT_MOUSE_OBF)?"mouse":"kbd",status,scancode);
+
status = kbd_read_status();
}
[-- Attachment #2: gmdiff-lx243-psaux-error-reporting --]
[-- Type: application/octet-stream, Size: 1218 bytes --]
--- linux-2.4.3-orig/drivers/char/pc_keyb.c Wed Apr 4 19:46:42 2001
+++ linux/drivers/char/pc_keyb.c Sun Apr 8 21:45:37 2001
@@ -404,6 +404,11 @@
mouse_reply_expected = 0;
}
else if(scancode == AUX_RECONNECT){
+ // Under normal operation most mice don't generate 0xAA.
+ // But, Other devices might be unusable with this policy.
+ // (My mouse easily generates 0xAAs on rapid movements,
+ // when set to 10 samples/sec.)
+ printk("psaux: reconnect detected(0xaa), sending AUX_ENABLE.\n");
queue->head = queue->tail = 0; /* Flush input queue */
__aux_write_ack(AUX_ENABLE_DEV); /* ping the mouse :) */
return;
@@ -420,6 +425,9 @@
kill_fasync(&queue->fasync, SIGIO, POLL_IN);
wake_up_interruptible(&queue->proc_list);
}
+ else
+ // 2K buffer is enough for about 10 sec under normal operations, here.
+ printk("psaux: buffer overflow, byte dropped.\n");
}
#endif
}
@@ -465,6 +473,11 @@
else
handle_keyboard_event(scancode);
}
+ else
+ // Fixme: Ignoring bytes will de-sync mouse protocol.
+ printk("pc_keyb: %s error (0x%02x), byte ignored(%02x).\n",
+ (status & KBD_STAT_MOUSE_OBF)?"mouse":"kbd",status,scancode);
+
status = kbd_read_status();
}
prev parent reply other threads:[~2001-04-08 20:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-25 22:33 mouse problems in 2.4.2 linas
2001-03-26 0:27 ` Stephen Satchell
2001-03-26 0:47 ` Keith Owens
2001-03-26 3:22 ` linas
2001-03-27 20:15 ` mouse problems in 2.4.2 -> lost byte Gunther Mayer
2001-03-27 20:45 ` linas
2001-03-28 18:31 ` Gunther Mayer
2001-03-28 21:59 ` Vojtech Pavlik
2001-03-28 23:19 ` linas
2001-03-29 5:45 ` Vojtech Pavlik
2001-04-08 20:23 ` Gunther Mayer [this message]
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=3AD0C8AD.1A4D7D12@t-online.de \
--to=gunther.mayer@t-online.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linas@linas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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