diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2021-11-15 15:38:09 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2021-11-15 15:38:09 +0000 |
commit | b32b3f09a711e11de1836d663e2c78d13b765f43 (patch) | |
tree | 1070522f34c0f3854bee634580835b4a2c47d3af /sys/dev/usb | |
parent | 2e7327dcf520f7ecffd43f6afc352e8e7d4d4626 (diff) |
Third attempt to solve the claim multiple report ids conflict. Using the
report id to signal that multiple ones should be claimed by the match
routines does not work. All valid report ids 1-255 cannot of course be
used and 0 which is reserved by the USB HID specification is internally
used to represents devices lacking an explicit report id.
Therefore, use presence of the claimed array to signal that multiple
report ids can be claimed.
Tested by gnezdo@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/uhidev.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/usb/uhidev.h b/sys/dev/usb/uhidev.h index aa315c16582..ba07ef9f008 100644 --- a/sys/dev/usb/uhidev.h +++ b/sys/dev/usb/uhidev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.h,v 1.38 2021/11/15 15:36:24 anton Exp $ */ +/* $OpenBSD: uhidev.h,v 1.39 2021/11/15 15:38:08 anton Exp $ */ /* $NetBSD: uhidev.h,v 1.3 2002/10/08 09:56:17 dan Exp $ */ /* @@ -75,12 +75,11 @@ struct uhidev_attach_arg { struct usb_attach_arg *uaa; struct uhidev_softc *parent; uint8_t reportid; - uint8_t nreports; + u_int nreports; uint8_t *claimed; }; -#define UHIDEV_CLAIM_MULTIPLE_REPORTID(u) \ - ((u)->reportid == __UHIDEV_CLAIM_MULTIPLE_REPORTID) +#define UHIDEV_CLAIM_MULTIPLE_REPORTID(u) ((u)->claimed != NULL) #define __UHIDEV_CLAIM_MULTIPLE_REPORTID 255 /* XXX */ int uhidev_report_type_conv(int); |