From: "Peter M. Petrakis" <peter.petrakis@canonical.com>
To: Christoph Fritz <chf.fritz@googlemail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, rubini@cvml.unipv.it
Subject: Re: [PATCH] Reset ps/2 port should psmouse_probe fail before retrying
Date: Thu, 22 Apr 2010 17:48:21 -0400 [thread overview]
Message-ID: <4BD0C425.5030609@canonical.com> (raw)
In-Reply-To: <1271953731.4566.27.camel@lovely>
Hi,
This one is a winner. with regards to your follow up. I wouldn't
want to reset something unless we have cause to. This code
seems to be doing the right thing e.g. I see "unable to query
synaptics hardware" followed by it's (re)discovery on return
from S3.
When it's fully supported by the Synaptics driver, the initial
reconnect will succeed and we'll never get to this additional
failsafe code which is essentially a catch all for the bleeding
edge.
Peter
On 04/22/2010 12:28 PM, Christoph Fritz wrote:
> Hi,
>
> to quote 4d368456808c977b8e9782dbe9542cf8ddedbab8 :
>
> Input: synaptics - ensure we reset the device on resume
>
> When resuming from suspend newer Synaptics touchpads do not recover
> correctly. Analysis of the resume sequence as applied in Linux was
> compared to that of other operating systems. This indicated that the
> other OSs were resetting the mouse before attempting to detect it (for
> all Synaptics touchpads, old and new). Applying this same modification
> fixes these newer Synaptics touchpads and brings the driver into line
> with common OS reset behaviour.
> <quote end>
>
>
> So Synaptics touchpads which are not not yet covered by their
> driver need to be resetted when resuming from suspend.
>
> But the device we are actually talking about will be sooner or later supported
> by the synaptics driver, and should all other devices who act normal be resetted
> too?
>
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index d8c0c8d..6877371 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -1383,6 +1383,7 @@ static int psmouse_reconnect(struct serio *serio)
> struct psmouse *parent = NULL;
> struct serio_driver *drv = serio->drv;
> int rc = -1;
> + int retries = 0;
>
> if (!drv || !psmouse) {
> printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
> @@ -1401,10 +1402,14 @@ static int psmouse_reconnect(struct serio *serio)
> if (psmouse->reconnect) {
> if (psmouse->reconnect(psmouse))
> goto out;
> - } else if (psmouse_probe(psmouse) < 0 ||
> + } else {
> + while ((retries++ < 3) && psmouse_reset(psmouse))
> + /* empty */;
> + 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,
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-22 21:48 UTC|newest]
Thread overview: 36+ 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 [this message]
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
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
-- strict thread matches above, loose matches on Subject: below --
2010-04-14 20:46 Peter M. Petrakis
2010-04-14 21:04 ` Randy Dunlap
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=4BD0C425.5030609@canonical.com \
--to=peter.petrakis@canonical.com \
--cc=chf.fritz@googlemail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.