Commit 33fdfa97 authored by Sergey Vlasov's avatar Sergey Vlasov Committed by Dmitry Torokhov

Input: synaptics - fix setting packet size on passthrough port.

Synaptics driver used child->type to select either 3-byte or 4-byte
packet size for the pass-through port; this gives wrong results for
the newer protocols. Change the check to use child->pktsize instead.
Signed-off-by: default avatarSergey Vlasov <vsu@altlinux.ru>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 5ac7ba3f
...@@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet ...@@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
serio_interrupt(ptport, packet[1], 0, NULL); serio_interrupt(ptport, packet[1], 0, NULL);
serio_interrupt(ptport, packet[4], 0, NULL); serio_interrupt(ptport, packet[4], 0, NULL);
serio_interrupt(ptport, packet[5], 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); serio_interrupt(ptport, packet[2], 0, NULL);
} else } else
serio_interrupt(ptport, packet[1], 0, NULL); serio_interrupt(ptport, packet[1], 0, NULL);
...@@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct psmouse *psmouse) ...@@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct psmouse *psmouse)
/* adjust the touchpad to child's choice of protocol */ /* adjust the touchpad to child's choice of protocol */
if (child) { if (child) {
if (child->type >= PSMOUSE_GENPS) if (child->pktsize == 4)
priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT; priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
else else
priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT; priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment