Re: [PATCH] Reset ps/2 port should psmouse_probe fail before retrying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So where do we stand on this? Option #2 sounds like a good
thing to implement regardless of whether synaptics is the
victim device or not. Devices supported by the fall back driver
will eventually get our attention again when users wish to use
the extended features of the device. In the meanwhile, at least
they'll have a reliable, minimum set of features.

I'm happy to continue instrumenting this mysterious synaptics
device. Just keep the patches coming. Thanks.

Peter

On 05/01/2010 11:07 PM, 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 when we expect 0x47 to
special query 0x02? Christopher from Synaptics has been already asked.
   By the way, this 0x73 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,


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux