]> git.itanic.dy.fi Git - linux-stable/commit
HID: wacom: generic: Avoid reporting a serial of '0' to userspace
authorTatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
Thu, 1 Feb 2024 04:40:55 +0000 (13:40 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:25:10 +0000 (08:25 +0100)
commite13bed5cfe024fab0410153f8ba1ef4939c18b58
tree9ab233414125ead8d01977af4146db1b23c12aa4
parent1f12e4b3284d6c863f272eb2de0d4248ed211cf4
HID: wacom: generic: Avoid reporting a serial of '0' to userspace

commit ab41a31dd5e2681803642b6d08590b61867840ec upstream.

The xf86-input-wacom driver does not treat '0' as a valid serial
number and will drop any input report which contains an
MSC_SERIAL = 0 event. The kernel driver already takes care to
avoid sending any MSC_SERIAL event if the value of serial[0] == 0
(which is the case for devices that don't actually report a
serial number), but this is not quite sufficient.
Only the lower 32 bits of the serial get reported to userspace,
so if this portion of the serial is zero then there can still
be problems.

This commit allows the driver to report either the lower 32 bits
if they are non-zero or the upper 32 bits otherwise.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
Fixes: f85c9dc678a5 ("HID: wacom: generic: Support tool ID and additional tool types")
CC: stable@vger.kernel.org # v4.10
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/wacom_wac.c