]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: wacom: Do not warn about dropped packets for first packet
authorJason Gerecke <jason.gerecke@wacom.com>
Mon, 9 Sep 2024 20:32:08 +0000 (13:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:12 +0000 (16:29 +0200)
commitf7b4ba5f78f240bc0afc916d2fa6df8b7fd68fac
treedd316c0228b4f2e2bf20c1260fe6759c03d24644
parent85572bf646e4914b487117736f404701ae252339
HID: wacom: Do not warn about dropped packets for first packet

[ Upstream commit 84aecf2d251a3359bc78b7c8e58f54b9fc966e89 ]

The driver currently assumes that the first sequence number it will see
is going to be 0. This is not a realiable assumption and can break if,
for example, the tablet has already been running for some time prior to
the kernel driver connecting to the device. This commit initializes the
expected sequence number to -1 and will only print the "Dropped" warning
the it has been updated to a non-negative value.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Joshua Dickens <joshua.dickens@wacom.com>
Fixes: 6d09085b38e5 ("HID: wacom: Adding Support for new usages")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h