linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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@cvml.unipv.it
Subject: Re: [PATCH] Reset ps/2 port should psmouse_probe	fail	before	retrying
Date: Thu, 22 Apr 2010 18:28:50 +0200	[thread overview]
Message-ID: <1271953731.4566.27.camel@lovely> (raw)
In-Reply-To: <4BCF69CB.7010000@canonical.com>

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,




  reply	other threads:[~2010-04-22 16:26 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 [this message]
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
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=1271953731.4566.27.camel@lovely \
    --to=chf.fritz@googlemail.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).