History log of /src/sys/dev/usb/usb_hid.c (Results 1 – 25 of 93)
Revision Date Author Comments
# 71625ec9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BS

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 67de2db2 04-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

Factor-out hardware-independent part of USB HID support to new module

It will be used by the upcoming HID-over-i2C implementation. Should be
no-op, except hid.ko module dependency is to be added to

Factor-out hardware-independent part of USB HID support to new module

It will be used by the upcoming HID-over-i2C implementation. Should be
no-op, except hid.ko module dependency is to be added to affected drivers.

Reviewed by: hselasky, manu
Differential revision: https://reviews.freebsd.org/D27867

show more ...


# 95e1f0d6 24-Dec-2020 Vladimir Kondratyev <vladimir@kondratyev.su>

Allow HID report descriptor parser to return more then 1 usage per item

This handles parsing of following descriptor, containing array of
usages:

0x05, 0x01, // Usage Page (Generic Desktop C

Allow HID report descriptor parser to return more then 1 usage per item

This handles parsing of following descriptor, containing array of
usages:

0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x80, // Usage (Sys Control)
0xA1, 0x01, // Collection (Application)
0x75, 0x02, // Report Size (2)
0x95, 0x01, // Report Count (1)
0x15, 0x01, // Logical Minimum (1)
0x25, 0x03, // Logical Maximum (3)
0x09, 0x82, // Usage (Sys Sleep)
0x09, 0x81, // Usage (Sys Power Down)
0x09, 0x83, // Usage (Sys Wake Up)
0x81, 0x60, // Input (Data,Array,Abs)
0x75, 0x06, // Report Size (6)
0x81, 0x03, // Input (Const,Var,Abs)
0xC0, // End Collection

Our current parser returns only first usage (Sys Sleep) and loses next
two. Set HID_ITEM_MAXUSAGE limit relatively low as existing code
usually allocates hid_item on stack.

Also tweak hid_locate() to support hid items with multiple usages.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D27748

show more ...


# 3f270928 24-Dec-2020 Vladimir Kondratyev <vladimir@kondratyev.su>

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 i

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

show more ...


# 9dd3156e 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

usb: clean up empty lines in .c and .h files


# eff81549 05-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such pop levels.

If the push level is not restored w

USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such pop levels.

If the push level is not restored within the processing of the same
HID item, an invalid memory location may be used for subsequent HID
item processing.

Verify that the push level is always valid when processing HID items.

Reported by: Andy Nguyen (Google)
MFC after: 3 days
Sponsored by: Mellanox Technologies

show more ...


# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 1af51473 07-Sep-2019 Warner Losh <imp@FreeBSD.org>

Some newer HID devices have descriptors that are larger than 1k. Bump
this to 2k to prevent them from being truncated and ignored. It
appears to be a sanity check only, but bumping it to 2k allows bo

Some newer HID devices have descriptors that are larger than 1k. Bump
this to 2k to prevent them from being truncated and ignored. It
appears to be a sanity check only, but bumping it to 2k allows both of
my iic hid devices to be parsed and the second one to work...

show more ...


# 71625ec9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BS

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 67de2db2 04-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

Factor-out hardware-independent part of USB HID support to new module

It will be used by the upcoming HID-over-i2C implementation. Should be
no-op, except hid.ko module dependency is to be added to

Factor-out hardware-independent part of USB HID support to new module

It will be used by the upcoming HID-over-i2C implementation. Should be
no-op, except hid.ko module dependency is to be added to affected drivers.

Reviewed by: hselasky, manu
Differential revision: https://reviews.freebsd.org/D27867

show more ...


# 95e1f0d6 24-Dec-2020 Vladimir Kondratyev <vladimir@kondratyev.su>

Allow HID report descriptor parser to return more then 1 usage per item

This handles parsing of following descriptor, containing array of
usages:

0x05, 0x01, // Usage Page (Generic Desktop C

Allow HID report descriptor parser to return more then 1 usage per item

This handles parsing of following descriptor, containing array of
usages:

0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x80, // Usage (Sys Control)
0xA1, 0x01, // Collection (Application)
0x75, 0x02, // Report Size (2)
0x95, 0x01, // Report Count (1)
0x15, 0x01, // Logical Minimum (1)
0x25, 0x03, // Logical Maximum (3)
0x09, 0x82, // Usage (Sys Sleep)
0x09, 0x81, // Usage (Sys Power Down)
0x09, 0x83, // Usage (Sys Wake Up)
0x81, 0x60, // Input (Data,Array,Abs)
0x75, 0x06, // Report Size (6)
0x81, 0x03, // Input (Const,Var,Abs)
0xC0, // End Collection

Our current parser returns only first usage (Sys Sleep) and loses next
two. Set HID_ITEM_MAXUSAGE limit relatively low as existing code
usually allocates hid_item on stack.

Also tweak hid_locate() to support hid items with multiple usages.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D27748

show more ...


# 3f270928 24-Dec-2020 Vladimir Kondratyev <vladimir@kondratyev.su>

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 i

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

show more ...


# 9dd3156e 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

usb: clean up empty lines in .c and .h files


# eff81549 05-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such pop levels.

If the push level is not restored w

USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such pop levels.

If the push level is not restored within the processing of the same
HID item, an invalid memory location may be used for subsequent HID
item processing.

Verify that the push level is always valid when processing HID items.

Reported by: Andy Nguyen (Google)
MFC after: 3 days
Sponsored by: Mellanox Technologies

show more ...


# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 1af51473 07-Sep-2019 Warner Losh <imp@FreeBSD.org>

Some newer HID devices have descriptors that are larger than 1k. Bump
this to 2k to prevent them from being truncated and ignored. It
appears to be a sanity check only, but bumping it to 2k allows bo

Some newer HID devices have descriptors that are larger than 1k. Bump
this to 2k to prevent them from being truncated and ignored. It
appears to be a sanity check only, but bumping it to 2k allows both of
my iic hid devices to be parsed and the second one to work...

show more ...


# 99a4d2ce 21-Jul-2018 Vladimir Kondratyev <wulf@FreeBSD.org>

Raise "Report Count" value limit in HID descriptor parser.

This fixes usage/report size calculation of Microsoft`s "Touch Hardware
Quality Assurance" certificate blob found in many touchscreens.

Wh

Raise "Report Count" value limit in HID descriptor parser.

This fixes usage/report size calculation of Microsoft`s "Touch Hardware
Quality Assurance" certificate blob found in many touchscreens.

While here, join several "c->flags = dval" lines in to single line.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16357

show more ...


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


# 1409e715 21-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r322398 through r322746.


# 3e3648ce 19-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r322698


# 76136d20 19-Aug-2017 Vladimir Kondratyev <wulf@FreeBSD.org>

Add support for generic MS Windows 7/8/10-compatible USB HID touchscreens
found in many laptops.

Reviewed by: hps, gonzo, bcr (manpages)
Approved by: gonzo (mentor)
Differential Revision: https://

Add support for generic MS Windows 7/8/10-compatible USB HID touchscreens
found in many laptops.

Reviewed by: hps, gonzo, bcr (manpages)
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D12017

show more ...


# 20733245 02-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

dev/usb: minor spelling fixes in comments.

No functional change.

Reviewed by: hselasky


# 14e9c916 24-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r295902 through r296006.


1234