From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Thomas Hellstrom <thellstrom@vmware.com>,
pali.rohar@gmail.com, jckeerthan@gmail.com,
till2.schaefer@uni-dortmund.de, linux-kernel@vger.kernel.org
Subject: [PATCH 6/6] Input: psmouse - limit protocols that we try on passthrough ports
Date: Sat, 28 Nov 2015 21:13:56 -0800 [thread overview]
Message-ID: <1448774036-39040-7-git-send-email-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <1448774036-39040-1-git-send-email-dmitry.torokhov@gmail.com>
PS/2 protocol is slow, and using it with pass-through port (where we
encapsulate PS/2 into PS/2) is slower yet so it takes quite a bit of time
to do full protocol discovery for device attached to a pass-through port.
However, so far we have not see anything but trackpoints or basic PS/2
mice on pass-through ports, so let's limit protocols that we probe there
to Trackpoint, IntelliMouse Explorer, IntelliMouse, and bare PS/2 protocol,
and avoid other extended protocols, such as Synaptics, ALPS, etc.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/mouse/psmouse-base.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index ee59b0e..e909c6e 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -119,6 +119,7 @@ struct psmouse_protocol {
enum psmouse_type type;
bool maxproto;
bool ignore_parity; /* Protocol should ignore parity errors from KBC */
+ bool try_passthru; /* Try protocol also on passthrough ports */
const char *name;
const char *alias;
int (*detect)(struct psmouse *, bool);
@@ -691,6 +692,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.maxproto = true,
.ignore_parity = true,
.detect = ps2bare_detect,
+ .try_passthru = true,
},
#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
{
@@ -728,6 +730,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.maxproto = true,
.ignore_parity = true,
.detect = intellimouse_detect,
+ .try_passthru = true,
},
{
.type = PSMOUSE_IMEX,
@@ -736,6 +739,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.maxproto = true,
.ignore_parity = true,
.detect = im_explorer_detect,
+ .try_passthru = true,
},
#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
{
@@ -777,6 +781,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.name = "TPPS/2",
.alias = "trackpoint",
.detect = trackpoint_detect,
+ .try_passthru = true,
},
#endif
#ifdef CONFIG_MOUSE_PS2_TOUCHKIT
@@ -933,6 +938,11 @@ static bool psmouse_try_protocol(struct psmouse *psmouse,
if (!proto)
return false;
+ if (psmouse->ps2dev.serio->id.type == SERIO_PS_PSTHRU &&
+ !proto->try_passthru) {
+ return false;
+ }
+
if (set_properties)
psmouse_apply_defaults(psmouse);
--
2.6.0.rc2.230.g3dd15c0
next prev parent reply other threads:[~2015-11-29 5:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-29 5:13 [PATCH 0/6] Only probe select protocols on pass through PS/2 prots Dmitry Torokhov
2015-11-29 5:13 ` [PATCH 1/6] Input: psmouse - use switch statement in psmouse_process_byte() Dmitry Torokhov
2015-12-11 11:37 ` Pali Rohár
2015-11-29 5:13 ` [PATCH 2/6] Input: psmouse - fix comment style Dmitry Torokhov
2015-12-11 11:39 ` Pali Rohár
2015-11-29 5:13 ` [PATCH 3/6] Input: psmouse - rearrange Focaltech init code Dmitry Torokhov
2015-12-11 11:44 ` Pali Rohár
2015-11-29 5:13 ` [PATCH 4/6] Input: psmouse - move protocol descriptions around Dmitry Torokhov
2015-12-11 11:46 ` Pali Rohár
2015-11-29 5:13 ` [PATCH 5/6] Input: psmouse - factor out common protocol probing code Dmitry Torokhov
2015-12-02 15:20 ` Hans de Goede
2015-12-02 19:18 ` Dmitry Torokhov
2015-12-03 8:33 ` Hans de Goede
2015-11-29 5:13 ` Dmitry Torokhov [this message]
2015-12-02 15:21 ` [PATCH 6/6] Input: psmouse - limit protocols that we try on passthrough ports Hans de Goede
2015-12-11 11:50 ` Pali Rohár
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=1448774036-39040-7-git-send-email-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=hdegoede@redhat.com \
--cc=jckeerthan@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=thellstrom@vmware.com \
--cc=till2.schaefer@uni-dortmund.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;
as well as URLs for NNTP newsgroup(s).