summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-11-08 12:58:57 -0800
committerBen Hutchings <ben@decadent.org.uk>2014-12-14 16:23:56 +0000
commitb4c57768b27111721fda951e7f5118f5a2f05d47 (patch)
treee2bd54a218cecd47dd9f6e1b8c6f58251896a6c0 /drivers/input
parent6c952f139831934c359ab38d14bdf3054b72a585 (diff)
downloadlinux-b4c57768b27111721fda951e7f5118f5a2f05d47.tar.gz
linux-b4c57768b27111721fda951e7f5118f5a2f05d47.tar.bz2
linux-b4c57768b27111721fda951e7f5118f5a2f05d47.zip
Input: alps - allow up to 2 invalid packets without resetting device
commit 9d720b34c0a432639252f63012e18b0507f5b432 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: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/alps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 759a7bcf5fbb..64ce6d9116b5 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -751,6 +751,9 @@ int alps_init(struct psmouse *psmouse)
/* We are having trouble resyncing ALPS touchpads so disable it for now */
psmouse->resync_time = 0;
+ /* Allow 2 invalid packets without resetting device */
+ psmouse->resetafter = psmouse->pktsize * 2;
+
return 0;
init_fail: