public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Synaptics and TrackPoint problems in 2.6.12
@ 2005-07-20  3:40 Stephen Evanchik
  2005-07-20  6:17 ` Dmitry Torokhov
  2005-07-20 14:34 ` Sergey Vlasov
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Evanchik @ 2005-07-20  3:40 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-kernel

Dimitry,

I have been receiving a lot of complaints that TrackPoints on
Synaptics pass-thru ports stopped working with 2.6.12. I retested
2.6.9 and 2.6.11-rc3 successfully, I believe 2.6.11.7 may also work
but that is unconfirmed at this point.

The behavior is always the same .. after sending the read secondary ID
command, the TrackPoint seems to be disabled from that point forward.

Any ideas?

-- 
Stephen Evanchik
http://stephen.evanchik.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synaptics and TrackPoint problems in 2.6.12
  2005-07-20  3:40 Synaptics and TrackPoint problems in 2.6.12 Stephen Evanchik
@ 2005-07-20  6:17 ` Dmitry Torokhov
  2005-07-20 14:34 ` Sergey Vlasov
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2005-07-20  6:17 UTC (permalink / raw)
  To: Stephen Evanchik; +Cc: linux-kernel

On Tuesday 19 July 2005 22:40, Stephen Evanchik wrote:
> Dimitry,
> 
> I have been receiving a lot of complaints that TrackPoints on
> Synaptics pass-thru ports stopped working with 2.6.12. I retested
> 2.6.9 and 2.6.11-rc3 successfully, I believe 2.6.11.7 may also work
> but that is unconfirmed at this point.
> 
> The behavior is always the same .. after sending the read secondary ID
> command, the TrackPoint seems to be disabled from that point forward.
> 
> Any ideas?
> 

Not really... You know, I am reviewing the 2.6.12 patch and don't really
see anything that might have caused the problem you are describing. I know
that not all devices on pass-through ports are broken since I have one
(not TrackPoint, just a simple eraser head pointer) and I make sure it
works ;)

When you are talking about reading secondary ID, are you talking about
TP_READ_ID or something else?

Are you experiencing the breakage yourself? It might be interesting to
see the log with i8042 debugging turned on.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synaptics and TrackPoint problems in 2.6.12
  2005-07-20  3:40 Synaptics and TrackPoint problems in 2.6.12 Stephen Evanchik
  2005-07-20  6:17 ` Dmitry Torokhov
@ 2005-07-20 14:34 ` Sergey Vlasov
  2005-07-20 15:05   ` Dmitry Torokhov
  1 sibling, 1 reply; 5+ messages in thread
From: Sergey Vlasov @ 2005-07-20 14:34 UTC (permalink / raw)
  To: Stephen Evanchik; +Cc: Dmitry Torokhov, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2733 bytes --]

On Tue, 19 Jul 2005 23:40:18 -0400 Stephen Evanchik wrote:

> I have been receiving a lot of complaints that TrackPoints on
> Synaptics pass-thru ports stopped working with 2.6.12. I retested
> 2.6.9 and 2.6.11-rc3 successfully, I believe 2.6.11.7 may also work
> but that is unconfirmed at this point.
> 
> The behavior is always the same .. after sending the read secondary ID
> command, the TrackPoint seems to be disabled from that point forward.
> 
> Any ideas?

Looks like this problem was introduced by the change from PSMOUSE_PS2 to
PSMOUSE_TRACKPOINT in the TrackPoint support patch.  The Synaptics
driver needs to know whether the device on the pass-thru port is using
3-byte or 4-byte packets; however, instead of checking child->pktsize,
it checks child->type >= PSMOUSE_GENPS - and this check is now giving a
wrong result.  Therefore the Synaptics driver configures the pass-thru
port for 4-byte packets, and all 3-byte packets from TrackPoint seem to
be thrown away.

The patch below is reported to fix the problem - now the 4-byte mode is
used only if child->pktsize == 4.  Another option is to change the
PSMOUSE_TRACKPOINT value so that it is less than PSMOUSE_GENPS, however,
I think that checking child->pktsize is more correct in this case.

In theory, someone could attach a device which uses 6-byte packets to
the Synaptics pass-thru port; I'm not sure what would happen in this
case, but with Synaptics confugured for 3-byte packets (as the patch
below will do) this configuration even has a chance of working.

---
Subject: [PATCH] Fix pass-thru port configuration in the Synaptics driver

The Synaptics driver uses child->type to select either 3-byte or 4-byte
packet size for the pass-thru port; this gives wrong results at least
for PSMOUSE_TRACKPOINT.  Change the check to use child->pktsize instead.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

--- linux-2.6.12/drivers/input/mouse/synaptics.c.alt-synaptics-with-trackpoint	2005-06-17 23:48:29 +0400
+++ linux-2.6.12/drivers/input/mouse/synaptics.c	2005-07-09 21:09:01 +0400
@@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(str
 		serio_interrupt(ptport, packet[1], 0, NULL);
 		serio_interrupt(ptport, packet[4], 0, NULL);
 		serio_interrupt(ptport, packet[5], 0, NULL);
-		if (child->type >= PSMOUSE_GENPS)
+		if (child->pktsize == 4)
 			serio_interrupt(ptport, packet[2], 0, NULL);
 	} else
 		serio_interrupt(ptport, packet[1], 0, NULL);
@@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct
 
 	/* adjust the touchpad to child's choice of protocol */
 	if (child) {
-		if (child->type >= PSMOUSE_GENPS)
+		if (child->pktsize == 4)
 			priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
 		else
 			priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT;


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synaptics and TrackPoint problems in 2.6.12
  2005-07-20 14:34 ` Sergey Vlasov
@ 2005-07-20 15:05   ` Dmitry Torokhov
  2005-07-20 15:46     ` Sergey Vlasov
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2005-07-20 15:05 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: Stephen Evanchik, linux-kernel

On 7/20/05, Sergey Vlasov <vsu@altlinux.ru> wrote:
> On Tue, 19 Jul 2005 23:40:18 -0400 Stephen Evanchik wrote:
> 
> > I have been receiving a lot of complaints that TrackPoints on
> > Synaptics pass-thru ports stopped working with 2.6.12. I retested
> > 2.6.9 and 2.6.11-rc3 successfully, I believe 2.6.11.7 may also work
> > but that is unconfirmed at this point.
> >
> > The behavior is always the same .. after sending the read secondary ID
> > command, the TrackPoint seems to be disabled from that point forward.
> >
> > Any ideas?
> 
> Looks like this problem was introduced by the change from PSMOUSE_PS2 to
> PSMOUSE_TRACKPOINT in the TrackPoint support patch.  The Synaptics
> driver needs to know whether the device on the pass-thru port is using
> 3-byte or 4-byte packets; however, instead of checking child->pktsize,
> it checks child->type >= PSMOUSE_GENPS - and this check is now giving a
> wrong result.  Therefore the Synaptics driver configures the pass-thru
> port for 4-byte packets, and all 3-byte packets from TrackPoint seem to
> be thrown away.

Oh, yes, that would do it.

> The patch below is reported to fix the problem - now the 4-byte mode is
> used only if child->pktsize == 4. 

That is the correct fix.

> Another option is to change the
> PSMOUSE_TRACKPOINT value so that it is less than PSMOUSE_GENPS, 

No, protocol numbers should not be changed as userspace drivers/setups
check them and rely on them being stable. That's why psmouse->pktsize
was introduced to begin with. Unfortunately synaptics pass-through
piece was missed and not adjusted.

I will add the patch to my tree, thanks!

> In theory, someone could attach a device which uses 6-byte packets to
> the Synaptics pass-thru port; I'm not sure what would happen in this
> case, but with Synaptics confugured for 3-byte packets (as the patch
> below will do) this configuration even has a chance of working.

I don't think it can support more than 4 byte packets. bytes 0 and 3
are protocol markers and can't be readily used for transmitting other
protocols data.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Synaptics and TrackPoint problems in 2.6.12
  2005-07-20 15:05   ` Dmitry Torokhov
@ 2005-07-20 15:46     ` Sergey Vlasov
  0 siblings, 0 replies; 5+ messages in thread
From: Sergey Vlasov @ 2005-07-20 15:46 UTC (permalink / raw)
  To: dtor_core; +Cc: Stephen Evanchik, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]

On Wed, Jul 20, 2005 at 10:05:13AM -0500, Dmitry Torokhov wrote:
> On 7/20/05, Sergey Vlasov <vsu@altlinux.ru> wrote:
> > Another option is to change the
> > PSMOUSE_TRACKPOINT value so that it is less than PSMOUSE_GENPS, 
> 
> No, protocol numbers should not be changed as userspace drivers/setups
> check them and rely on them being stable.

Found that now:

	psmouse->dev.id.product = psmouse->type;

So the type is visible through the input device interface.  Probably this
should be mentioned in a comment near "enum psmouse_type" - its definition
in drivers/input/mouse/psmouse.h looks just like some driver-internal
enum.

> > In theory, someone could attach a device which uses 6-byte packets to
> > the Synaptics pass-thru port; I'm not sure what would happen in this
> > case, but with Synaptics confugured for 3-byte packets (as the patch
> > below will do) this configuration even has a chance of working.
> 
> I don't think it can support more than 4 byte packets. bytes 0 and 3
> are protocol markers and can't be readily used for transmitting other
> protocols data.

At least the Synaptics protocol description mentions that its 6-byte
protocol was designed to look like two 3-byte PS/2 mouse packets, so that
it would work even if the controller looks at those markers; other such
protocols are likely to have the same property for the same reason.  Now,
if the Synaptics touchpad would be able to accept a 6-byte packet from the
pass-thru port as two 3-byte packets...

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-20 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-20  3:40 Synaptics and TrackPoint problems in 2.6.12 Stephen Evanchik
2005-07-20  6:17 ` Dmitry Torokhov
2005-07-20 14:34 ` Sergey Vlasov
2005-07-20 15:05   ` Dmitry Torokhov
2005-07-20 15:46     ` Sergey Vlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox