Commit b4c57768 authored by Pali Rohár's avatar Pali Rohár Committed by Ben Hutchings

Input: alps - allow up to 2 invalid packets without resetting device

commit 9d720b34 upstream.

On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte
in 6 bytes ALPS packet. In this case psmouse driver enter out of sync
state. It looks like that all other bytes in packets are valid and also
device working properly. So there is no need to do full device reset, just
need to wait for byte which match condition for first byte (start of
packet). Because ALPS packets are bigger (6 or 8 bytes) default limit is
small.

This patch increase number of invalid bytes to size of 2 ALPS packets which
psmouse driver can drop before do full reset.

Resetting ALPS devices take some time and when doing reset on some Dell
laptops touchpad, trackstick and also keyboard do not respond. So it is
better to do it only if really necessary.
Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
Tested-by: default avatarPali Rohár <pali.rohar@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 6c952f13
...@@ -751,6 +751,9 @@ int alps_init(struct psmouse *psmouse) ...@@ -751,6 +751,9 @@ int alps_init(struct psmouse *psmouse)
/* We are having trouble resyncing ALPS touchpads so disable it for now */ /* We are having trouble resyncing ALPS touchpads so disable it for now */
psmouse->resync_time = 0; psmouse->resync_time = 0;
/* Allow 2 invalid packets without resetting device */
psmouse->resetafter = psmouse->pktsize * 2;
return 0; return 0;
init_fail: init_fail:
......
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