From: Christoph Fritz <chf.fritz@googlemail.com>
To: "Peter M. Petrakis" <peter.petrakis@canonical.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, rubini <rubini@cvml.unipv.it>,
Christopher Heiny <cheiny@synaptics.com>
Subject: Re: [PATCH] Reset ps/2 port should psmouse_probe fail before retrying
Date: Sun, 02 May 2010 09:41:25 +0200 [thread overview]
Message-ID: <1272786085.3621.1.camel@lovely> (raw)
In-Reply-To: <1272769662.3315.36.camel@lovely>
On Sun, 2010-05-02 at 05:07 +0200, Christoph Fritz wrote:
> Am Freitag, den 30.04.2010, 18:37 -0400 schrieb Peter M. Petrakis:
> > Christoph,
> >
> > The setres cmds don't seem to be working. We end up falling
> > back to the generic driver again and failing in psmouse_probe.
> > Logs attached with some instrumentation and i8042.debug enabled.
>
> As Dmitry already told, this "E8 02 E8 02 E8 02 E8 02 E9" is nonsene. I
> missed part 4.4 in the docu. There was no need to test, sorry to not
> making this more clear.
>
> At the moment there are two open questions:
>
> 1. Why does the device report itself as 0x73
0x00, shouldn't write emails that late...
> when we expect 0x47 to
> special query 0x02? Christopher from Synaptics has been already asked.
> By the way, this 0x73
0x00
> is the cause why your device falls back to ps2
> driver. It's the root of your suspend problem: synaptics driver does,
> psmouse-base does no reset in reconnect().
>
> 2. Should we do a reset in psmouse-base too? If yes, only for these
> "fall-back-synaptic-touchpads" or should all generic ps2 devices get a
> reset?
>
> Here I missused the model entry, but it's not that fine:
>
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index d8c0c8d..5e726df 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -597,7 +597,6 @@ static int cortron_detect(struct psmouse *psmouse, bool set_properties)
> static int psmouse_extensions(struct psmouse *psmouse,
> unsigned int max_proto, bool set_properties)
> {
> - bool synaptics_hardware = false;
>
> /*
> * We always check for lifebook because it does not disturb mouse
> @@ -621,10 +620,10 @@ static int psmouse_extensions(struct psmouse *psmouse,
> /*
> * Try Synaptics TouchPad. Note that probing is done even if Synaptics protocol
> * support is disabled in config - we need to know if it is synaptics so we
> - * can reset it properly after probing for intellimouse.
> + * can reset it properly at reconnect and after probing for intellimouse.
> */
> if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse, set_properties) == 0) {
> - synaptics_hardware = true;
> + psmouse->model = PSMOUSE_MODEL_NEEDRESET;
>
> if (max_proto > PSMOUSE_IMEX) {
> /*
> @@ -740,7 +739,7 @@ static int psmouse_extensions(struct psmouse *psmouse,
> */
> ps2bare_detect(psmouse, set_properties);
>
> - if (synaptics_hardware) {
> + if (psmouse->model == PSMOUSE_MODEL_NEEDRESET) {
> /*
> * We detected Synaptics hardware but it did not respond to IMPS/2 probes.
> * We need to reset the touchpad because if there is a track point on the
> @@ -1401,10 +1400,14 @@ static int psmouse_reconnect(struct serio *serio)
> if (psmouse->reconnect) {
> if (psmouse->reconnect(psmouse))
> goto out;
> - } else if (psmouse_probe(psmouse) < 0 ||
> + } else {
> + if (psmouse->model == PSMOUSE_MODEL_NEEDRESET)
> + psmouse_reset(psmouse);
> + if (psmouse_probe(psmouse) < 0 ||
> psmouse->type != psmouse_extensions(psmouse,
> psmouse_max_proto, false)) {
> - goto out;
> + goto out;
> + }
> }
>
> /* ok, the device type (and capabilities) match the old one,
> diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
> index e053bdd..c45b5ef 100644
> --- a/drivers/input/mouse/psmouse.h
> +++ b/drivers/input/mouse/psmouse.h
> @@ -20,6 +20,9 @@
> #define PSMOUSE_RET_ACK 0xfa
> #define PSMOUSE_RET_NAK 0xfe
>
> +#define PSMOUSE_MODEL_UNKNOWN 0x00
> +#define PSMOUSE_MODEL_NEEDRESET 0x01
> +
> enum psmouse_state {
> PSMOUSE_IGNORE,
> PSMOUSE_INITIALIZING,
>
>
next prev parent reply other threads:[~2010-05-02 7:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 22:52 [PATCH] Reset ps/2 port should psmouse_probe fail before retrying Peter M. Petrakis
2010-04-17 11:01 ` Christoph Fritz
2010-04-17 15:31 ` Peter M. Petrakis
2010-04-17 16:53 ` Christoph Fritz
2010-04-19 15:33 ` Peter M. Petrakis
2010-04-20 0:37 ` Christoph Fritz
2010-04-20 21:08 ` Peter M. Petrakis
2010-04-21 6:33 ` Dmitry Torokhov
2010-04-21 16:05 ` Peter M. Petrakis
2010-04-21 17:10 ` Dmitry Torokhov
2010-04-21 19:38 ` Peter M. Petrakis
2010-04-21 19:52 ` Dmitry Torokhov
2010-04-21 21:10 ` Peter M. Petrakis
2010-04-22 16:28 ` Christoph Fritz
2010-04-22 21:48 ` Peter M. Petrakis
2010-04-22 21:55 ` Dmitry Torokhov
2010-04-23 0:47 ` Christoph Fritz
2010-04-23 16:53 ` Dmitry Torokhov
2010-04-23 18:46 ` Peter M. Petrakis
2010-04-28 17:07 ` Dmitry Torokhov
2010-04-28 20:17 ` Peter M. Petrakis
2010-04-29 16:57 ` Christoph Fritz
2010-04-29 17:46 ` Dmitry Torokhov
2010-04-30 22:37 ` Peter M. Petrakis
2010-05-02 3:07 ` Christoph Fritz
2010-05-02 7:41 ` Christoph Fritz [this message]
2010-05-07 17:57 ` Peter M. Petrakis
2010-05-08 16:01 ` Christoph Fritz
2010-04-24 1:22 ` Christoph Fritz
2010-04-24 10:00 ` Christoph Fritz
2010-04-28 7:26 ` Dmitry Torokhov
2010-05-08 16:22 ` Christoph Fritz
2010-05-11 8:22 ` Dmitry Torokhov
2010-05-11 22:24 ` Christoph Fritz
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=1272786085.3621.1.camel@lovely \
--to=chf.fritz@googlemail.com \
--cc=cheiny@synaptics.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.petrakis@canonical.com \
--cc=rubini@cvml.unipv.it \
/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).