aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorAndrey Smirnov <[email protected]>2019-10-17 21:45:16 -0700
committerBenjamin Tissoires <[email protected]>2019-10-18 15:29:56 +0200
commit905d754c53a522aacf806ea1d3e7c929148c1910 (patch)
tree52cad6a3daddbc6e6ae7d4eae69a1457efc34c1c /tools/perf/scripts/python/exported-sql-viewer.py
parentabdd3d0b344fdf72a4904d09b97bc964d74c4419 (diff)
HID: logitech-hidpp: rework device validation
G920 device only advertises REPORT_ID_HIDPP_LONG and REPORT_ID_HIDPP_VERY_LONG in its HID report descriptor, so querying for REPORT_ID_HIDPP_SHORT with optional=false will always fail and prevent G920 to be recognized as a valid HID++ device. To fix this and improve some other aspects, modify hidpp_validate_device() as follows: - Inline the code of hidpp_validate_report() to simplify distingushing between non-present and invalid report descriptors - Drop the check for id >= HID_MAX_IDS || id < 0 since all of our IDs are static and known to satisfy that at compile time - Change the algorithms to check all possible report types (including very long report) and deem the device as a valid HID++ device if it supports at least one - Treat invalid report length as a hard stop for the validation algorithm, meaning that if any of the supported reports has invalid length we assume the worst and treat the device as a generic HID device. - Fold initialization of hidpp->very_long_report_length into hidpp_validate_device() since it already fetches very long report length and validates its value Fixes: fe3ee1ec007b ("HID: logitech-hidpp: allow non HID++ devices to be handled by this module") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204191 Reported-by: Sam Bazely <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Benjamin Tissoires <[email protected]> Cc: Henrik Rydberg <[email protected]> Cc: Pierre-Loup A. Griffais <[email protected]> Cc: Austin Palmer <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] # 5.2+ Signed-off-by: Benjamin Tissoires <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions