Make the ucc match criteria more stringent by requiring at least one
authoranton <anton@openbsd.org>
Sun, 29 Aug 2021 18:21:16 +0000 (18:21 +0000)
committeranton <anton@openbsd.org>
Sun, 29 Aug 2021 18:21:16 +0000 (18:21 +0000)
commit9a1fff4fbbef2056ad25f69dc4dc54ee3b04940f
treeae8867af422469420c1ec285ae74b83dcafbc53b
parent4e984ffc3513a0515ac58821ae97194401123df4
Make the ucc match criteria more stringent by requiring at least one
usage greater than zero. Usage zero is defined as unassigned by the
specification and cannot be mapped to anything sensible.

Prevents ucc from attaching to bunch of odd report IDs from a Lenovo
ThinkPad USB-C Dock which only exposes the unassigned usage.  This is
not a problem in practice but I think we're better attaching them as
uhid devices instead as ucc cannot provide any functionality.

Thanks to Mario Peter <mp at mpeter dot de> for reporting and testing.
sys/dev/usb/ucc.c