HomeFreeBSD

hid_locate: do not ignore constant items.

Description

hid_locate: do not ignore constant items.

hid_locate() currently ignores all HID items which tagged as constant,
i.e. bit 0 of main item data is set to 1. See p.6.2.2.4 of
hid1_11.pdf [1]. Such an items are unconditionally treated as
byte-alignment padding. While that may be right decision for input and
output reports that is wrong for features reports. Feature reports can
contain constant capabilities e.g. 'Contact Count Maximum'.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232040

Remove check for constant from hid_locate() to make possible parsing of
such a reports.

[1] https://www.usb.org/sites/default/files/documents/hid1_11.pdf

Reviewed by: hselasky
Obtained from: sysutils/iichid
Differential Revision: https://reviews.freebsd.org/D27747

Details

Provenance
wulf_cicgroup.ruAuthored on Dec 24 2020, 11:46 AM
wulfCommitted on Jan 7 2021, 11:18 PM
Reviewer
hselasky
Differential Revision
D27747: hid_locate: do not ignore constant items.
Parents
R10:5cc52631b3b8: Rewrite the disk I/O management system in fsck_ffs(8). Other than
Branches
Unknown
Tags
Unknown