From: Vojtech Pavlik <vojtech@suse.cz>
To: torvalds@osdl.org, vojtech@ucw.cz, linux-kernel@vger.kernel.org
Subject: [PATCH 41/44] Don't ignore PS/2 data immediately after disconnect
Date: Tue, 16 Mar 2004 15:19:38 +0100 [thread overview]
Message-ID: <1079446778856@twilight.ucw.cz> (raw)
In-Reply-To: <10794467782137@twilight.ucw.cz>
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
ChangeSet@1.1608.54.10, 2004-03-11 02:16:51-05:00, dtor_core@ameritech.net
Input: when disconnecting PS/2 mouse give protocol's disconnect
handler chance to run before starting ignoring mouse data.
Otherwise interrupt handler will discard all ACKs and the
very first command in cleanup sequence will fail (Synaptics
was failing to return to relative mode on module unload).
psmouse-base.c | 8 +++++---
psmouse.h | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
===================================================================
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c Tue Mar 16 13:17:34 2004
+++ b/drivers/input/mouse/psmouse-base.c Tue Mar 16 13:17:34 2004
@@ -552,7 +552,7 @@
{
struct psmouse *psmouse = serio->private;
- psmouse->state = PSMOUSE_IGNORE;
+ psmouse->state = PSMOUSE_CMD_MODE;
if (psmouse->ptport) {
if (psmouse->ptport->deactivate)
@@ -565,6 +565,8 @@
if (psmouse->disconnect)
psmouse->disconnect(psmouse);
+ psmouse->state = PSMOUSE_IGNORE;
+
input_unregister_device(&psmouse->dev);
serio_close(serio);
kfree(psmouse);
@@ -592,7 +594,7 @@
psmouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
psmouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
- psmouse->state = PSMOUSE_NEW_DEVICE;
+ psmouse->state = PSMOUSE_CMD_MODE;
psmouse->serio = serio;
psmouse->dev.private = psmouse;
@@ -650,7 +652,7 @@
return -1;
}
- psmouse->state = PSMOUSE_NEW_DEVICE;
+ psmouse->state = PSMOUSE_CMD_MODE;
psmouse->type = psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt = 0;
if (psmouse->reconnect) {
if (psmouse->reconnect(psmouse))
diff -Nru a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
--- a/drivers/input/mouse/psmouse.h Tue Mar 16 13:17:34 2004
+++ b/drivers/input/mouse/psmouse.h Tue Mar 16 13:17:34 2004
@@ -5,7 +5,7 @@
#define PSMOUSE_CMD_SETRES 0x10e8
#define PSMOUSE_CMD_GETINFO 0x03e9
#define PSMOUSE_CMD_SETSTREAM 0x00ea
-#define PSMOUSE_CMD_POLL 0x03eb
+#define PSMOUSE_CMD_POLL 0x03eb
#define PSMOUSE_CMD_GETID 0x02f2
#define PSMOUSE_CMD_SETRATE 0x10f3
#define PSMOUSE_CMD_ENABLE 0x00f4
@@ -18,7 +18,7 @@
#define PSMOUSE_RET_NAK 0xfe
/* psmouse states */
-#define PSMOUSE_NEW_DEVICE 0
+#define PSMOUSE_CMD_MODE 0
#define PSMOUSE_ACTIVATED 1
#define PSMOUSE_IGNORE 2
next prev parent reply other threads:[~2004-03-16 14:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <10794467771611@twilight.ucw.cz>
2004-03-16 14:19 ` [PATCH 29/44] HID quirk (badpad) for NEC gamepad Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 30/44] Separate HID quirks for different A4Tech mice Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 31/44] Fix i8042 PS/2 mouse on ARM Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 32/44] Update of Wacom driver from Ping Cheng (from Wacom) Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 33/44] Fix for devices that need padded HID packets Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 34/44] Fix a memory leak in ns558.c Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 35/44] HID quirk (badpad) for Chic gamepad Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 36/44] Don't define DEBUG in hid-ff by default Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 37/44] Restore LED state in atkbd.c after resume Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 38/44] Fix oops (NULL pointer dereference) on resume in psmouse.c Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 39/44] Fix an endless loop in hid-core.c if device has empty reports Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 40/44] Fix for HID devices which need nonzero idle for the ctrl pipe Vojtech Pavlik
2004-03-16 14:19 ` Vojtech Pavlik [this message]
2004-03-16 14:19 ` [PATCH 42/44] Do a full reset of Synaptics touchpad if extended protocol probes failed Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 43/44] Enable relative mode and gestures if Synaptics uses non-native protocol Vojtech Pavlik
2004-03-16 14:19 ` [PATCH 44/44] Fixes in wacom.c: SLAB_ATOMIC->GFP_KERNEL and count bug in open() 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=1079446778856@twilight.ucw.cz \
--to=vojtech@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=vojtech@ucw.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